Classes and Structures
Class: SYNTHESIZER
(AUDIO-RENDERER
)
A SoundFont synthesizer. This class is not actually exported from the
CL-MELTYSYNTH
package since it is intended to be opaque. Instances of this class should always be created using the generic functionMAKE-SYNTHESIZER
.Note that this class does not provide thread safety. If you wish to send notes and render the waveform in separate threads, you must ensure that the related methods/functions will not be called simultaneously.
Available slot readers (these must be set using the
SYNTHESIZER-SETTINGS
class):
SYNTH-MAXIMUM-POLYPHONY
synthesizer -> t/max-polyphonySYNTH-EFFECTS
synthesizer -> t/effect-listSYNTH-INTERPOLATION-MODE
synthesizer -> t/interpolation-modeSYNTH-REVERB-TYPE
synthesizer -> t/reverb-typeSYNTH-REVERB-UNIT
synthesizer -> (or null schroeder-reverb zita-reverb)SYNTH-REVERB-SEND
synthesizer -> t/channel-effect-sendSYNTH-CHORUS-SEND
synthesizer -> t/channel-effect-sendSYNTH-INST-REVERB-OVERRIDE
synthesizer -> (or null t/instrument-overrideSYNTH-INST-CHORUS-OVERRIDE
synthesizer -> (or null t/instrument-overrideAvailable slot accessors are: *
SYNTH-MAIN-VOLUME
synthesizer -> t/main-volume *(SETF SYNTH-MAIN-VOLUME)
t/main-volume synthesizer
Class: SYNTHESIZER-SETTINGS
This class is used to set various parameters of the
SYNTHESIZER
class. Instances of this class should always be created using theMAKE-SYNTHESIZER-SETTINGS
function.Available slot accessors (all
SETF
-able) are:
SYNTH-SETTING-SAMPLE-RATE
synthesizer-settings -> t/sample-rateSYNTH-SETTING-MAX-POLYPHONY
synthesizer-settings -> t/max-polyphonySYNTH-SETTING-EFFECTS
synthesizer-settings -> t/effect-listSYNTH-SETTING-REVERB-SEND
synthesizer-settings -> t/channel-effect-sendSYNTH-SETTING-CHORUS-SEND
synthesizer-settings -> t/channel-effect-sendSYNTH-SETTING-INST-REVERB-OVERRIDE
synthesizer-settings -> t/instrument-overrideSYNTH-SETTING-INST-CHORUS-OVERRIDE
synthesizer-settings -> t/instrument-overrideSYNTH-SETTING-ENABLE-PRESET-REMAPPING-P
synthesizer-settings -> booleanSYNTH-SETTING-INTERPOLATION-MODE
synthesizer-settings -> t/interpolation-modeSYNTH-SETTING-REVERB-TYPE
synthesizer-settings -> t/reverb-typeSYNTH-SETTING-MAIN-VOLUME
synthesizer-settings -> t/main-volume
Function: MAKE-SYNTHESIZER-SETTINGS
&key lots of keywords -> synthesizer-settings
Used to construct a
SYNTHESIZER-SETTINGS
instance. All slots can be set using this function, which will be checked for valid values.
Generic Function: MAKE-SYNTHESIZER
[soundfont] [settings] -> synthesizer
Creates a new
SYNTHESIZER
instance and initializes it with the given settings.
SOUNDFONT
can be either aSTRING
,PATHNAME
, or aSOUNDFONT
instance.
SETTINGS
can be one of the following:
- An integer specifying the sample rate
- A
SYNTHESIZER-SETTINGS
instance containing settings for the new synthesizer
Function: SYNTH-PROCESS-MIDI-MESSAGE
synthesizer (unsigned-byte 8) (unsigned-byte 8) (unsigned-byte 8) (unsigned-byte 8)
Processes a MIDI message with the given synthesizer.
Function SYNTH-NOTE-OFF
synthesizer (unsigned-byte 8) fixnum
Stops a note on the given channel.
Function SYNTH-NOTE-ON
synthesizer (unsigned-byte 8) (unsigned-byte 8) (unsigned-byte 8)
Starts playing a note on the given channel with the given velocity.
Function SYNTH-NOTE-OFF-ALL
synthesizer [immediate?] &optional [channel]
Stops all notes that are currently playing. If
IMMEDIATE?
is truthy, then notes will stop immediately without processing their release envelopes. A specific channel (an(UNSIGNED-BYTE 8)
) can optionally be specified, otherwise this operates on all channels.
Function SYNTH-RESET-ALL-CONTROLLERS
synthesizer &optional [channel]
Resets all of the controllers. If a channel is specified (an
(UNSIGNED-BYTE 8)
), then the controllers are only reset on that channel, otherwise they are reset on all of them.
Function SYNTH-RESET
synthesizer
Resets the synthesizer. This resets all voices, all channels, and (when enabled) mutes the chorus and reverb. This also resets the default channel reverb/chorus values to the value returned by
SYNTH-REVERB-SEND
andSYNTH-CHORUS-SEND
.