Structure and semantics of Instrument files (e.g. .ins files)

Author
ToddBMarshall
Max Output Level: -90 dBFS
  • Total Posts : 5
  • Joined: 2015/03/22 19:47:32
  • Status: offline
2018/03/13 15:38:25 (permalink)

Structure and semantics of Instrument files (e.g. .ins files)

I have been unable so far to find information about the structure and semantics of the general instrument definition files (e.g. YAMAHA.ins).

Can someone point me to a link?

Also, if the link doesn't answer this question I would appreciate help:
When I create a .ins file from scratch and introduce it to SONAR by importing it, the instrument seems to get added but the patch names do not. Why is that? How do I make it add the patch names.

Also, my list of patches has become cluttered and I don't see any way of cleaning it up without manually going in and deleting in the SONAR -> Instruments -> Define facility

Any help will be greatly appreciated.

Thanks....
Todd Marshall
Plantersville, TX

==================================================
My dissection so far (which I show here to remove confusion of what I'm looking for) is as follows:

The file is fairly free form text with one line per entry and blank lines meaning nothing. Case does not appear to be significant.
Lines beginning with ";" are comments
e.g.
; -----------------------------------------------------------------------------
; PSR-S970  Instrument Definition compared to Yamaha Data List (c) 2010

Lines beginning with "." break the file into chunks as follows:
  .Path Names; .Note Names; .Controller Names; .RPN Names;
  .NRPN Names; .Instrument Definitions;
I am unsure if this order is important (i.e. required) and is an exhaustive list

Within chunks, names of sections are enclosed with "[ ]" followed by lists usually of the form number=name. There don't seem to be any rules governing names. These section names are repeated in the "Instrument Definitions" chunk without the "[  ]".
e.g. for Patch Names:
.Patch Names
[GM1 & XG Bank 0]
[XG Bank 1 (KSP)]
[XG Bank 3 (Stereo)]
[XG Bank 6 (Single)]

Within the sections are details of the form n=name. The { } in the example doesn't seem to have any significance.
e.g. for Patch Names:
[GM1 & XG Bank 0]
0=Aco Grand Piano {XG}
1=Bright Aco Piano {XG}
2=E. Grand Piano {XG}
3=Honkytonk Piano {XG}

The ".Note names" section seems to provide for a template mechanism using "Basedon=" referring back to a previously defined section, and then presumably overwrites exceptions. This is ambiguous as in my example (from a Yamaha file) there is no difference between the "basis" and the "basedon". It is unclear whether this feature is unique to the Note Names section.
e.g.
[GM2 Standard]
27=High Q
28=Slap
29=Scratch Push

[GM2 Room]
BasedOn=GM2 Standard
27=High Q
28=Slap
29=Scratch Push

The .Instrument Definitions chunk seems to allow for multiple instruments to be defined within a single file. In the example [PSR=S970] introduces the instrument name followed by its related section, subsection, patch, key, drum, etc. names. The reason for the list of patch names in this section is ambiguous as all information here is also available in the .Patch Names chunk. Thus it seems to be for efficiency. Peculiarly, this instrument segmentation takes place towards the end of the file where the ".Instrument Definitions" chunk.

e.g.
.Instrument Definitions


[PSR-S970]
Control=S-Series Controllers
RPN=Standard RPN
NRPN=NRPN S-Series
Patch[0]=GM1 & XG Bank 0
Patch[1]=XG Bank 1 (KSP)
Patch[3]=XG Bank 3 (Stereo)
Patch[6]=XG Bank 6 (Single)

The semantics for key and drum seem to be more involved ... especially the drums with the "*" and the =0 or =1 semantics.
e.g.
Key[15360,8]=GM2 Room
Key[15360,16]=GM2 Power
Key[15360,24]=GM2 Electronic
Key[15360,25]=GM2 Analog

Drum[15360,*]=1
Drum[15360,56]=0
Drum[16256,*]=1
Drum[16128,35]=1

Banks are the name referring to name lists (which are MSB,LSB base 128). For example MSB 120, LSB 0 yields 15360 combining by base 128.

The bank select methods (i.e. normal; CC0; and CC32) are confusing to me and seem to be legacy artifacts. In the file I dissect here banks seem to be based on MSB, LSB, PC where MSB and LSB are converted to a single number (MSB*128+LSB) and PC is left separate. Again, that is presumably a legacy artifact as it would be more straight forward to just use the three separate numbers. Who knows?

I remain mystified that I haven't been able to find a description even as clumsy as mine here about what is going on. This stuff is really old and I can't be the only one who has questioned it.
 
I hope this clarifies what I'm looking for ... i.e. I would like precise semantics as if I was going to write the Instrument import program for SONAR or MIDI-OX.
 
#1

6 Replies Related Threads

    brundlefly
    Max Output Level: 0 dBFS
    • Total Posts : 14250
    • Joined: 2007/09/14 14:57:59
    • Location: Manitou Spgs, Colorado
    • Status: offline
    Re: Structure and semantics of Instrument files (e.g. .ins files) 2018/03/13 16:53:28 (permalink)
    It's been too long since I messed with making my own intrument definitions for me to advise off the top of my head, and I'm not on a machine right now that has examples. I was always able to fiigure things out by reverse-engineering existing definitions for similar instruments.
     
    Here's a Cakewalk Knowledge article that may help:
     
    https://www.cakewalk.com/Support/Knowledge-Base/2007013272/Instrument-Definitions
     
    Assuming that the file itself is correctly structured, it occurs to me that one essential thing you might be missing is that you need to assign the Instrument to channels of a physical MIDI port after importing it in order to get the Bank/Patch structure for that instrument to show up in the track with that Output port assigned.
     


    SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
    Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
    #2
    ToddBMarshall
    Max Output Level: -90 dBFS
    • Total Posts : 5
    • Joined: 2015/03/22 19:47:32
    • Status: offline
    Re: Structure and semantics of Instrument files (e.g. .ins files) 2018/03/15 00:07:37 (permalink)
    Thanks for the reply. It was a careless error on my part. I wrote a program to parse data from the .pdf file and failed to do the banks properly when make the name list labels. It now works. I'm still pretty surprised the semantics isn't documented somewhere after all these years.
     
    Also, I presume there is not quick way to just clean out existing entries short of using the interactive process and selecting delete.
    =============
    Before:
    .Patch Names


    [13324 104 12]
    0=Piano&Orchestra 13324 104 12 0 Piano S.Art!
    81=SimpleComp 13324 104 12 81 Synth Regular
    88=OrganBells 13324 104 12 88 Choir&Pad Regular

    [13324 104 13]
    81=Chordmaster 13325 104 13 81 Synth Regular
    88=ItopiaBells 13325 104 13 88 Choir&Pad Regular

    [13324 104 14]
    88=SpectrumTheme 13326 104 14 88 Choir&Pad Regular

    =====================
    After and problem resolved
    ; ----------------------------------------------------------------------

    .Patch Names


    [13324 104 12]
    0=Piano&Orchestra 13324 104 12 0 Piano S.Art!
    81=SimpleComp 13324 104 12 81 Synth Regular
    88=OrganBells 13324 104 12 88 Choir&Pad Regular

    [13325 104 13]
    81=Chordmaster 13325 104 13 81 Synth Regular
    88=ItopiaBells 13325 104 13 88 Choir&Pad Regular

    [13326 104 14]
    88=SpectrumTheme 13326 104 14 88 Choir&Pad Regular

    [13327 104 15]
    81=FusionLead 13327 104 15 81 Synth Regular
    88=BreathBells 13327 104 15 88 Choir&Pad Regular


    #3
    brundlefly
    Max Output Level: 0 dBFS
    • Total Posts : 14250
    • Joined: 2007/09/14 14:57:59
    • Location: Manitou Spgs, Colorado
    • Status: offline
    Re: Structure and semantics of Instrument files (e.g. .ins files) 2018/03/15 02:24:39 (permalink)
    If I understand the question about 'cleaning out', I think you can just delete everything from Master.INS (or substitute a new, empty plain text file for it) to start fresh. But I never tried that, so can't be sure there isn't some basic structure that needs to be preserved as a starting point. Easy enough to test by backing it up first, and restarting SONAR with an empty one.

    SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
    Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
    #4
    ToddBMarshall
    Max Output Level: -90 dBFS
    • Total Posts : 5
    • Joined: 2015/03/22 19:47:32
    • Status: offline
    Re: Structure and semantics of Instrument files (e.g. .ins files) 2018/03/16 21:57:36 (permalink)
    Thanks for your continued help.
    "If I understand the question about 'cleaning out', I think you can just delete everything from Master.INS (or substitute a new, empty plain text file for it) to start fresh."
     
    The Master.ins file in "...\Cakewalk Content\SONAR X3 Producer\Instruments" has not been modified since 2/2011 and does not contain the junk.
     
    "Easy enough to test by backing it up first, and restarting SONAR with an empty one."
    Since it hasn't been modified for so long I don't think there is any point in trying that. Cakewalk seems to be saving this information somewhere else.
     
    A search of the documentation gives a reference to the "Master.ins" file and notes that on a panic reset, it, along with Instrmap.ins is reloaded. The Instrmap.ins file is not documented. I also don't find it in the directory with Master.ins nor in other possibly relevant directories like ...\Cakewalk Projects.
     
    From the web documentation:
    Users of MIDI librarian programs need the ability to update SONAR’s instrument definitions in real-time, without having to close and restart SONAR.
    Any changes made to patch names or other instrument definitions are reflected immediately.
     
     
    #5
    scook
    Forum Host
    • Total Posts : 24146
    • Joined: 2005/07/27 13:43:57
    • Location: TX
    • Status: offline
    Re: Structure and semantics of Instrument files (e.g. .ins files) 2018/03/16 22:17:39 (permalink)
    SONAR X3 uses the Master.ins in your user directory %appdata%\Cakewalk\SONAR X3 Producer\
    #6
    ToddBMarshall
    Max Output Level: -90 dBFS
    • Total Posts : 5
    • Joined: 2015/03/22 19:47:32
    • Status: offline
    Re: Structure and semantics of Instrument files (e.g. .ins files) 2018/03/17 21:04:37 (permalink)
    "X3 uses the Master.ins in your user directory %appdata%\Cakewalk\SONAR X3 Producer\"
    Bingo. That file is being changed with each import.
     
    Thanks...
    Todd
    #7
    Jump to:
    © 2024 APG vNext Commercial Version 5.1