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

Appendix 2


About the project file (bank file) format The project file format and bank file format 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

This part is subjected to simple data compression.
An algorithm is set up to group 0x00 together.

example
If "0x01,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01"

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 window vertical position Total number of banks Bank displayed at the top of the window File version
 size
mold
 argument
 explanation
88
 StandardFileReply
 reply; 
2
 short
 posH; 
2
 short
 posV; 
2
 short
 bankNo; 
2
 short
 top; 
4
 long
 version; 

Size : 8 bytes (for bank files)
'Bank' (bank recognition code) File version
 size
mold
 argument
 explanation
4
 long
 fileCode 
4
 long
 version; 

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

Item : Bank data
Size : 84 bytes * number of banks
 size
mold
 argument
 explanation
 64
 Str63
 name;
 bank name
 4
 Handle
 voice;
 Handle to voice & layer information
 4
 long
 voiceNo;
 number of voices
 2
 short
 sendBank;
 What bank should I send it to?
 2
 short
 selVoice;
 Position of currently selected voice
 2
 short
 top;
 Voice displayed at the top of the window
 2
 short
 windowPv;
 Voice window V position
 2
 short
 windowPh;
 Voice window H position
 2
 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
 bend range;
 Bend range (0 -13)
 2
 short
 portament;
 Portamento (0 -127)
 2
 short
 volBias;
 Volume bias (0 -127
 1
 char
 checkFM;
 Flag indicating whether this voice is an FM voice
 4
 Handle
 layer;
 Layer information handle
 4
 long
 layerNo;
 Total number of layers
 2
 short
 selLayer;
 currently selected layer
 2
 short
 top;
 Layer displayed at the top of the window
 2
 short
 windowPv;
 V position of the last opened layer window
 2
 short
 windowPh;
 H position of the last opened layer window
 2
 short
 windowSize;
 Size of the last open 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
 waveNo;
 Waveform number registered in the layer
 1
 unsigned char
 start;
 Start of key split (0-127)
 1
 unsigned char
 end;
 End of key split (0-127)
 1
 char
 loopMode;
 Loop mode (0-4)
 1
 char
 decayR1;
 EG Decay Rate1 setting (0-31)
 1
 char
 decayR2;
 EG Decay Rate2 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;
 1 for FM connection (0 -127)
 1
 char
 mdysl;
 2 for FM connection (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
 directL;
 DirectLevel(0 -7)
 1
 char
 directP;
 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)
 4
 long
 size;
 Current size of this layer
 2
 short
 winH;
 H position of layer window
 2
 short
 winV;
 Layer window V position
 2
 short
 fmH;
 H position of FM layer window
 2
 short
 fmV;
 V position of FM layer window
 1
 Boolean
 upDate;
 Check for size updates

Note
DirectPAN supports the following "parameter/balance".
 parameters
 0
 1
 2
 3
 4
 5
 ...
 15
 16
 17
 18
 19
 ...
 31
 balance
 C
 R1
 R2
 R3
 R4
 R5
 ...
 R15
 C
 L1
 L2
 L3
 ...
 L15

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

For separating data
"0xFFFF"

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

Item : Data governing Mixer, Velocity, PEG, PLFO
Size : 48 bytes
 size
mold
 argument
 explanation
 2
 short
 mixerNo;
 Total number of mixers
 2
 short
 veloNo;
 Total number of velocities
 2
 short
 pegNo;
 Total number of PEGs
 2
 short
 plfoNo;
 Total number of PLFOs
 2
 short
 selMixer;
 currently selected mixer
 2
 short
 selVelocity;
 Currently selected velocity
 2
 short
 selPEG;
 Currently selected PEG
 2
 short
 selPLFO;
 Currently selected PLFO
 4
 Point
 posMixer;
 Mixer window position
 4
 Point
 posVelocity;
 Velocity window position
 4
 Point
 posPEG;
 PEG window position
 4
 Point
 posPLFO;
 PLFO window position
 4
 Handle
 mixer;
 mixer data handle
 4
 Handle
 velocity;
 velocity data handle
 4
 Handle
 peg;
 PEG data handle
 4
 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 EffectLevel(0 -7)

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

Note 2
PAN corresponds to the following "parameter/balance".
 parameters
 0
 1
 2
 3
 4
 5
 ...
 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 velocities
 size
mold
 argument
 explanation
 32
 Str31
 name;
 velocity name
 2
 short
 point0;
 Position of velocity point 0 (0 -127)
 2
 short
 level0;
 Level of velocity point 0 (0 -127)
 2
 short
 point1;
 Velocity point 1 position (0 -127)
 2
 short
 level1;
 Level of velocity point 1 (0 -127)
 2
 short
 point2;
 Velocity point 2 position (0 -127)
 2
 short
 level2;
 Level of velocity point 2 (0 -127)
 2
 short
 level3;
 Level of velocity point 3 (0 -127)

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

Item : PEG data
Size : 60 bytes *Total number of PEGs
 size
mold
 argument
 explanation
 32
 Str31
 name;
 PEG name
 2
 short
 dly;
 Delay time (0 -127)
 2
 short
 ol;
 Offset level (-127 - 127)
 2
 short
 al;
 Attack level (-127 - 127)
 4
 long
 at;
 Attack time (0 -2048)
 2
 short
 dl;
 Decay level (-127 - 127)
 4
 long
 dt;
 Decay time (0 -2048)
 2
 short
 sl;
 Sustain level (-127 - 127)
 4
 long
 st;
 Sustaun time (0 -2048)
 2
 short
 rl;
 Release level (-127 - 127)
 4
 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
 dly;
 Delay time
 2
 short
 freq;
 PLFO frequency
 2
 short
 amp;
 Amplifier
 2
 short
 fdTime;
 fade time

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

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

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

For separating data
"0xFFFF"

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

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

 Note
When converting data from a YAMAHA tone editor, the sample rate cannot be detected. However, since the playback rate is determined by the layer's base note and fine tune, the sample rate can be 0.

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

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