Login
Audio Rendering
Login

Classes and Structures

Class: AUDIO-RENDERER

This is a mixin class for anything that can be used to render audio. Known subclasses are SYNTHESIZER and MIDI-FILE-SEQUENCER. Classes that inherit AUDIO-RENDERER are able to call the RENDER and RENDER-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 using RENDERER, which must inherit the AUDIO-RENDERER mixin class. The CHANNELS and FORMAT parameters dictate the expected output format. This returns T if the song is not finished, or if the sequencer is set to loop. Otherwise this returns NIL 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 to DEST.

Possible values for CHANNELS are:

  • :STEREO-INTERLEAVED - Stereo sound
  • :MONO - Monaural sound

Possible 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 and RIGHT. This returns T if the song is not finished, or if the sequencer is set to loop. Otherwise this returns NIL when he song is finished.

In most cases, you want to use RENDER instead of this generic function.