; Edit 2.0
;   Template for E-mu Proteus - Preset Patch
;

; Edit is a file editor driven by a text-based screen and database
; definition.  It currently handles "files" of only one record, which is
; just fine for single Sysex patches.  The template file (this file, for
; example) defines the screen layout (fields, literals, messages) and the
; data buffer (positions of data within the file).

; In general, blank lines and lines starting with a semicolon are comment
; lines.  Lines starting with a period are command lines, and the rest are
; data lines.  WARNING: THE CURRENT VERSION OF EDIT DOES NOT HAVE FAILSAFE
; EDITING FEATURES... FOLLOW THE RULES CAREFULLY.

; Screen definition

; A template file has two basic sections: the screen definition section
; and the data definition section.  The screen definition section defines
; the layout of fields and literals on the screen.  Currently, Edit only
; handles a single screen and only 150 input-capable fields.  This is
; enough for the synthesizers I am currently working with (the Proteus and
; the Kawai K4), but will be expanded as time goes on.  The screen definition
; section is bracketed by the dot-commands .SCREEN and .ENDSCREEN; be sure to
; enter these commands or unpredicted results will occur.

.SCREEN

.VIDEO
;@MODE 0     ;Remove the comment on this line for monochrome monitors
.ENDVIDEO

; The first section of a template file defines the literals that will
; display on the screen.  These are normally prompts.  Each literal has
; three parameters:
;
;           Row......:  The row where the literal will display
;                       (rows 1 and 24 are reserved for Edit)
;           Column...:  The column where the literal will display
;           Literal..:  The literal string enclosed in double quotes.
;                       There is no way to display a double quote at this
;                       time.
;
; The literal section is bracketed by the dot-commands .LITERALS and
; .ENDLITERALS; be sure to enter these commands or unpredicted results
; will occur.

.LITERALS
3,1,"Preset Number:"
3,21,"Preset Name:"
3,51,"Preset Links:"
4,51,"Low Key:"
5,51,"High Key:"
7,1,"Primary"
8,1,"Secndry"
10,1,"Crossfade......"
11,1,"LFO 1.........."
12,1,"LFO 2.........."
13,1,"Auxiliary......"
14,1,"Key/Vol Source."
15,1,"Key/Vol Dest..."
16,1,"Key/Vol Amount."
17,1,"Realtime Source"
18,1,"Realtime Dest.."
20,1,"Footswitch Dest:"
20,39,"Controller Amount:"
21,1,"Pressure Amount:"
21,27,"Pitch Bend Range:"
21,58,"Velocity Curve:"
22,1,"Keyboard Center:"
22,33,"Mix Output:"
22,57,"Keyboard Tuning:"
.ENDLITERALS

; The second section defines the input capable fields as they will appear
; on the screen.  Each field is assigned a number, a location, field type
; and length, and message numbers.  The field number is used by the data
; section and is the only link between the two sections.  It must be unique
; for each field.  The field number also determines the sequence that fields
; are cycled through via the cursor movement keys.  The message numbers are
; used to display help text on line 24.  One or two message numbers may be
; specified; these message numbers relate to the numbers specified in the
; message section below.  The messages are concatenated and displayed on
; line 24.  Optional minimum and maximum values can be placed after the
; second message number (enter "0" for the secon message number if only one
; message is used).  The parameters for a field, then, are as follows:
;
;       Field Number......:     The reference number for this field
;       Row...............:     The row this field is displayed on
;       Column............:     The column this field is displayed on
;       Type..............:     A=Alpha, D=Decimal (numeric)
;       Message Number 1..:     First message number for help text
;       Message Number 2..:     Optional second message number
;       Minimum Value.....:     Optional minimum value
;       Maximum Value.....:     Optional maximum value
;
; After each field definition, you may include optional editing clauses.
; Edit commands are "at-sign-commands", which start with the "@" character.
; The currently supported clauses are @VALID and @RANGE, as follows:
;
; Valid values list:
; ------------------
; @VALID row,col,0,{value:"text"}
; @VALID row,col,fieldnum
;
; The @VALID statement allows the user access (via F4) to a popup window of
; valid values.  The current value is highlighted, and the user may use the
; cursor keys to position to the desired value (or use the highlighted letter).
; Note that the first upper-case letter is the select character.  The first
; form specifies the values and corresponding text for each value (see field
; number 055 below for an example).  The second form allows the user to point
; to another field's valid clause (thus eliminating alot of keying).  Please
; make sure to put the "0" in the third parameter of the first form.  The row
; and column parameters specify the upper left hand corner of the popup window.
; ONLY AVAILABLE FOR NUMERIC PARAMETERS.
;
; Range checking
; --------------
; @RANGE low,high
;
; Specifies the high and low values available for this field.  ONLY AVAILABLE
; FOR NUMERIC PARAMETERS.  Note that high and low can also be set using the
; minimum and maximum values on the field definition.
;
; Note also that comments are allowed after the field parameters.  This
; allows better readability.  The field definitions are bracketed by the
; dot-commands .FIELDS and .ENDFIELDS; be sure to enter these commands
; or unpredicted results will occur.
    
.FIELDS
001,03,16,D,03,01,00            ; Preset Number     (Uses low,high from @RANGE)
@RANGE 64,127
002,03,34,A,12,02,00            ; Preset Name     
003,03,65,D,03,04,07,-1,191     ; Link 1 Preset     (Uses minimum and maximum)
004,03,69,D,03,05,07,-1,191     ; Link 2 Preset
005,03,73,D,03,06,07,-1,191     ; Link 3 Preset
006,04,61,D,03,03,08            ; Link 0 High Key   (Uses a validation list)
@VALID 4,1,0,000:"C -2",001:"C#-2",002:"D -2",003:"D#-2",004:"E -2",005:"F -2"-
             006:"F#-2",007:"G -2",008:"G#-2",009:"A -2",010:"A#-2",011:"B -2"-
             012:"C -1",013:"C#-1",014:"D -1",015:"D#-1",016:"E -1",017:"F -1"-
             018:"F#-1",019:"G -1",020:"G#-1",021:"A -1",022:"A#-1",023:"B -1"-
             024:"C  0",025:"C# 0",026:"D  0",027:"D# 0",028:"E  0",029:"F  0"-
             030:"F# 0",031:"G  0",032:"G# 0",033:"A  0",033:"A# 0",034:"B  0"-
             036:"C  1",037:"C# 1",038:"D  1",039:"D# 1",039:"E  1",040:"F  1"-
             042:"F# 1",043:"G  1",044:"G# 1",045:"A  1",045:"A# 1",046:"B  1"-
             048:"C  2",049:"C# 2",050:"D  2",051:"D# 2",052:"E  2",053:"F  2"-
             054:"F# 2",055:"G  2",056:"G# 2",057:"A  2",058:"A# 2",059:"B  2"-
             060:"C  3",061:"C# 3",062:"D  3",063:"D# 3",064:"E  3",065:"F  3"-
             066:"F# 3",067:"G  3",068:"G# 3",069:"A  3",070:"A# 3",071:"B  3"-
             072:"C  4",073:"C# 4",074:"D  4",075:"D# 4",076:"E  4",077:"F  4"-
             078:"F# 4",079:"G  4",080:"G# 4",081:"A  4",082:"A# 4",083:"B  4"-
             084:"C  5",085:"C# 5",086:"D  5",087:"D# 5",088:"E  5",089:"F  5"-
             090:"F# 5",091:"G  5",092:"G# 5",093:"A  5",094:"A# 5",095:"B  5"-
             096:"C  6",097:"C# 6",098:"D  6",099:"D# 6",100:"E  6",101:"F  6"-
             102:"F# 6",103:"G  6",104:"G# 6",105:"A  6",106:"A# 6",107:"B  6"-
             108:"C  7",109:"C# 7",110:"D  7",111:"D# 7",112:"E  7",113:"F  7"-
             114:"F# 7",115:"G  7",116:"G# 7",117:"A  7",118:"A# 7",119:"B  7"-
             120:"C  8",121:"C# 8",122:"D  8",123:"D# 8",124:"E  8",125:"F  8"-
             126:"F# 8",127:"G  8"
007,04,65,D,03,04,08,0,127      ; Link 1 High Key
@VALID 4,1,6
008,04,69,D,03,05,08,0,127      ; Link 2 High Key
@VALID 4,1,6
009,04,73,D,03,06,08,0,127      ; Link 3 High Key
@VALID 4,1,6
010,05,61,D,03,03,09,0,127      ; Link 0 Low Key
@VALID 5,1,6
011,05,65,D,03,04,09,0,127      ; Link 1 Low Key
@VALID 5,1,6
012,05,69,D,03,05,09,0,127      ; Link 2 Low Key
@VALID 5,1,6
013,05,73,D,03,06,09,0,127      ; Link 3 Low Key
@VALID 5,1,6
014,07,09,D,03,28,10,0,125      ; Primary Instrument
@VALID 0,0,0,000:"None      ",001:"Piano     ",002:"PianoPad  ",003:"LoosePiano"-
             004:"TightPiano",005:"Strings   ",006:"LongString",007:"SlowString"-
             008:"DarkString",009:"Voices    ",010:"SlowVoices",011:"DarkChoir "-
             012:"SynthFlute",013:"SoftFlute ",014:"AltoSax   ",015:"TenorSax  "-
             016:"BariSax   ",017:"DarkSax   ",018:"SoftTrump ",019:"DrkSftTrmp"-
             020:"HardTrump ",021:"DrkHrdTrmp",022:"HornFalls ",023:"Trombone1 "-
             024:"Trombone2 ",025:"FrenchHorn",026:"Brass1    ",027:"Brass2    "-
             028:"Brass3    ",029:"Tromb/Sax ",030:"GuitarMute",031:"ElecGuitar"-
             032:"AcouGuitar",033:"RockBass  ",034:"StoneBass ",035:"FlintBass "-
             036:"FunkSlap  ",037:"FunkPop   ",038:"Harmonics ",039:"Rock/Harm "-
             040:"Stone/Harm",041:"NoseBass  ",042:"BassSynth1",043:"BassSynth2"-
             044:"SynthPad  ",045:"MedEnvPad ",046:"LongEnvPad",047:"DarkSynth "-
             048:"PercOrgan ",049:"Marimba   ",050:"Vibraphone",051:"BalncPerc "-
             052:"UnbalPerc ",053:"StdPerc1  ",054:"StdPerc2  ",055:"StdPerc3  "-
             056:"Kicks     ",057:"Snares    ",058:"Toms      ",059:"Cymbals   "-
             060:"LatinDrums",061:"LatinPerc ",062:"AgogoBell ",063:"Woodblock "-
             064:"Conga     ",065:"Timbale   ",066:"RideCymbal",067:"PercFX1   "-
             068:"PercFX2   ",069:"Metal     ",070:"Oct1(Sine)",071:"Oct2All   "-
             072:"Oct3All   ",073:"Oct4All   ",074:"Oct5All   ",075:"Oct6All   "-
             076:"Oct7All   ",077:"Oct2Odd   ",078:"Oct3Odd   ",079:"Oct4Odd   "-
             080:"Oct5Odd   ",081:"Oct6Odd   ",082:"Oct7Odd   ",083:"Oct2Even  "-
             084:"Oct3Even  ",085:"Oct4Even  ",086:"Oct5Even  ",087:"Oct6Even  "-
             088:"Oct7Even  ",089:"LowOdds   ",090:"LowEvens  ",091:"FourOcts  "-
             092:"SynthCyc1 ",083:"SynthCyc2 ",094:"SynthCyc3 ",095:"SynthCyc4 "-
             096:"FundGone1 ",097:"FundGone2 ",098:"BiteCycle ",099:"BuzzyCycle"-
             100:"Metalphon1",101:"Metalphon2",102:"Metalphon3",103:"Metalphon4"-
             104:"DuckCycle1",105:"DuckCycle2",106:"DuckCycle3",107:"WindCycle1"-
             108:"WindCycle2",109:"WindCycle3",110:"WindCycle4",111:"OrganCyc1 "-
             112:"OrganCyc2 ",113:"Noise     ",114:"StrayVoic1",115:"StrayVoic2"-
             116:"StrayVoic3",117:"StrayVoic4",118:"SynthStr1 ",119:"SynthStr2 "-
             120:"Animals   ",121:"Reed      ",122:"Pluck1    ",123:"Pluck2    "-
             124:"Mallet1   ",125:"Mallet2   "
015,07,13,D,03,28,11,0,127      ; Primary Sample Start
016,07,17,D,03,28,12,-36,36     ; Primary Coarse Tuning
017,07,21,D,03,28,13,-64,64     ; Primary Fine Tuning
018,07,25,D,03,28,14,0,127      ; Primary Volume
019,07,29,D,03,28,15,-7,7       ; Primary Pan
020,07,33,D,03,28,16,0,127      ; Primary Delay
021,07,37,D,03,28,17            ; Primary Low Key
@VALID 7,1,6
022,07,41,D,03,28,18            ; Primary High Key
@VALID 7,1,6
023,07,45,D,03,28,19,0,99       ; Primary Alternate Attack
024,07,49,D,03,28,20,0,99       ; Primary Alternate Hold
025,07,53,D,03,28,21,0,99       ; Primary Alternate Decay
026,07,57,D,03,28,22,0,99       ; Primary Alternate Sustain
027,07,61,D,03,28,23,0,99       ; Primary Alternate Release
028,07,65,D,03,28,24            ; Primary Alternate Envelope Enable
@VALID 08,57,0,0:"Disable",1:"Enable"
029,07,69,D,03,28,25            ; Primary Solo Mode
@VALID 08,59,0,0:"Normal",1:"Solo Mode"
030,07,73,D,03,28,26            ; Primary Chorus
@VALID 08,63,0,0:"No Chorus",1:"Chorus"
031,07,77,D,03,28,27            ; Primary Reverse Sound
@VALID 08,66,0,0:"No Reverse",1:"Reverse"
032,08,09,D,03,29,10,0,125      ; Secondary Instrument
@VALID 0,0,14
033,08,13,D,03,29,11,0,127      ; Secondary Sample Start
034,08,17,D,03,29,12,-36,36     ; Secondary Coarse Tuning
035,08,21,D,03,29,13,-64,64     ; Secondary Fine Tuning
036,08,25,D,03,29,14,0,127      ; Secondary Volume
037,08,29,D,03,29,15,-7,7       ; Secondary Pan
038,08,33,D,03,29,16,0,127      ; Secondary Delay
039,08,37,D,03,29,17            ; Secondary Low Key
@VALID 8,1,6
040,08,41,D,03,29,18            ; Secondary High Key
@VALID 8,1,6
041,08,45,D,03,29,19,0,99       ; Secondary Alternate Attack
042,08,49,D,03,29,20,0,99       ; Secondary Alternate Hold
043,08,53,D,03,29,21,0,99       ; Secondary Alternate Decay
044,08,57,D,03,29,22,0,99       ; Secondary Alternate Sustain
045,08,61,D,03,29,23,0,99       ; Secondary Alternate Release
046,08,65,D,03,29,24            ; Secondary Alternate Envelope Enable
@VALID 08,57,28
047,08,69,D,03,29,25            ; Secondary Solo Mode
@VALID 08,59,29
048,08,73,D,03,29,26            ; Secondary Chorus
@VALID 08,63,30
049,08,77,D,03,29,27            ; Secondary Reverse Sound
@VALID 08,66,31
050,10,17,D,03,30,00            ; Crossfade Mode
@VALID 09,20,0,0:"Off",1:"crossFade",2:"crossSwitch"
051,10,21,D,03,31,00            ; Crossfade Direction
@VALID 09,24,0,0:"Primary to Secondary",1:"Secondary to Primary"
052,10,25,D,03,32,00,0,127      ; Crossfade Balance
053,10,29,D,03,33,00,0,255      ; Crossfade Amount
054,10,33,D,03,34,00,0,127      ; Crossfade Switch Point
055,11,17,D,03,40,35            ; LFO 1 Shape
@VALID 08,20,0,0:"Random",1:"Triangle",2:"Sine",3:"saWtooth",4:"sQuare"
056,11,21,D,03,40,36,0,127      ; LFO 1 Frequency
057,11,25,D,03,40,37,0,127      ; LFO 1 Delay
058,11,29,D,03,40,38,0,127      ; LFO 1 Variation
059,11,33,D,03,40,39,-128,127   ; LFO 1 Amount
060,12,17,D,03,41,35            ; LFO 2 Shape
@VALID 09,20,055
061,12,21,D,03,41,36,0,127      ; LFO 2 Frequency
062,12,25,D,03,41,37,0,127      ; LFO 2 Delay
063,12,29,D,03,41,38,0,127      ; LFO 2 Variation
064,12,33,D,03,41,39,-128,127   ; LFO 2 Amount
065,13,17,D,03,43,16,0,127      ; Auxiliary Delay
066,13,21,D,03,43,19,0,99       ; Auxiliary Attack
067,13,25,D,03,43,20,0,99       ; Auxiliary Hold
068,13,29,D,03,43,21,0,99       ; Auxiliary Decay
069,13,33,D,03,43,22,0,99       ; Auxiliary Sustain
070,13,37,D,03,43,23,0,99       ; Auxiliary Release
071,13,41,D,03,43,42,-128,127   ; Auxiliary Amount
072,14,17,D,03,44,50            ; Key/Velocity Patch 1 Source
@VALID 11,20,0,0:"Key",1:"Velocity"
073,14,21,D,03,45,50            ; Key/Velocity Patch 2 Source
@VALID 11,24,072
074,14,25,D,03,46,50            ; Key/Velocity Patch 3 Source
@VALID 11,28,072
075,14,29,D,03,47,50            ; Key/Velocity Patch 4 Source
@VALID 11,32,072
076,14,33,D,03,48,50            ; Key/Velocity Patch 5 Source
@VALID 11,36,072
077,14,37,D,03,49,50            ; Key/Velocity Patch 6 Source
@VALID 11,40,072
078,15,17,D,03,44,51            ; Key/Velocity Patch 1 Destination
@VALID 2,5,0,00:"None"-
             01:"Pitch         ",02:"Pri Pitch     ",03:"Sec Pitch     "-
             04:"Volume        ",05:"Pri Volume    ",06:"Sec Volume    "-
             07:"Attack        ",08:"Pri Attack    ",09:"Sec Attack    "-
             10:"Decay         ",11:"Pri Decay     ",12:"Sec Decay     "-
             13:"Release       ",14:"Pri Release   ",15:"Sec Release   "-
             16:"Crossfade"-
             17:"LFO 1 Amount  ",18:"LFO 1 Rate    ",19:"LFO 2 Amount  "-
             20:"LFO 2 Rate    ",21:"AuxEnv Amount ",22:"AuxEnv Attack "-
             23:"AuxEnv Decay  ",24:"AuxEnv Release",25:"AuxEnv Attack "-
             26:"SampleStr     ",27:"Pri Sample Str",28:"Sec Sample Str"-
             29:"Pan           ",30:"Pri Pan       ",31:"Sec Pan       "-
             32:"Tone          ",33:"Pri Tone      ",34:"Sec Tone      "
079,15,21,D,03,45,51            ; Key/Velocity Patch 2 Destination
@VALID 2,5,78
080,15,25,D,03,46,51            ; Key/Velocity Patch 3 Destination
@VALID 2,5,78
081,15,29,D,03,47,51            ; Key/Velocity Patch 4 Destination
@VALID 2,5,78
082,15,33,D,03,48,51            ; Key/Velocity Patch 5 Destination
@VALID 2,5,78
083,15,37,D,03,49,51            ; Key/Velocity Patch 6 Destination
@VALID 2,5,78
084,16,17,D,03,44,52,-128,127   ; Key/Velocity Patch 1 Amount
085,16,21,D,03,45,52,-128,127   ; Key/Velocity Patch 2 Amount
086,16,25,D,03,46,52,-128,127   ; Key/Velocity Patch 3 Amount
087,16,29,D,03,47,52,-128,127   ; Key/Velocity Patch 4 Amount
088,16,33,D,03,48,52,-128,127   ; Key/Velocity Patch 5 Amount
089,16,37,D,03,49,52,-128,127   ; Key/Velocity Patch 6 Amount
090,17,17,D,03,53,61            ; Realtime Patch 1 Source
@VALID 08,20,0,0:"pitch Wheel",1:"control A",2:"control B",3:"control C"-
               4:"control D",5:"Mono Pressure",6:"Poly Pressure"-
               7:"lfo 1",8:"lfo 2",9:"auX Envelope"
091,17,21,D,03,54,61            ; Realtime Patch 2 Source
@VALID 08,24,090
092,17,25,D,03,55,61            ; Realtime Patch 3 Source
@VALID 08,28,090
093,17,29,D,03,56,61            ; Realtime Patch 4 Source
@VALID 08,32,090
094,17,33,D,03,57,61            ; Realtime Patch 5 Source
@VALID 08,36,090
095,17,37,D,03,58,61            ; Realtime Patch 6 Source
@VALID 08,40,090
096,17,41,D,03,59,61            ; Realtime Patch 7 Source
@VALID 08,44,090
097,17,45,D,03,60,61            ; Realtime Patch 8 Source
@VALID 08,48,090
098,18,17,D,03,53,62            ; Realtime Patch 1 Destination
@VALID 7,5,0,00:"None"-
             01:"Pitch         ",02:"Pri Pitch     ",03:"Sec Pitch     "-
             04:"Volume        ",05:"Pri Volume    ",06:"Sec Volume    "-
             07:"Attack        ",08:"Pri Attack    ",09:"Sec Attack    "-
             10:"Decay         ",11:"Pri Decay     ",12:"Sec Decay     "-
             13:"Release       ",14:"Pri Release   ",15:"Sec Release   "-
             16:"Crossfade"-
             17:"LFO 1 Amount  ",18:"LFO 1 Rate    ",19:"LFO 2 Amount  "-
             20:"LFO 2 Rate    ",21:"AuxEnv Amount ",22:"AuxEnv Attack "-
             23:"AuxEnv Decay  ",24:"AuxEnv Release",25:"AuxEnv Attack "
099,18,21,D,03,54,62            ; Realtime Patch 2 Destination
@VALID 7,5,98
100,18,25,D,03,55,62            ; Realtime Patch 3 Destination
@VALID 7,5,98
101,18,29,D,03,56,62            ; Realtime Patch 4 Destination
@VALID 7,5,98
102,18,33,D,03,57,62            ; Realtime Patch 5 Destination
@VALID 7,5,98
103,18,37,D,03,58,62            ; Realtime Patch 6 Destination
@VALID 7,5,98
104,18,41,D,03,59,62            ; Realtime Patch 7 Destination
@VALID 7,5,98
105,18,45,D,03,60,62            ; Realtime Patch 8 Destination
@VALID 7,5,98
106,20,19,D,03,63,66            ; Footswitch 1 Destination
@VALID 12,5,0,0:"Sustain            ",1:"Primary Sustain    ",2:"Secondary Sustain  "-
              3:"Alt Volume Envelope",4:"Pri Alt Volume Env ",5:"Sec Alt Volume Env "-
              6:"Alt Volume Release ",7:"Pri Alt Volume Rel ",8:"Sec Alt Volume Rel "-
              9:"Pri/Sec CrossSwitch"
107,20,23,D,03,64,66            ; Footswitch 2 Destination
@VALID 12,5,106
108,20,27,D,03,65,66            ; Footswitch 3 Destination
@VALID 12,5,106
109,20,58,D,04,67,71,-128,127   ; Controller A Amount
110,20,63,D,04,68,71,-128,127   ; Controller B Amount
111,20,68,D,04,69,71,-128,127   ; Controller C Amount
112,20,73,D,04,70,71,-128,127   ; Controller D Amount
113,21,18,D,04,72,00,-128,127   ; Pressure Amount
114,21,45,D,03,73,00,0,13       ; Pitch Bend Range
115,21,74,D,03,74,00,0,5        ; Velocity Curve
116,22,19,D,03,75,00            ; Keyboard Center
@VALID 7,1,6
117,22,45,D,03,76,00            ; Mix Output
@VALID 15,48,0,0:"Main",1:"Submix 1",2:"Submix 2"
118,22,74,D,03,77,00            ; Keyboard Tuning
@VALID 12,52,0,0:"Equal",1:"Just C",2:"Valotti",3:"19-Tone",4:"Gamelan",5:"User"
.ENDFIELDS

; The message section simply defines the messages that are used to display
; help text for each field on line 24.  Note that two messages can be
; concatenated.  For instance, field 3 specifies messages 4 and 7, which
; have the literals "Link 0 - " and "Preset Number (0 to 191)".  This causes
; the message "Link 0 - Preset Number (0 to 191)" to be displayed for field
; number 3.  This can significantly reduce the unmber of messages required.
; The layout of the message section is:
;
;       Message number....:     Message number
;       Message text......:     Message text, enclosed in double quotes
;
; The message section is bracketed by the dot-commands .MESSAGES and
; .ENDMESSAGES; be sure these commands are entered or unpredicted results
; will occur.

.MESSAGES
01,"Preset Number (64-127)"
02,"Preset Name (12 characters)"
03,"Link 0 - "
04,"Link 1 - "
05,"Link 2 - "
06,"Link 3 - "
07,"Preset Number (-1 to 191) [see PROTEUS.DOC for detail]"
08,"Low Key (0 [C-2] to 127 [G8])"
09,"High Key (0 [C-2] to 127 [G8])"
10,"Instrument (0 to 125)"
11,"Sample Start (0 to 127)"
12,"Coarse Tuning (-36 to 36 [+1 is a half-step sharp])"
13,"Fine Tuning (-64 to 64 [+64 is a half-step sharp])"
14,"Volume (0 to 127)"
15,"Pan (-7 [hard left] to 7 [hard right])"
16,"Delay (0 to 127)"
17,"Low Key (0 [C-2] to 127 [G8])"
18,"High Key (0 [C-2] to 127 [G8])"
19,"Alternate Attack (0 to 99)"
20,"Alternate Hold (0 to 99)"
21,"Alternate Decay (0 to 99)"
22,"Alternate Sustain (0 to 99)"
23,"Alternate Release (0 to 99)"
24,"Alternate Envelope Enable [0=Disable, 1=Enable]"
25,"Solo Mode [0=Normal, 1=Solo Mode]"
26,"Chorus [0=No Chorus, 1=Chorus]"
27,"Reverse Sound [0=Normal, 1=Reverse Sound]"
28,"Primary - "
29,"Secondary - "
30,"Crossfade Mode [0=Off, 1=Xfade, 2=Xswitch]"
31,"Crossfade Direction [0=Pri->Sec, 1=Sec->Pri]"
32,"Crossfade Balance (0 to 127)"
33,"Crossfade Amount (0 to 255)"
34,"Crossfade Switch Point (0 to 127)"
35,"Shape [0=Random, 1=Tri, 2=Sine, 3=Saw, 4=Square]"
36,"Frequency (0 to 127)"
37,"Delay (0 to 127)"
38,"Variation (0 to 127)"
39,"Amount (-128 to 127)"
40,"LFO 1 - "
41,"LFO 2 - "
42,"Amount (-128 to 127)"
43,"Auxiliary Envelope - "
44,"Key/Velocity Patch 1 "
45,"Key/Velocity Patch 2 "
46,"Key/Velocity Patch 3 "
47,"Key/Velocity Patch 4 "
48,"Key/Velocity Patch 5 "
49,"Key/Velocity Patch 6 "
50,"Source [0=Key, 1=Volume]"
51,"Destination (0 to 34)"
52,"Amount (-128 to 127)"
53,"Realtime Patch 1 "
54,"Realtime Patch 2 "
55,"Realtime Patch 3 "
56,"Realtime Patch 4 "
57,"Realtime Patch 5 "
58,"Realtime Patch 6 "
59,"Realtime Patch 7 "
60,"Realtime Patch 8 "
61,"Source (0 to 9)"
62,"Destination (0 to 25)"
63,"Footswitch 1 "
64,"Footswitch 2 "
65,"Footswitch 3 "
66,"Destination (0-10)"
67,"Controller A "
68,"Controller B "
69,"Controller C "
70,"Controller D "
71,"Amount (-128 to 127)"
72,"Pressure Amount (-128 to 127)"
73,"Pitch Bend Range (0 to 12 semitones, 13=Global)"
74,"Velocity Curve (0=Off, 1 to 4, 5=Global)"
75,"Keyboard Center"
76,"Mix Output"
77,"Keyboard Tuning"
.ENDMESSAGES
.ENDSCREEN

; Data Definition

; The second section of the template file is the data definition section.
; Currently, Edit only process a single-record file, so this section is
; not very complex.  There is a file definition section, which defines the
; characteristics of the file, and a record definition section, which
; defines the layout of the data record.  The data definition section is
; bracketed by the dot-commands .DATA and .ENDDATA; be sure that these
; commands are entered or unpredicted results will occur.

.DATA

; The file definition section currently allows only one line with two
; parameters:
;
;       Record length.......:   The length of the data record
;                               (Note that in version 1.0 of Edit, this
;                               is also the file length, since there is
;                               only one record in a file)
;       Default extension...:   This is the default extension that
;                               appears in the Open Patch prompt.
;
; The file definition section is bracketed by the dot-commands .FILE and
; .ENDFILE; be sure these commands are entered or unpredicted results will
; occur.

.FILE
265,SYX
.ENDFILE

; The record definition section defines the layout of the buffer.  In
; general, each line defines an offset into the buffer and the value to
; place at that offset.  The value can be a constant, a field from the
; screen, or a checksum.  The layout is as follows:
;
;       Offset..........:  The offset into the buffer.  Should be from zero
;                          to the record length minus one.
;       Type of value...:  A1 = One-byte alpha
;                          A2 = Two-byte alpha
;                          HX = Hex value, stored MSB to LSB
;                          HR = Reverse hex value, stored LSB to MSB
;                          CO = One-byte constant
;                          CS = Checksum
;       Field length....:  The length of the field in the buffer.
;       Parameter 1.....:  For A1, A2, HX, HR = field number
;                          For CO = constant
;                          For checksum = checksum type
;       Parameter 2.....:  For HX, HR = operator: 1=+|2=-|3=*|4=/|5=<<|6=>>.
;                          For checksum = "From" offset.
;       Parameter 3.....:  For HX, HR = operand.
;                          For checksum = "To" offset.
;       Parameter 4.....:  For checksum = modifier.
;
; One byte alpha values are stored in the buffer one byte per character,
; starting at the buffer offset specified.  Two-byte alpha values are stored
; in the buffer two bytes per character, the first byte being the character
; and the second being zero, starting at the buffer offset specified.  One-
; byte constants are stored at the buffer offset, as are one-byte hex values.
; The operator and operand that can be used on HX and HR fields allows an
; almost unlimited capability for converting buffer values to and from display
; values.
;
; For a better example of the use of operators and operands, please refer
; to MT32PAT.TEM and MT32TIM.TEM.
;
; Checksum is a special type of field.  Currently, there is only one type of
; checksum calculation offered, although others will be defined as they are
; needed.  Type 01 sums all the values in the buffer between the "from" and
; "to" offsets, adds the modifier value, and then places the low-order seven
; bits (the total modulo 128) into the buffer at the offset specified.
;
; The record definition section is bracketed by the dot-commands .RECORD and
; .ENDRECORD; be sure these commands are entered or unpredicted results will
; occur.

.RECORD
@LENGTH 265
000,CO,01,240            ; $F0
001,CO,01,024            ; $18
002,CO,01,004            ; $04
003,CO,01,000            ; $00   (device ID forced to 1 for now)
004,CO,01,001            ; $01
005,HR,02,001            ; Preset Number
007,A2,10,002            ; Preset Name (special Proteus alpha storage)
031,HR,02,003            ; Link 1 Preset
033,HR,02,004            ; Link 2 Preset
035,HR,02,005            ; Link 3 Preset
037,HR,02,006            ; Link 0 High Key
039,HR,02,007            ; Link 1 High Key
041,HR,02,008            ; Link 2 High Key
043,HR,02,009            ; Link 3 High Key
045,HR,02,010            ; Link 0 Low Key
047,HR,02,011            ; Link 1 Low Key
049,HR,02,012            ; Link 2 Low Key
051,HR,02,013            ; Link 3 Low Key
053,HR,02,014            ; Primary Instrument
055,HR,02,015            ; Primary Sample Start
057,HR,02,016            ; Primary Coarse Tuning
059,HR,02,017            ; Primary Fine Tuning
061,HR,02,018            ; Primary Volume
063,HR,02,019            ; Primary Pan
065,HR,02,020            ; Primary Delay
067,HR,02,021            ; Primary Low Key
069,HR,02,022            ; Primary High Key
071,HR,02,023            ; Primary Alternate Attack
073,HR,02,024            ; Primary Alternate Hold
075,HR,02,025            ; Primary Alternate Decay
077,HR,02,026            ; Primary Alternate Sustain
079,HR,02,027            ; Primary Alternate Release
081,HR,02,028            ; Primary Alternate Envelope Enable
083,HR,02,029            ; Primary Solo Mode
085,HR,02,030            ; Primary Chorus
087,HR,02,031            ; Primary Reverse Sound
089,HR,02,032            ; Secondary Instrument
091,HR,02,033            ; Secondary Sample Start
093,HR,02,034            ; Secondary Coarse Tuning
095,HR,02,035            ; Secondary Fine Tuning
097,HR,02,036            ; Secondary Volume
099,HR,02,037            ; Secondary Pan
101,HR,02,038            ; Secondary Delay
103,HR,02,039            ; Secondary Low Key
105,HR,02,040            ; Secondary High Key
107,HR,02,041            ; Secondary Alternate Attack
109,HR,02,042            ; Secondary Alternate Hold
111,HR,02,043            ; Secondary Alternate Decay
113,HR,02,044            ; Secondary Alternate Sustain
115,HR,02,045            ; Secondary Alternate Release
117,HR,02,046            ; Secondary Alternate Envelope Enable
119,HR,02,047            ; Secondary Solo Mode
121,HR,02,048            ; Secondary Chorus
123,HR,02,049            ; Secondary Reverse Sound
125,HR,02,050            ; Crossfade Mode
127,HR,02,051            ; Crossfade Direction
129,HR,02,052            ; Crossfade Balance
131,HR,02,053            ; Crossfade Amount
133,HR,02,054            ; Crossfade Switch Point
135,HR,02,055            ; LFO 1 Shape
137,HR,02,056            ; LFO 1 Frequency
139,HR,02,057            ; LFO 1 Delay
141,HR,02,058            ; LFO 1 Variation
143,HR,02,059            ; LFO 1 Amount
145,HR,02,060            ; LFO 2 Shape
147,HR,02,061            ; LFO 2 Frequency
149,HR,02,062            ; LFO 2 Delay
151,HR,02,063            ; LFO 2 Variation
153,HR,02,064            ; LFO 2 Amount
155,HR,02,065            ; Auxiliary Delay
157,HR,02,066            ; Auxiliary Attack
159,HR,02,067            ; Auxiliary Hold
161,HR,02,068            ; Auxiliary Decay
163,HR,02,069            ; Auxiliary Sustain
165,HR,02,070            ; Auxiliary Release
167,HR,02,071            ; Auxiliary Amount
169,HR,02,072            ; Key/Velocity Patch 1 Source
171,HR,02,073            ; Key/Velocity Patch 2 Source
173,HR,02,074            ; Key/Velocity Patch 3 Source
175,HR,02,075            ; Key/Velocity Patch 4 Source
177,HR,02,076            ; Key/Velocity Patch 5 Source
179,HR,02,077            ; Key/Velocity Patch 6 Source
181,HR,02,078            ; Key/Velocity Patch 1 Destination
183,HR,02,079            ; Key/Velocity Patch 2 Destination
185,HR,02,080            ; Key/Velocity Patch 3 Destination
187,HR,02,081            ; Key/Velocity Patch 4 Destination
189,HR,02,082            ; Key/Velocity Patch 5 Destination
191,HR,02,083            ; Key/Velocity Patch 6 Destination
193,HR,02,084            ; Key/Velocity Patch 1 Amount
195,HR,02,085            ; Key/Velocity Patch 2 Amount
197,HR,02,086            ; Key/Velocity Patch 3 Amount
199,HR,02,087            ; Key/Velocity Patch 4 Amount
201,HR,02,088            ; Key/Velocity Patch 5 Amount
203,HR,02,089            ; Key/Velocity Patch 6 Amount
205,HR,02,090            ; Realtime Patch 1 Source
207,HR,02,091            ; Realtime Patch 2 Source
209,HR,02,092            ; Realtime Patch 3 Source
211,HR,02,093            ; Realtime Patch 4 Source
213,HR,02,094            ; Realtime Patch 5 Source
215,HR,02,095            ; Realtime Patch 6 Source
217,HR,02,096            ; Realtime Patch 7 Source
219,HR,02,097            ; Realtime Patch 8 Source
221,HR,02,098            ; Realtime Patch 1 Destination
223,HR,02,099            ; Realtime Patch 2 Destination
225,HR,02,100            ; Realtime Patch 3 Destination
227,HR,02,101            ; Realtime Patch 4 Destination
229,HR,02,102            ; Realtime Patch 5 Destination
231,HR,02,103            ; Realtime Patch 6 Destination
233,HR,02,104            ; Realtime Patch 7 Destination
235,HR,02,105            ; Realtime Patch 8 Destination
237,HR,02,106            ; Footswitch 1 Destination
239,HR,02,107            ; Footswitch 2 Destination
241,HR,02,108            ; Footswitch 3 Destination
243,HR,02,109            ; Controller A Amount
245,HR,02,110            ; Controller B Amount
247,HR,02,111            ; Controller C Amount
249,HR,02,112            ; Controller D Amount
251,HR,02,113            ; Pressure Amount
253,HR,02,114            ; Pitch Bend Range
255,HR,02,115            ; Velocity Curve
257,HR,02,116            ; Keyboard Center
259,HR,02,117            ; Submix
261,HR,02,118            ; Keyboard Tuning
263,CS,01,01,006,262,000 ; Checksum: Type from 6 to 263, no offset
264,CO,01,247            ; $F7
.ENDRECORD
.ENDDATA

; MIDI Definition

; The next section is the MIDI interface section.  Currently, the only
; subsection is the DUMPREQ subsection, which defines the format of the
; dump request.
;
; Dump requests look much like buffer fields, except that some (the HR type
; fields) have a minimum, maximum, prompt, and optional operator and operand.
;
; For a better example of the use of operators and operands, please refer
; to MT32PAT.TEM and MT32TIM.TEM.


.MIDI
.DUMPREQ
@LENGTH 8
0,CO,01,240
1,CO,01,24
2,CO,01,4
3,HR,01,0,15,"Device ID (0-15)"
4,CO,01,0
5,HR,02,0,191,"Patch Number"
7,CO,01,247
.ENDDUMPREQ
.ENDMIDI

