EXAMPLE ATTACK FUNCTION TABLE
Level
Partial #l
Partial #2
Partial #3
2nd BP time
20 mS
14
11
8
Highest level
-6 dB
0 dB
-13 dB
-26 dB
- -
-12 dB
0 dB
-16 dB
-32 dB
Lowest level
-95.6 dB
0 dB
-16 dB
-35 dB
(Read out row-wise)
1.4 RELEASE SLOPES
Assuming that the Ignore Release model parameter flag is off (see 1.6 below), receipt of a MIDI note-off should cause the
sound to enter its release phase. The release shape of each contour is quite simple: a linear decrease in amplitude from
whatever amplitude the partial was at when the note-off was received to silence. Assuming that the Global Release model
parameter flag is off, each partial can have a different release slope. These slopes are specified in a vector having as many
entries as there are partials. After a note-off, a partial does not become available for reuse by other notes until it has decayed
to silence. An exception would be a restrike of the same note which could immediately reuse its partials.
1.5 UNITS AND ENCODING
The actual binary encoding of the vectors and arrays described above is largely set by the hardware implementation of the
sound generator and to a lesser extent by what is convenient (and therefore fast) for the 68000 control microprocessor. Data
in the arrays are 8 bits in some cases and 16 bits in others. 8-bit quantities are always unsigned integers whereas 16 bit
quantities are always signed, twos-complement integers.
In most cases, the units used to encode time variables into integers are based on the sample rate of the sound generator. This
rate is exactly 19531.25Hz which is exactly equal to a 51.2 uS period. It is derived in the hardware by dividing a 20MHz
clock by 1024. Frequency units are based on the highest standard frequency the sound generator is programmed to produce
which is D9 (A4=440Hz) or 9397.273Hz. Amplitude units are based on a dynamic range of 95.625dB.
1.5.1 Time Units
The Wait command described earlier has a time argument which is a sound generator sample count. It is a signed 16-bit
quantity and thus limited to 32767 which is about 1678 milliseconds. If a wait time longer than this is needed, two or more
Wait commands in a row should be used. In such a string of wait commands, the last one should be checked for very small
values (less than 20). If found, the needed time should be split evenly between the last two Wait commands. For example, if
a wait of 32775 samples is needed, use Wait commands of 16387 and 16388 instead of 32767 and 8.
Time units in the Attack Function table are given in "milliseconds" (the earliest second breakpoint) and codes representing
"milliseconds" (actual second breakpoint times). The "millisecond" units used are actually 1.024 mS long as determined by a
timer chip counting units of 20 samples.
1.5.2 Frequency Units
Frequencies and frequency ratios are always expressed on a log scale which has 2048 integer units per octave. The frequency
of an absolute partial for example is expressed relative to the highest possible frequency of 9397.273Hz. Thus a frequency 3
octaves below this (9397.273 / 8 = 1174.659125Hz) would be expressed as -6144. General conversion formulas are:
Value = 2954.6394 * ln
(
)
Hertz 9397.273
Hertz = 9397.273 * exp
(
)
Value 2954.6394