Japanese
SOUND ManualTone Editor User's Manual/
Back | ■
Tone Editor User's Manual

Appendix 3


●About binary file format

Here we describe the format of the sending file. Basically, we will include a complete version of the format submitted by YAMAHA with any missing, missing, or incorrect parts corrected. The rough structure of the SATURN SCSP format is as follows.

 Item
 size
 Mixer start offset from the beginning
 2 bytes
 Velocity start offset from start
 2 bytes
 PEG start offset from start
 2 bytes
 PLFO start offset from start
 2 bytes
 Offset of voice data number 0 from the beginning
 2*a byte
 :
 Offset of voice data number a from the beginning
 Mixer Data 0
 18*b bytes
 :
 Mixer Data b
 VelocityData 0
 10*c bytes
 :
 VelocityData c
 PEGData 0
 10*d bytes
 :
 PEGData d
 PLFOData 0
 4*e bytes
 :
 PLFOData e
 VoiceData 0
a{F(x) is 4*a+Σ(F(i)*32) for each voice
Returns the number of included layers i=0}
 :
 VoiceData a
 WaveData 0
  f
 ΣW(i) W(x) returns the size of the waveform i=0
:
 WaveData f

●Details

Next, we will analyze each item in detail.

◆Mixer part format
Mixer has 1 byte per channel, 7-5 bits are assigned Effect Send Level, and the rest is assigned Effect PAN.
The size will be 18 bytes.

 7
 6
 5
 4
 3
 2
 1
 0
 channel 0
 EffectSendLev
EffectPAN
 1 byte
 :
 :
:
 :
 channel 17
 EffectSendLev
EffectPAN
 1 byte

◆Velocity part format
The Velocity format requires that in addition to the parameters set on the tone editor, another parameter must be calculated for each point.
Please refer to Sound Tool Guide Vol1 for information on this parameter.
The size will be 10 bytes.
 Slope encoded value 0
 1 byte
 Velocity Point 0
 1 byte
 Velocity Level 0
 1 byte
 Slope encoded value 1
 1 byte
 VelocityPoint 1
 1 byte
 Velocity Level 1
 1 byte
 Slope encoded value 2
 1 byte
 Velocity Point 2
 1 byte
 Velocity Level 2
 1 byte
 Slope encoded value 3
 1 byte

◆PEG part format
Since operability on the tone editor is prioritized, the value to be edited and the value to be sent are assigned different values.
The level of the PEG to be edited is the table number.
long LevelTable[128] = { 
 	     0, 125, 250, 375, 500, 625, 750, 875,  
 	  1000, 1125, 1250, 1375, 1500, 1625, 1750, 1875,  
 	  2000, 2125, 2250, 2375, 2500, 2625, 2750, 2875,  
 	  3000, 3125, 3250, 3375, 3500, 3625, 3750, 3875,  
 	  4000, 4250, 4500, 4750, 5000, 5250, 5500, 5750,  
 	  6000, 6250, 6500, 6750, 7000, 7250, 7500, 7750,  
 	  8000, 8250, 8500, 8750, 9000, 9250, 9500, 9750,  
 	 10000, 10250, 10500, 10750, 11000, 11250, 11500, 11750,  
 	 12000, 12500, 13000, 13500, 14000, 14500, 15000, 15500,  
 	 16000, 16500, 17000, 17500, 18000, 18500, 19000, 19500,  
 	 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000,  
 	 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000,  
 	 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000,  
 	 44000, 45000, 46000, 47000, 48000, 49000, 50000, 51000,  
 	 52000, 54000, 56000, 58000, 60000, 62000, 64000, 66000,  
 	 68000, 72000, 76000, 80000, 84000, 88000, 92000, 95990};
From this table and PEGTime
	PEGRate=LevelTable/PEGTime;

Calculate and find PEGRate. From this, find the table number and use it as the transmission data.
The PEG rate table is written in C code as follows.

	long PEGRateTable[128];

	/*Create PEG rate table (100 times the actual value)*/

	for(i=0L;i< 128L;++i)
		PEGRateTable[i]=(long)(((float)i*(float)i*(float)100)	
				/(float)16384*(float)100); /* Find the slope */

Delay table value
 1 byte
 OffsetLevel table value
 1 byte
 AttackRate table value
 1 byte
 AttackLevel table value
 1 byte
 DecayRate table value
 1 byte
 DecayLevel table value
 1 byte
 SustainRate table value
 1 byte
 SustainLevel table value
 1 byte
 ReleaseRate table value
 1 byte
 ReleaseLevel table value
 1 byte

◆PLFO part format
When actually editing this parameter in the tone editor, do not use the actual value, but use the table value. The edited value will be written as is.
 Delay table value
 1 byte
 PLFO frequency table value
 1 byte
 AMP table value
 1 byte
 Fade timetable value
 1 byte

◆Voice part format
 7
 6
 5
 4
 3
 2
 1
 0
 FM
 Bend range width (0 -13)
 1 byte
 ×
 Portamento time (0 -127)
 1 byte
 ×
 Number of layers
 1 byte
 Volume Bias(-127 - 127)
 1 byte
 Layer data 0
 32 bytes
: :
 Layer Data n
 32 bytes
FM: For checking whether this voice is in FM format

◆Layer part format
Layer parts are included in Voice format.
Some parts of the format are written directly to SCSP registers.
This part is a little complicated, so I'll explain it later.
Data size is 32 bytes.
 7
 6
 5
 4
 3
 2
 1
 0
 ×
 Start of MIDI note (0 -127)
 1 byte
 ×
 End of MIDI note (0 -127)
 1 byte

SCSP register part
23 bytes

23 bytes
 Base note (0 -127)
 1 byte
 Fine tune (-63 - 63)
 1 byte
 For FM connection 1 (0 -127)
 1 byte
 FM connection 2 (0 -127)
 1 byte
 Velocity number (0 -255)
 1 byte
 PEG number (0 -255)
 1 byte
 PLFO number (0 -255)
 1 byte

●About SCSP register part
Since this register is written directly to SCSP, one byte is not reserved for each parameter.

reference
"HARDWARE MANUAL"/SCSP User's Manual/ ■Slot-specific control registers
 15
 14
 13
 12
 11
 10
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
 PEG
 PLFO
 -
 (1)
 (2)
 (3)
 (4)
 loop control
 8Bit
 StaetAddress(19:16)
 Waveform Start Address(15-0)
 Loop Start Address(15-0)
 Loop End Address(15-0)
 DecayRate2(4-0)
 DecayRate1(4-0)
 EGHold
 AttackRate(4-0)
 -
 (Five)
 KeyRateScaling(3-0)
 DecayLevel(4-0)
 ReleaseRate(4-0)
 LFO M
 PEG M
 PLFO M
 -
 -
 -
 (6)
 (7)
 TotalLevel(7-0)
 FM Modulation(3-0)
 1(5-0) for FM connection
 2(5-0) for FM connection
 -
 (8)
 TMod
 (9)
 LFOR
 LFO frequency (4-0)
 PLFO waveform
 PLFO depth (2-0)
 ALFO waveform
 ALFO depth (2-0)
 -
 -
 -
 -
 -
 -
 -
 -
 -
 EffectSelect(3-0)
 EffectSend(2-0)
 DirectSend(2-0)
 DirectPAN(4-0)

Parameters written in abbreviations due to space limitations
 Abbreviation
 Contents
 8Bit
 Waveform sample size (sets when 16Bit)
 PEG
 PEG switch
 PLFO
 PLFO switch
 LFO M
 LFO modulation
 PEGM
 PEG modulation
 PLFOM
 PLFOM modulation
 TMod
 Total level modulation
 LFOR
 LFO reset

This table only shows the parameters used in SEGA SatToneEd Ver1.00. The unused parameters are (1) to (9) in the table, and their contents are as follows.
 number
 Name
 Contents
 (1)
 KEYONEX
 Key ON execution (written by driver)
 (2)
 KEYONB
 Key ON, Key OFF registration (written by driver)
 (3)
 SBCTL
 Source bit control (written by driver)
 (4)
 SSCTL
 Control of sound source (written by driver)
 (5)
 LSLNK
 Loopstart link (written by driver)
 (6)
 STWINH
 Stack write protection (written by driver)
 (7)
 SDIR
 Sound Direct (written by driver)
 (8)
 OCT
 Octave (written by driver)
 (9)
 FNS
 Frequency number switch (written by driver)

◆Waveform part format
The waveform format stores waveforms arranged in a predetermined waveform order.
There is no header part, it is pure audio data.
All playback information, waveform addresses, etc. are stored in layers.

┌─────────────────┐
│ Waveform data 1 │
├─────────────────┤
│ Waveform data 2 │
├─────────────────┤
│ Waveform data 3 │
├─────────────────┤
│        :        │
├─────────────────┤
│        :        │
├─────────────────┤
│ Waveform data X │
└─────────────────┘

Back | ■
SOUND ManualTone Editor User's Manual/
Copyright SEGA ENTERPRISES, LTD., 1997