Classes and Structures
Class: AUDIO-RENDERER
This is a mixin class for anything that can be used to render audio. Known subclasses are
SYNTHESIZER
andMIDI-FILE-SEQUENCER
. Classes that inheritAUDIO-RENDERER
are able to call theRENDER
andRENDER-AUDIO
methods and are expected to, somehow, render blocks of audio.You should never have to create an
AUDIO-RENDERER
instance. Always create an instance one of the classes that inherit it instead.
Generic Function: RENDER
[renderer] [channels] [format] [dest] -> boolean
Renders audio to
DEST
usingRENDERER
, which must inherit theAUDIO-RENDERER
mixin class. TheCHANNELS
andFORMAT
parameters dictate the expected output format. This returnsT
if the song is not finished, or if the sequencer is set to loop. Otherwise this returnsNIL
when he song is finished.Internally, this sets up temporary buffers for the left and right channels, calls
RENDER-AUDIO
to render to them, then writes the results toDEST
.Possible values for
CHANNELS
are:
:STEREO-INTERLEAVED
- Stereo sound:MONO
- Monaural soundPossible values for
FORMAT
are:
:FLOAT32
- 32-bit floating point samples:SINT24-LE
- Signed 24-bit little endian integer samples:SINT16-LE
- Signed 16-bit little endian integer samples:SINT8-LE
- Signed 8-bit little endian integer samples
Generic Function: RENDER-AUDIO
[renderer] [left-buffer] [right-buffer]
Renders audio to
LEFT
andRIGHT
. This returnsT
if the song is not finished, or if the sequencer is set to loop. Otherwise this returnsNIL
when he song is finished.In most cases, you want to use
RENDER
instead of this generic function.