Jump to content

Projects/knight/audio

From ourproject.org wiki

Sound on the knight platform is generated by one of two methods:

Pulse-code modulation audio "PCM"

or

Programmable Sound Generator chip "SGC"

PCM:

Supports 4 output channels with 8 voices each.

Each voice can be 8, 16, 24 or 32 bit PCM and at 0-192 kHz

Voices 0-7 are dedicated to Analog line level audio output for the main stereo signal (front speakers or headphones)

Voices 8-15 are dedicated to Analog line level audio output for a special panning,'Right-to-left speaker'.

Voices 16-23 are dedicated to Analog line level audio output for surround speakers, typically rear stereo.

Voices 24-31 are dedicated to Analog line level audio output for center channel speaker and subwoofer

Each voice has the following:



pointer to PCM data [Register word sized]
Int32 sample rate
Int8 PCM bit size
Pointer to end of PCM data [Register word sized]


SGC:

16 separately programmable independent audio oscillators 10 Hz to 20,000 Hz

6 different waveforms per audio oscillator (Sine, square, triangle, sawtooth, reverse sawtooth and white noise)

attack/decay/sustain/release (ADSR) volume controls, one for each audio oscillator. (8 bits each, e^n)

Tremolo (On or off)

Vibrato (On or off)

Sustain (On or off)

16 ring modulators.

oscillator sync for each audio oscillator.

Each oscillator has the following:



Int16 frequency
Int8 waveform, ADSR selection
Int8 ADSR magnitude (n)
Int8 oscillator sync, vibrato and tremolo