EXOS 2.1 Sound Driver Specification

4. Sound Production

To actually produce a sound an escape sequence must be sent which defines the sound. The format of this is:

      esc S env p vl vr sty ch d f

The meanings of these fields are :

env - 8bits. Envelope to use for this sound.

An envelope number of 255 will produce a "beep" type sound which is of constant amplitude and pitch for the duration of the sound.

p - 16 bits. Starting pitch of sound in 1/512 semitones.

Only exact quartertones will necessarily be musically correct. The others are generated by linear interpolation. Ignored for noise channel.

vl - 8 bits. Overall left amplitude (0...255)
vr - 8 bits. Overall right amplitude (0...255)

sty - 8 bits. Sound style byte.

For the noise channel, this byte is put into the noise control register for the duration of the sound.
For a tone channel the top four bits are put into the four sound control bits in the sound frequency register for that channel, they thus control filtering, distortion and ring modulation.
Zero gives a pure tone or white noise.
See separate DAVE chip specification for meaning of each bit in these registers.

ch - 8 bits. Source for this sound

0, 1 or 2 for the appropriate tone channel and 3 for the noise channel.

d - 16 bits. Duration of this sound in ticks.
f - 8 bits. Flags byte

b0..b1
SYNC count for this sound, see later section on synchronisation.
b2..b6
Not used, should be zero.
b7
Set to force override of any sound in queue for this channel, clear to make sound wait its turn.

When a sound is received it is added to the end of the appropriate queue (killing the queue first if bit 7 of the flags byte is set). If the queue is full then there are two courses of action which depend on the state of the EXOS variable WAIT_SND. If this is zero then the sound driver will just wait until there is space in the sound queue, testing the stop key to allow it to be interrupted. If this EXOS variable is non­zero then it will return an error code (.SQFUL) to the user.


Next Chapter: Processing of Sounds.



David Bouman. (dsbouma@cs.vu.nl)