Creates an instance of QM816
Defines channel control flags.
Defines channel parameter numbers, within the unregistered namespace.
Defines channel parameters within the registered namespace
Defines global parameter nummbers, within the unregistered namespace
Defines control values
Defines operator parameter numbers, within the unregistered namespace.
Returns the list of internal waveform IDs if there are any.
Returns the names of the internal waveforms if there are any.
Returns all the possible parameters this module has.
Returns the waveform data from the
Returns the format of the selected waveform
Returns the available waveform ID list
Implements a key-off event.
Implements a key-on event.
MIDI 2.0 data received here.
Sets the module up.
Recalls a program
Reads the given value (int).
Reads the given value (int).
Reads the given value (int).
Reads the given value (int).
Renders the current audio frame.
Sets the given HPF with the given value.
Sets the given LPF with the given value.
Sets the channel delegates
Sets a registered parameter
Sets an unregistered parameter (MIDI 2.0)
Implements system exclusive command handling.
Algorithm Mode 0/0 (Serial)
Algorithm Mode 0/1 (Parallel)
Dummy algorithm for combined channels
Updates an operator for a cycle chCtrl index notation: 0: velocity, 1: modulation wheel, 2: Amplitude LFO, 3: Extra Envelop Generator Returns the sum of the level control values for use with the resonant mode
Updates automatic and manual pitchbend values (channel-assignable envelop, LFO, pitchbend CTRL) for 2 operators.
Updates automatic and manual pitchbend values (channel-assignable envelop, LFO, pitchbend CTRL) for 4 operators.
Receives waveform data that has been loaded from disk for reading. Returns zero if successful, or a specific errorcode.
Restores a parameter to the given preset. Returns an errorcode on failure.
Restores a parameter to the given preset. Returns an errorcode on failure.
Restores a parameter to the given preset. Returns an errorcode on failure.
Restores a parameter to the given preset. Returns an errorcode on failure.
Generates a pulse wave.
Generates a waveform from a sinewave fragment (quarter).
Generates a triangular waveform. shape controls the shape of the triangular waveform, allowing it to be morphed between triangle, saw, and ramp. `
Contains a table to calculate Attack, Decay, and Release values.
Macro for channel update constants that need to be calculated once per frame Kept in at one place to make updates easier and more consistent
Macro for channel update constants that need to be calculated once per frame, for combined channels' second half Kept in at one place to make updates easier and more consistent
Macro for channel update constants that need to be calculated for each cycle Kept in at one place to make updates easier and more consistent
Macro for channel update constants that need to be calculated for each cycle for combined channels' second half Kept in at one place to make updates easier and more consistent
Macro for output mixing
Macro for output mixing in case of combo modes
Used for quick resampling of the 55.125/60kHz output to 44.1/48kHz, based on Cubic Lagrange interpolation.
Contains a table to calculate Sustain control values.
Stores channel controller values (modwheel, velocity, etc.)
Defines channel common parameters.
Implements a single operator.
Defines a preset.
Amplitude LFO buffer. Values are between 0.0 and 1.0
ALFO filter y[n-1] ALFO filter factor 0 to 1 ALFO frequency
Stores ALFO position
Stores ALFO rate
Bank numbers per channels.
Used as a keepsake for MIDI 1.0 control change values.
Channel control data.
Channel update delegates
Channel data. See rendering function on updating.
Dummy buffer Only used if one or more outputs haven't been defined
Stores control values of the output values. Layout: [LF, LQ, RF, RQ, AF, AQ, BF, BQ]
High pass filter, after interpolation filter.
Stores high-pass filter control values
Initial mixing buffers Output is directed there before filtering and resampling Layout is: LRAB
Internal buffer sizes
Internal sampling frequency
Keeps the registered/unregistered parameter positions (LSB = 1). Stores LFO waveform selection. 0: Pitch; 1: Amplitude/Ringmod (if bit 7 is set)
Low pass filter, before interpolation filter.
Mixdown value. Used for final mixing.
Operator data. See rendering function on updating.
Current frequency of PLFO
Pitch LFO output. Values are between -1.0 and 1.0
Stores PLFO position
Stores PLFO rate
Stores temporary parameter values 0: MSB of sel unregistered param 1: LSB of sel unregistered param 2: MSB of sel registered param 3: LSB of sel registered param
Preset numbers per channels.
Stores presets. 8 banks of 128 presets are available for a total of 1024. If a channel combination is being used, then bank pairs (0-1, 2-3, etc) will store their primary and secondary halves, and calling either will load both halves.
SysEx command buffer [0-30] + length [31]
Contains the wavetables for the operators and LFOs. Loaded from a 16 bit wave file. Full range is used for extra precision.
Contains all data related to module info.
The size of the output buffers (must kept as a constant)
The sample rate that the audio subsystem runs at
Basic info about the plugin
The main audio handler, also MIDI outs can be passed there
List of enabled input channel numbers
List of enabled output channel numbers
A delegate where MIDI messages are being routed
Returns the basic informations about this module.
Returns the current sample rate.
Sets the module up.
MIDI 2.0 data received here.
Renders the current audio frame.
Receives waveform data that has been loaded from disk for reading. Returns zero if successful, or a specific errorcode.
Creates a new waveform from an existing one using slicing.
Returns the waveform data from the
Returns the format of the selected waveform
Returns the available waveform ID list
Returns the list of internal waveform IDs if there are any.
Returns the names of the internal waveforms if there are any.
Restores a parameter to the given preset. Returns an errorcode on failure.
Restores a parameter to the given preset. Returns an errorcode on failure.
Restores a parameter to the given preset. Returns an errorcode on failure.
Restores a parameter to the given preset. Returns an errorcode on failure.
Returns all the possible parameters this module has.
Reads the given value (int).
Reads the given value (int).
Reads the given value (int).
Reads the given value (int).
QM816 - implements a Quadrature-Amplitude synthesizer. This technique was used in early digital FM synths, since it allowed allowed a cheap implementation of the same thing as long as the modulator was a sinusoidal waveform.
It has 16 2 operator channels that can be individually paired-up for 4 operator channels, for more complex sounds. Also all operators have the option for feedback, including carriers. 2 operator channels have 2, 4 operator channels have 3*4 algorithms.
The audio module generates a few default waveforms upon startup, but further ones can be supplied from files, or generated by code. Some waveform generation code is already supplied with the synth's code.
To do: Implement glissando/legato support. Maybe replace the interpolation filter later on.