SynthLab SDK
|
Functions | |
double | SynthLab::midi14_bitToBipolar (uint32_t midiDataLSB, uint32_t midiDataMSB) |
Converts MIDI data bytes 1 and 2 (14-bit) into a bipolar [-1, +1] value. More... | |
uint32_t | SynthLab::midi14_bitToUnipolarInt (uint32_t midiDataLSB, uint32_t midiDataMSB) |
Converts MIDI data bytes 1 and 2 (14-bit) into a unipolar value 0 -> 16383. More... | |
double | SynthLab::midi14_bitToUnipolarDouble (uint32_t midiDataLSB, uint32_t midiDataMSB) |
Converts MIDI data bytes 1 and 2 (14-bit) into a unipolar double value 0.0 -> 1.0. More... | |
double | SynthLab::midi14_bitToDouble (uint32_t midiDataLSB, uint32_t midiDataMSB, double minValue, double maxValue) |
Converts MIDI data bytes 1 and 2 (14-bit) into a double value on the range [minValue, maxValue]. More... | |
void | SynthLab::unipolarIntToMIDI14_bit (uint32_t unipolarValue, uint32_t &midiDataLSB, uint32_t &midiDataMSB) |
Converts value from 0 -> 16383 into 14-bit MIDI bytes, pass by reference. More... | |
void | SynthLab::bipolarIntToMIDI14_bit (int32_t biPolarValue, int32_t minValue, int32_t maxValue, uint32_t &midiDataLSB, uint32_t &midiDataMSB) |
Converts int value on the range [minValue, maxValue] into 14-bit MIDI bytes, pass by reference. More... | |
void | SynthLab::unipolarDoubleToMIDI14_bit (double unipolarValue, uint32_t &midiDataLSB, uint32_t &midiDataMSB) |
Converts double value on the range [0, 1] into 14-bit MIDI bytes, pass by reference. More... | |
double | SynthLab::midiPitchBendToBipolar (uint32_t midiData1, uint32_t midiData2) |
Converts MIDI data bytes 1 and 2 into a bipolar [-1, +1] value. More... | |
uint32_t | SynthLab::midiNoteNumberFromOscFrequency (double oscillatorFrequency, double frequencyA440=440.0) |
use lookup table to find pitch shift multipliers, uses linear interpolation More... | |
double | SynthLab::midiNoteNumberToOscFrequency (uint32_t midiNoteNumber, double frequencyA440=440.0) |
converts a MIDI note number into a corresponding oscillator frequency in Hz More... | |
double | SynthLab::mmaMIDItoAtten (uint32_t midiValue) |
calculates the raw attenuation according to MMA DLS spec midiValue = the MIDI (0 -> 127) value to convert More... | |
double | SynthLab::calculatePitchBend (IMidiInputData *midiInputData) |
Second method to calculate a pitch bend multiplier value based on the global MIDI input values: More... | |
double | SynthLab::calculateMasterTuning (IMidiInputData *midiInputData) |
Method to calculate a tuning (pitch bend) multiplier value based on the global MIDI input values: More... | |
void | SynthLab::initDMConfig (std::shared_ptr< MidiInputData > midiInputData, DMConfig *config) |
Initializes the MIDI aux data with configuration information; for DM only. More... | |
void | SynthLab::initMIDIInputData (std::shared_ptr< MidiInputData > midiInputData) |
Initializes the MIDI input data arrays with values that prevent the synth from appearing to be malfunctioning. This includes bringing volume controls up to unity gain (max output) and pan to the center as well as setting pitch bend range and overall tuning (known as master volume and master tuning in the MMA documentation) More... | |
|
inline |
Converts int value on the range [minValue, maxValue] into 14-bit MIDI bytes, pass by reference.
biPolarValue | value to convert |
minValue | minimum value of input range |
maxValue | maximum value of input range |
midiDataLSB | returned MIDI LSB (7 bits are valid) |
midiDataMSB | returned MIDI MSB (7 bits are valid) |
|
inline |
Method to calculate a tuning (pitch bend) multiplier value based on the global MIDI input values:
midiInputData | MIDI input data array as a naked pointer |
|
inline |
Second method to calculate a pitch bend multiplier value based on the global MIDI input values:
midiInputData | MIDI input data array as a naked pointer |
|
inline |
Initializes the MIDI aux data with configuration information; for DM only.
midiInputData | shared pointer to MIDI input data array |
|
inline |
Initializes the MIDI input data arrays with values that prevent the synth from appearing to be malfunctioning. This includes bringing volume controls up to unity gain (max output) and pan to the center as well as setting pitch bend range and overall tuning (known as master volume and master tuning in the MMA documentation)
midiInputData | shared pointer to MIDI input data array |
|
inline |
Converts MIDI data bytes 1 and 2 (14-bit) into a bipolar [-1, +1] value.
midiDataLSB | MIDI LSB (7 bits are valid) |
midiDataMSB | MIDI MSB (7 bits are valid) |
|
inline |
Converts MIDI data bytes 1 and 2 (14-bit) into a double value on the range [minValue, maxValue].
midiDataLSB | MIDI LSB (7 bits are valid) |
midiDataMSB | MIDI MSB (7 bits are valid) |
minValue | minimum mapped value |
maxValue | maximum mapped value |
|
inline |
Converts MIDI data bytes 1 and 2 (14-bit) into a unipolar double value 0.0 -> 1.0.
midiDataLSB | MIDI LSB (7 bits are valid) |
midiDataMSB | MIDI MSB (7 bits are valid) |
|
inline |
Converts MIDI data bytes 1 and 2 (14-bit) into a unipolar value 0 -> 16383.
midiDataLSB | MIDI LSB (7 bits are valid) |
midiDataMSB | MIDI MSB (7 bits are valid) |
|
inline |
use lookup table to find pitch shift multipliers, uses linear interpolation
semitones | the number of semitones to pitch shift (fractional) |
converts an oscillator frequency in Hz to the corresponding MIDI note number
oscillatorFrequency | frequency in Hz to convert |
frequencyA440 | reference frequency of concert-A |
|
inline |
converts a MIDI note number into a corresponding oscillator frequency in Hz
midiNoteNumber | note number to convert |
frequencyA440 | reference frequency of concert-A |
|
inline |
Converts MIDI data bytes 1 and 2 into a bipolar [-1, +1] value.
midiData1 | LSB |
midiData2 | MSB |
|
inline |
calculates the raw attenuation according to MMA DLS spec midiValue = the MIDI (0 -> 127) value to convert
midiValue | the MIDI velocity value |
|
inline |
Converts double value on the range [0, 1] into 14-bit MIDI bytes, pass by reference.
unipolarValue | value to convert |
midiDataLSB | returned MIDI LSB (7 bits are valid) |
midiDataMSB | returned MIDI MSB (7 bits are valid) |
|
inline |
Converts value from 0 -> 16383 into 14-bit MIDI bytes, pass by reference.
unipolarValue | value to convert |
midiDataLSB | returned MIDI LSB (7 bits are valid) |
midiDataMSB | returned MIDI MSB (7 bits are valid) |