SOUND ManualTone Editor User's Manual /
BackForward
Tone Editor User's Manual

Appendix 2


About the format of the project file (bank file) The format of the project file and the format of the bank file are almost the same except for the header part.
The format can be roughly divided into two blocks.
It consists of the synthesizer parameter part in the first half and the waveform part in the second half.

● Synthesizer parameter part

Simple data compression is applied to this part.
The algorithm is designed to combine 0x00.

example
In the case of "0x01,0x00,0x00,0x00,0xFF, 0xFF, 0x00,0x00,0x00,0x00,0x01"

It is converted to "0x01,0x00,0x03,0xFF,0xFF,0x00,0x04,0x01".

● Protocol

The format of the uncompressed data part is as follows.

------- start file --------

Item : File header
Size : 100 bytes (for project files)
Project file location Horizontal position of the window Vertical position of the window Total number of banks Bank displayed at the top of the window File version
 size
Mold
 argument
 explanation
88
 StandardFileReply
 reply; 
2
 short short
 posH; 
2
 short short
 posV; 
2
 short short
 bankNo; 
2
 short short
 top; 
Four
 long
 version; 

Size : 8 bytes (for bank files)
'Bank' (bank identification code) File version
 size
Mold
 argument
 explanation
Four
 long
 fileCode 
Four
 long
 version; 

---------------------------

Item : Bank data
Size : 84 bytes * Number of banks
 size
Mold
 argument
 explanation
 64
 Str63
 name;
 Bank name
 Four
 Handle
 voice;
 Handle to voice & layer information
 Four
 long
 voiceNo;
 Number of voices
 2
 short short
 sendBank;
 What bank to send to
 2
 short short
 selVoice;
 Currently selected voice position
 2
 short short
 top;
 Voice displayed at the top of the window
 2
 short short
 windowPv;
 Voice window V position
 2
 short short
 windowPh;
 Voice window H position
 2
 short short
 windowSize;
 Voice window size

---------------------------

Item : Voice data
Size : 60 bytes * Total number of voices
 size
Mold
 argument
 explanation
 34
 Str31
 voiceName;
 Voice name
 2
 short short
 bendrange;
 Bend range (0 -13)
 2
 short short
 portament;
 Portamento (0 -127)
 2
 short short
 volBias;
 Volume bias (0 -127)
 1
 char
 checkFM;
 Flag whether this voice is FM voice
 Four
 Handle
 layer;
 Layer information handle
 Four
 long
 layerNo;
 Total number of layers
 2
 short short
 selLayer;
 Currently selected layer
 2
 short short
 top;
 The layer displayed at the top of the window
 2
 short short
 windowPv;
 V position of the last opened layer window
 2
 short short
 windowPh;
 H position of the last opened layer window
 2
 short short
 windowSize;
 The size of the last opened window
 1
 char
 upDate;
 Flag for recalculation

---------------------------

Item : Layer data
Size : 86 bytes * Total number of layers
 size
Mold
 argument
 explanation
 32
 Str31
 layerName;
 Layer name
 1
 short short
 waveNo;
 Waveform number registered in the layer
 1
 unsigned char
 start;
 Beginning of key split (0-127)
 1
 unsigned char
 end;
 End of key split (0-127)
 1
 char
 roopMode;
 Loop mode (0-4)
 1
 char
 decayR1;
 EG Decay Rate 1 setting (0-31)
 1
 char
 decayR2;
 EG Decay Rate 2 setting (0-31)
 1
 char
 egHold;
 EG Hold (0,1)
 1
 char
 attack;
 EG Attack setting (0-31)
 1
 char
 loopSL;
 Not used.
 1
 char
 keyRS;
 EG key rate scaling setting (0-15)
 1
 char
 decayL;
 EG Decay Level setting (0-31)
 1
 char
 release;
 EG Release Rate setting (0-31)
 1
 char
 stwinh;
 Not used
 1
 char
 soundD;
 Not used
 1
 char
 totalL;
 Total level (0-127)
 1
 char
 mdl;
 FM modulation (0 -15)
 1
 char
 lfoRes;
 LFO reset (0 -1)
 1
 char
 lfof;
 LFO frequency (0 -31)
 1
 char
 mdxsl;
 FM connection 1 (0 -127)
 1
 char
 mdysl;
 FM connection 2 (0 -127)
 1
 Boolean
 pLFO;
 PLFO switch (0 -1)
 1
 Boolean
 pLFOM;
 PLFO modulation (0 -1)
 1
 char
 pLFOWS;
 PLFO waveform selection (0 -3)
 1
 char
 pLFOS;
 PLFO depth (0 -7)
 1
 char
 aLFOWS;
 ALFO waveform selection (0 -3)
 1
 char
 aLFOS;
 ALFO depth (0 -7)
 1
 unsigned char
 inSelect;
 EffectSelect (0 -15)
 1
 char
 inMixLev;
 EffectSend (0 -7)
 1
 char
 dilectL;
 DirectLevel (0 -7)
 1
 char
 dilectP;
 DirectPAN (0 -31) Note
 1
 unsigned char
 baseNote;
 Base note (0 -127)
 1
 char
 fineTune;
 Fine tune (-63 --63)
 1
 unsigned char
 vlNo;
 Velocity number (0 -255)
 1
 unsigned char
 pegNo;
 PEG number (0 -255)
 1
 unsigned char
 plfoNo;
 PLFO number (0 -255)
 1
 Boolean
 pEG;
 PEG switch (0 -1)
 1
 Boolean
 pEGM;
 PEG modulation (0 -1)
 1
 Boolean
 lfoM;
 LFO modulation (0 -1)
 1
 Boolean
 totalLM;
 Total level modulation (0,1)
 Four
 long
 size;
 Current size of this layer
 2
 short short
 winH;
 H position of layer window
 2
 short short
 winV;
 V position of layer window
 2
 short short
 fmH;
 H position of FM layer window
 2
 short short
 fmV;
 V position of FM layer window
 1
 Boolean
 upDate;
 Check for size updates

caution
DirectPAN supports the following "parameters / balance".
 Parameters
 0
 1
 2
 3
 Four
 Five
 ...
 15
 16
 17
 18
 19
 ...
 31
 balance
 C
 R1
 R2
 R3
 R4
 R5
 ...
 R15
 C
 L1
 L2
 L3
 ...
 L15

---------------------------

For data delimiter
"0xFFFF"

---------------------------

Item : Data that controls Mixer, Velocity, PEG, and PLFO
Size : 48 bytes
 size
Mold
 argument
 explanation
 2
 short short
 mixerNo;
 Total number of mixers
 2
 short short
 veloNo;
 Total velocity
 2
 short short
 pegNo;
 Total number of PEG
 2
 short short
 plfoNo;
 Total number of PLFOs
 2
 short short
 selMixer;
 Currently selected mixer
 2
 short short
 selVelocity;
 Currently selected velocity
 2
 short short
 selPEG;
 Currently selected PEG
 2
 short short
 selPLFO;
 Currently selected PLFO
 Four
 Point
 posMixer;
 Mixer window position
 Four
 Point
 posVelocity;
 Velocity window position
 Four
 Point
 posPEG;
 PEG window position
 Four
 Point
 posPLFO;
 PLFO window position
 Four
 Handle
 mixer;
 Mixer data handle
 Four
 Handle
 velocity;
 Velocity data handle
 Four
 Handle
 peg;
 PEG data handle
 Four
 Handle
 plfo;
 PLFO data handle

---------------------------

Item : Mixer data
Size : 68 bytes * Total number of Mixers
 size
Mold
 Argument ( Note 1 )
 explanation
 32
 Str31
 name;
 The name of the mixer.
 18
 unsigned char
 pan [18];
 Mixer PAN (0 -31) ( Note 2 )
 18
 unsigned char
 sendRet [18];
 Mixer Effect Level (0 -7)

Note 1
Each argument in the array represents the channel for that mixer.

Note 2
PAN supports the following "parameters / balance".
 Parameters
 0
 1
 2
 3
 Four
 Five
 ...
 15
 16
 17
 18
 19
 ...
 31
 balance
 C
 R1
 R2
 R3
 R4
 R5
 ...
 R15
 C
 L1
 L2
 L3
 ...
 L15

---------------------------

Item : Velocity data
Size : 46 bytes * Total number of Velocity
 size
Mold
 argument
 explanation
 32
 Str31
 name;
 Velocity name
 2
 short short
 point0;
 Velocity point 0 position (0 -127)
 2
 short short
 level0;
 Velocity point 0 level (0 -127)
 2
 short short
 point1;
 Velocity point 1 position (0 -127)
 2
 short short
 level1;
 Velocity point 1 level (0 -127)
 2
 short short
 point2;
 Velocity point 2 position (0 -127)
 2
 short short
 level2;
 Velocity point 2 level (0 -127)
 2
 short short
 level3;
 Velocity point 3 level (0 -127)

---------------------------

Item : PEG data
Size : 60 bytes * Total number of PEGs
 size
Mold
 argument
 explanation
 32
 Str31
 name;
 PEG name
 2
 short short
 dly;
 Delay time (0 -127)
 2
 short short
 ol;
 Offset level (-127 --127)
 2
 short short
 al;
 Attack level (-127 --127)
 Four
 long
 at; at;
 Attack time (0 -2048)
 2
 short short
 dl;
 Decay level (-127 --127)
 Four
 long
 dt;
 Decay time (0 -2048)
 2
 short short
 sl;
 Sustain level (-127 --127)
 Four
 long
 st;
 Sustaun time (0 -2048)
 2
 short short
 rl;
 Release level (-127 --127)
 Four
 long
 rt;
 Release time (0 -8192)

---------------------------

Item : PLFO data
Size : 40 bytes * Total number of PLFOs
 size
Mold
 argument
 explanation
 32
 Str31
 name;
 PLFO name
 2
 short short
 dly;
 Delay time
 2
 short short
 freq;
 PLFO frequency
 2
 short short
 amp;
 Amplifier
 2
 short short
 fdTime;
 Fade time

---------------------------

Waveform data
The waveform data in the second half is not compressed at all.
When saving a bank file, the used waveform is determined and saved.

---------------------------

For data delimiter
"0xFFFF"

---------------------------

Item : Preservation of waveform
Size : 92 bytes + waveform size
 size
Mold
 argument
 explanation
 32
 Str63
 name;
 Waveform file name
 Four
 long
 dataSize;
 Data size (including header)
 Four
 long
 numChannels;
 Number of channels
 Four
 long
 numSampleFrames;
 Number of sample frames
 1
 char
 sampleSize;
 sample size
 Four
 long
 sampleRate;
 Sample rate
 Four
 long
 start;
 Loop start
 Four
 long
 end;
 Loop end
 x
 char
 waveData [];
 Actual waveform data

 caution
When converting data from a YAMAHA tone editor, the sample rate cannot be detected. However, the playback rate is based on the base note and fine tune of the layer, so the sample rate can be 0.

------- End of file ---------

BackForward
SOUND ManualTone Editor User's Manual /
Copyright SEGA ENTERPRISES, LTD., 1997