|
SynthLab SDK
|
Functions | |
| double | SynthLab::doLinearInterp (double y1, double y2, double fractional_X) |
| performs linear interpolation of fractional x distance between two adjacent (x,y) points; returns interpolated value More... | |
| void | SynthLab::copyOutputToInput (std::shared_ptr< AudioBuffer > source, std::shared_ptr< AudioBuffer > destination, uint32_t channel, uint32_t samplesToCopy) |
| copies an output audio buffer to an input audio buffer More... | |
| void | SynthLab::copyOutputToOutput (std::shared_ptr< AudioBuffer > source, std::shared_ptr< AudioBuffer > destination, uint32_t channel, uint32_t samplesToCopy) |
| copies an output audio buffer to another output audio buffer More... | |
| void | SynthLab::copyOutputToOutput (std::shared_ptr< AudioBuffer > source, SynthProcessInfo &destination, uint32_t channel, uint32_t samplesToCopy) |
| copies an output audio buffer to the SynthProcessInfo audio output buffer More... | |
| void | SynthLab::copyBufferToInput (std::shared_ptr< AudioBuffer > source, std::shared_ptr< AudioBuffer > destination, uint32_t channel, uint32_t samplesToCopy) |
| copies an output audio buffer to an input audio buffer More... | |
| void | SynthLab::copyAudioBufferOutputToSynthOutput (std::shared_ptr< AudioBuffer > source, SynthProcessInfo &destination, uint32_t channel, uint32_t samplesToCopy) |
| copies an output audio buffer to the SynthProcessInfo audio output buffer More... | |
| void | SynthLab::copySynthOutputToAudioBufferInput (SynthProcessInfo &source, std::shared_ptr< AudioBuffer > destination, uint32_t channel, uint32_t samplesToCopy) |
| Complementary function that moves audio from the SynthProcessInfo output into an audio buffer. More... | |
| double | SynthLab::normToLogNorm (double normalizedValue) |
| normalized to Log-normalized version More... | |
| double | SynthLab::logNormToNorm (double logNormalizedValue) |
| log-normalized to normalized version More... | |
| double | SynthLab::normToAntiLogNorm (double normalizedValue) |
| normalized to anti-log normalized version More... | |
| double | SynthLab::antiLogNormToNorm (double aLogNormalizedValue) |
| anti-log normalized to normalized version More... | |
| double | SynthLab::getModKnobValueLinear (double normalizedValue, double min, double max) |
| maps a mod-knob value on the range of [0.0, 1.0] to a number on the range [min, max] More... | |
| double | SynthLab::getModKnobValueLog (double normalizedValue, double min, double max) |
| maps a mod-knob value on the range of [0.0, 1.0] to a number on the range [min, max] logarithmically More... | |
| double | SynthLab::getModKnobValueAntiLog (double normalizedValue, double min, double max) |
| maps a mod-knob value on the range of [0.0, 1.0] to a number on the range [min, max] anti-logarithmically More... | |
| double | SynthLab::msecToSamples (double sampleRate, double timeMSec) |
| convert a time in milliseconds to a floating point sample count More... | |
| void | SynthLab::clampMaxValue (double &value, double maxValue) |
| Bound a value to max limits. More... | |
| void | SynthLab::clampMinValue (double &value, double minValue) |
| Bound a value to min limits. More... | |
| void | SynthLab::boundValue (double &value, double minValue, double maxValue) |
| Bound a value to min and max limits. More... | |
| void | SynthLab::boundUIntValue (uint32_t &value, uint32_t minValue, uint32_t maxValue) |
| Bound a uint32_t value to min and max limits. More... | |
| void | SynthLab::boundIntValue (int32_t &value, int32_t minValue, int32_t maxValue) |
| Bound an int32_t value to min and max limits. More... | |
| void | SynthLab::boundValueUnipolar (double &value) |
| Bound a value to [0, +1]. More... | |
| void | SynthLab::boundValueBipolar (double &value) |
| Bound a value to [-1, +1]. More... | |
| void | SynthLab::boundMIDIValueByte (uint32_t &value) |
| Bound a value to 0 and 127 limits. More... | |
| void | SynthLab::boundMIDIValueDoubleByte (uint32_t &value) |
| Bound a value to min and max limits. More... | |
| void | SynthLab::mapDoubleValue (double &value, double min, double max, double minMap, double maxMap) |
| map double on a range of (min, max) to the same double on the range of (minMap, maxMap) More... | |
| void | SynthLab::mapDoubleValue (double &value, double min, double minMap, double slope) |
| map double on a range of (min, max) to the same double on the range of (minMap, maxMap) using a pre-calculated slope variable where: More... | |
| void | SynthLab::mapIntValue (int &value, int min, int max, int minMap, int maxMap, bool roundValue=true) |
| map int on a range of (min, max) to the same int on the range of (minMap, maxMap) More... | |
| void | SynthLab::mapUintValue (uint32_t &value, uint32_t min, uint32_t max, uint32_t minMap, uint32_t maxMap, bool roundValue=true) |
| map unsigned int on a range of (min, max) to the same unsigned int on the range of (minMap, maxMap) More... | |
| uint32_t | SynthLab::mapDoubleToUINT (double value, double min, double max, uint32_t minMap, uint32_t maxMap, bool roundValue=false) |
| map double on a range of (min, max) to a uint32_t on the range of (minMap, maxMap) More... | |
| double | SynthLab::mapUINTToDouble (uint32_t value, uint32_t min, uint32_t max, double minMap, double maxMap) |
| map uint32_t on a range of (min, max) to a double on the range of (minMap, maxMap) More... | |
| double | SynthLab::raw2dB (double raw) |
| calculates dB for given input More... | |
| double | SynthLab::dB2Raw (double dB) |
| converts dB to raw value More... | |
| double | SynthLab::peakGainFor_Q (double Q) |
| calculates the peak magnitude for a given Q More... | |
| double | SynthLab::dBPeakGainFor_Q (double Q) |
| calculates the peak magnitude in dB for a given Q More... | |
| double | SynthLab::sgn (double xn) |
| calculates sgn( ) of input More... | |
| double | SynthLab::calcWSGain (double xn, double saturation, double asymmetry) |
| calculates gain of a waveshaper More... | |
| double | SynthLab::atanWaveShaper (double xn, double saturation) |
| calculates arctangent waveshaper More... | |
| double | SynthLab::tanhWaveShaper (double xn, double saturation) |
| calculates hyptan waveshaper More... | |
| double | SynthLab::softClipWaveShaper (double xn, double saturation) |
| calculates hyptan waveshaper More... | |
| double | SynthLab::fuzzExp1WaveShaper (double xn, double saturation, double asymmetry) |
| calculates fuzz exp1 waveshaper More... | |
| void | SynthLab::copyStingList (std::vector< std::string > &source, std::vector< std::string > &destination) |
| Copies one vector of strings to another. More... | |
| std::string | SynthLab::concatStrings (std::string s1, std::string s2) |
| Concatenate two strings. More... | |
| void | SynthLab::ReplaceSubStrWithStr (std::string &str, const std::string &from, const std::string &to) |
| Helper to relace strings within a std::string object. More... | |
| void | SynthLab::stripLastFolderFromPath (std::string &str) |
| Helper to strip the last folder path from a given path. More... | |
| void | SynthLab::getPluginContainerFolder (std::string &str) |
| Helper to get the outer plugin folder with the inner folder path. More... | |
| double | SynthLab::doLinearInterpolation (double x1, double x2, double y1, double y2, double x) |
| performs linear interpolation of x distance between two (x,y) points; returns interpolated value More... | |
| double | SynthLab::doLinearInterpolation (double y1, double y2, double fractional_X) |
| performs linear interpolation of fractional x distance between two adjacent (x,y) points; returns interpolated value More... | |
| double | SynthLab::doLagrangeInterpolation (double *x, double *y, int n, double xbar) |
| implements n-order Lagrange Interpolation More... | |
| double | SynthLab::calculateWaveTablePhaseInc (double oscFrequency, double sampleRate, uint32_t wavetableLength) |
| calculates the phase-increment for a wavetable for a target oscillator frequency More... | |
| bool | SynthLab::checkAndWrapWaveTableIndex (double &index, uint32_t tableLength) |
| check and do modulo (fmod) wrap of a wavetable index value More... | |
| int | SynthLab::countTrailingZero (int x) |
| count trailing zeros in a binary number More... | |
| uint64_t | SynthLab::countTrailingZeros_x64 (uint64_t x) |
| count trailing zeros in a binary number, return in unsigned int More... | |
| void | SynthLab::calculatePanValues (double bipolarModulator, double &leftPanValue, double &rightPanValue) |
| calculates the left and right pan values from a bipolar (-1 -> 1) value More... | |
| void | SynthLab::calculateConstPwrMixValues (double bipolarModulator, double &mixValueA, double &mixValueB) |
| converts bipolar (-1 -> 1) value into a pair of constant power mixing coefficients More... | |
| double | SynthLab::crossfade (XFadeType xfadeType, double inputA, double inputB, double xFrac) |
| crossfade two values And B together by some fractional amount More... | |
| double | SynthLab::semitonesBetweenFrequencies (double startFrequency, double endFrequency) |
| calculates the number of semitones between a start and end frequency More... | |
| double | SynthLab::getTimeFromTempo (double BPM, NoteDuration duration, bool returnMilliseconds=false) |
| converts a BPM value and a NoteDuration into a time More... | |
| double | SynthLab::getTimeFromTempo (double BPM, double normalizedNoteMult) |
| converts a BPM value and a normalized note multiplier on the range [0, 1] to a note duration multiplier More... | |
| double | SynthLab::quantizeBipolarValue (double d, uint32_t qLevels) |
| Quantizes a double value into some number of quantization levels. More... | |
| uint64_t | SynthLab::doubleToUint64 (double d) |
| maps a double value into a uint64 value without casting or mangling bits More... | |
| double | SynthLab::uint64ToDouble (uint64_t u) |
| maps a uint64 value to a double value without casting or mangling bits More... | |
| uint32_t | SynthLab::floatToUint32 (float f) |
| maps a float value to a uint32_t value without casting or mangling bits More... | |
| float | SynthLab::uint32ToFloat (uint32_t u) |
| maps a uint32_t value to a float value without casting or mangling bits More... | |
| bool | SynthLab::inRange (double low, double high, double x) |
| tests a number to see if it is withing a certain range More... | |
| double | SynthLab::wrapMax (double x, double max) |
| wraps a value around a maximum value enough times that it falls within the maximum boundary More... | |
| double | SynthLab::wrapMinMax (double x, double min, double max) |
| wraps a value around a maximum value enough times that it falls within the maximum boundary More... | |
| std::vector< std::string > | SynthLab::charArrayToStringVector (const char **charArray, uint32_t size, std::string ignoreString="") |
| Converts an old fasioned array of char* strings to a vector of std::strings. More... | |
| bool | SynthLab::appendCharArrayToStringVector (const char **charArray, uint32_t size, std::vector< std::string > &outputVector, std::string ignoreString) |
| Appends an old fasioned array of char* strings to a vector of std::strings. More... | |
| VectorXFadeData | SynthLab::calculateVectorMix (double joystick_X, double joystick_Y, double origin_X=0.0, double origin_Y=0.0) |
| converts a joystick (x,y) position into the four mixing coefficients plus the X/Y axis shaodows More... | |
| double | SynthLab::quadraticSine (double angle) |
| produces the quadratic sine approximation More... | |
| double | SynthLab::BhaskaraISine (double angle) |
| produces the Bhaskara's sine approximation More... | |
| double | SynthLab::parabolicSine (double angle) |
| highest accurace sinudoid approximation function More... | |
| double | SynthLab::calculatePitchBend (std::shared_ptr< MidiInputData > midiInputData) |
| Calculate a pitch bend multiplier value based on the global MIDI input values: More... | |
| uint32_t | SynthLab::calculateNumTables (uint32_t seedMIDINote, uint32_t tableIntervalSemitones) |
| Calculates the number of wavetables needed to cover the MIDI keyboard starting from a seed note, and them progressing up the keyboard by some number of semitones between each table. More... | |
| double | SynthLab::readHexLUT (uint64_t *table, double xn) |
| Read a table that has been encoded as uint64_t HEX values. More... | |
| double | SynthLab::concaveXForm (double xn, bool useLUT=false) |
| Perform the MMA concave tranform on a unipolar value. More... | |
| double | SynthLab::bipolarConcaveXForm (double xn, bool useLUT=false) |
| Perform the MMA concave tranform on a bipolar value. More... | |
| double | SynthLab::reverseConcaveXForm (double xn, bool useLUT=false) |
| Perform the MMA reverse concave tranform on a unipolar value. More... | |
| double | SynthLab::bipolarReverseConcaveXForm (double xn, bool useLUT=false) |
| Perform the MMA reverse concave tranform on a bipolar value. More... | |
| double | SynthLab::convexXForm (double xn, bool useLUT=false) |
| Perform the MMA convex tranform on a unipolar value. More... | |
| double | SynthLab::bipolarConvexXForm (double xn, bool useLUT=false) |
| Perform the MMA convex tranform on a bipolar value. More... | |
| double | SynthLab::reverseConvexXForm (double xn, bool useLUT=false) |
| Perform the MMA reverse convex tranform on a unipolar value. More... | |
| double | SynthLab::bipolarReverseConvexXForm (double xn, bool useLUT=false) |
| Perform the MMA reverse convex tranform on a bipolar value. More... | |
| double | SynthLab::doPolyBLEP_2 (double mcounter, double phaseInc, double height, bool risingEdge) |
| Calculates the 2nd order polynomial BLEP correction factor. More... | |
| double | SynthLab::doBLEP_N (uint32_t tableLength, double modCounter, double phaseInc, double height, bool risingEdge, uint32_t pointsPerSide, bool interpolate=false) |
| Calculates the BLEP correction factor for 1, 2, 3 or 4 points of correction on each side of the waveform discontinuity. More... | |
|
inline |
anti-log normalized to normalized version
| aLogNormalizedValue | log-normalized value |
|
inline |
Appends an old fasioned array of char* strings to a vector of std::strings.
| charArray | the array to append |
| size | length of array |
| outputVector | the vector to append, pass by reference |
| ignoreString | string to ignore and NOT append to the vector |
|
inline |
calculates arctangent waveshaper
| xn | the input value |
| saturation | the saturation control |
|
inline |
produces the Bhaskara's sine approximation
| angle | sine angle |
|
inline |
Perform the MMA concave tranform on a bipolar value.
| xn | the normalized bipolar value to transform |
| useLUT | set to true to use lookup table instead of direct calculation |
|
inline |
Perform the MMA convex tranform on a bipolar value.
| xn | the bipolar value to transform |
| useLUT | set to true to use lookup table instead of direct calculation |
|
inline |
Perform the MMA reverse concave tranform on a bipolar value.
| xn | the bipolar bipolar value to transform |
| useLUT | set to true to use lookup table instead of direct calculation |
|
inline |
Perform the MMA reverse convex tranform on a bipolar value.
| xn | the unipolar value to transform |
| useLUT | set to true to use lookup table instead of direct calculation |
|
inline |
Bound an int32_t value to min and max limits.
| value | to be bound, pass by reference |
| minValue | minimum value of bound |
| maxValue | maximum value of bound |
|
inline |
Bound a value to 0 and 127 limits.
| value | to be bound, pass by reference |
|
inline |
Bound a value to min and max limits.
| value | to be bound, pass by reference |
|
inline |
Bound a uint32_t value to min and max limits.
| value | - value to bound |
| minValue | - lower bound limit |
| maxValue | - upper bound limit |
|
inline |
Bound a value to min and max limits.
| value | - value to bound |
| minValue | - lower bound limit |
| maxValue | - upper bound limit |
|
inline |
Bound a value to [-1, +1].
| value | - value to bound |
|
inline |
Bound a value to [0, +1].
| value | - value to bound |
|
inline |
converts bipolar (-1 -> 1) value into a pair of constant power mixing coefficients
| bipolarModulator | bipolar input value |
| mixValueA | returned channel A coefficient |
| mixValueB | returned channel B coefficient |
|
inline |
Calculates the number of wavetables needed to cover the MIDI keyboard starting from a seed note, and them progressing up the keyboard by some number of semitones between each table.
| seedMIDINote | MIDI the lowest MIDI note with a wavetable |
| tableIntervalSemitones | the interval to skip when counting tables; if this value is 1 then there will be a table on each MIDI note chromatically (semitone); if this value is 3 then there will be a table on each minor third boundary |
|
inline |
calculates the left and right pan values from a bipolar (-1 -> 1) value
| bipolarModulator | bipolar input value |
| leftPanValue | returned left pan multiplier |
| rightPanValue | returned right pan multiplier |
|
inline |
Calculate a pitch bend multiplier value based on the global MIDI input values:
| midiInputData | MIDI input data array as a shared pointer |
|
inline |
converts a joystick (x,y) position into the four mixing coefficients plus the X/Y axis shaodows
| joystick_X | joytick X coordinate |
| joystick_Y | joytick X coordinate |
| origin_X | origin of X axis |
| origin_Y | origin of Y axis |
|
inline |
calculates the phase-increment for a wavetable for a target oscillator frequency
| oscFrequency | target oscillator frequency |
| sampleRate | fs |
| wavetableLength | table length |
|
inline |
calculates gain of a waveshaper
| xn | the input value |
| saturation | the saturation control |
| asymmetry | the degree of asymmetry |
|
inline |
Converts an old fasioned array of char* strings to a vector of std::strings.
| charArray | the array to convert |
| size | length of array |
| ignoreString | string to ignore and NOT add to the vector |
|
inline |
check and do modulo (fmod) wrap of a wavetable index value
| index | modulo counter value, retured with pass-by-reference |
| tableLength | wavetable length in samples |
|
inline |
Bound a value to max limits.
| value | - value to bound |
| maxValue | - upper bound limit |
|
inline |
Bound a value to min limits.
| value | - value to bound |
| minValue | - lower bound limit |
|
inline |
Concatenate two strings.
| s1 | the first string |
| s2 | the second string |
|
inline |
Perform the MMA concave tranform on a unipolar value.
| xn | the normalized value to transform |
| useLUT | set to true to use lookup table instead of direct calculation |
|
inline |
Perform the MMA convex tranform on a unipolar value.
| xn | the unipolar value to transform |
| useLUT | set to true to use lookup table instead of direct calculation |
|
inline |
copies an output audio buffer to the SynthProcessInfo audio output buffer
| source | AudioBuffer whose output is being copied |
| destination | AudioBuffer whose output will receive the copied audio data the channels to copy MONO_TO_MONO, MONO_TO_STEREO, STEREO_TO_STEREO |
| samplesToCopy | size of block to copy |
|
inline |
copies an output audio buffer to an input audio buffer
| source | AudioBuffer whose output is being copied |
| destination | AudioBuffer whose input will receive the copied audio data the channels to copy MONO_TO_MONO, MONO_TO_STEREO, STEREO_TO_STEREO |
| samplesToCopy | size of block to copy |
|
inline |
copies an output audio buffer to an input audio buffer
| source | AudioBuffer whose output is being copied |
| destination | AudioBuffer whose input will receive the copied audio data the channels to copy MONO_TO_MONO, MONO_TO_STEREO, STEREO_TO_STEREO |
| samplesToCopy | size of block to copy |
|
inline |
copies an output audio buffer to another output audio buffer
| source | AudioBuffer whose output is being copied |
| destination | AudioBuffer whose output will receive the copied audio data the channels to copy MONO_TO_MONO, MONO_TO_STEREO, STEREO_TO_STEREO |
| samplesToCopy | size of block to copy |
|
inline |
copies an output audio buffer to the SynthProcessInfo audio output buffer
| source | AudioBuffer whose output is being copied |
| destination | AudioBuffer whose output will receive the copied audio data the channels to copy MONO_TO_MONO, MONO_TO_STEREO, STEREO_TO_STEREO |
| samplesToCopy | size of block to copy |
|
inline |
Copies one vector of strings to another.
| source | the source vector to copy |
| destination | the vector that receives the copy |
|
inline |
Complementary function that moves audio from the SynthProcessInfo output into an audio buffer.
| source | AudioBuffer whose output is being copied |
| destination | AudioBuffer whose output will receive the copied audio data the channels to copy MONO_TO_MONO, MONO_TO_STEREO, STEREO_TO_STEREO |
| samplesToCopy | size of block to copy |
|
inline |
count trailing zeros in a binary number
| x | binary numnber to count trailing zeros |
|
inline |
count trailing zeros in a binary number, return in unsigned int
| x | binary numnber to count trailing zeros |
|
inline |
crossfade two values And B together by some fractional amount
| xfadeType | type of crossfade: linear, square law, cosntant power |
| inputA | value A |
| inputB | value B |
| xFrac | fractional distance between them to mix |
|
inline |
converts dB to raw value
| dB | value to convert to raw |
|
inline |
calculates the peak magnitude in dB for a given Q
| Q | the Q value |
|
inline |
Calculates the BLEP correction factor for 1, 2, 3 or 4 points of correction on each side of the waveform discontinuity.
| tableLength | lenght of the BLEP residual table |
| modCounter | the modulo counter value that is clocking the oscillator |
| phaseInc | counter's phase increment value |
| height | normalized height of the discontinuity to correction |
| risingEdge | true if discontinuity is a rising edge, false if falling edge |
| pointsPerSide | number of points per side to correct |
| interpolate | set true to interpolate BLEP tables |
|
inline |
implements n-order Lagrange Interpolation
| x | Pointer to an array containing the x-coordinates of the input values |
| y | Pointer to an array containing the y-coordinates of the input values |
| n | the order of the interpolator, this is also the length of the x,y input arrays |
| xbar | The x-coorinates whose y-value we want to interpolate |
|
inline |
performs linear interpolation of fractional x distance between two adjacent (x,y) points; returns interpolated value
| y1 | - the y coordinate of the first point |
| y2 | - the 2 coordinate of the second point |
| fractional_X | - the interpolation location as a fractional distance between x1 and x2 (which are not needed) |
|
inline |
performs linear interpolation of x distance between two (x,y) points; returns interpolated value
NOTE** you must ensure that the x coordinates are not identical, x1 != x2 to avoid divide by zero; this code needs to be as efficient as possible So, either make sure programatically or check x1,x2 prior to calling!
| x1 | the x coordinate of the first point |
| x2 | the x coordinate of the second point |
| y1 | the y coordinate of the first point |
| y2 | the 2 coordinate of the second point |
| x | the interpolation location |
|
inline |
performs linear interpolation of fractional x distance between two adjacent (x,y) points; returns interpolated value
| y1 | the y coordinate of the first point |
| y2 | the 2 coordinate of the second point |
| fractional_X | the interpolation location as a fractional distance between x1 and x2 (which are not needed) |
|
inline |
Calculates the 2nd order polynomial BLEP correction factor.
| mcounter | the modulo counter value that is clocking the oscillator |
| phaseInc | counter's phase increment value |
| height | normalized height of the discontinuity to correction |
| risingEdge | true if discontinuity is a rising edge, false if falling edge |
|
inline |
maps a double value into a uint64 value without casting or mangling bits
| d | the double value to convert |
|
inline |
maps a float value to a uint32_t value without casting or mangling bits
| f | the float value to convert |
|
inline |
calculates fuzz exp1 waveshaper
| xn | the input value |
| saturation | the saturation control |
|
inline |
maps a mod-knob value on the range of [0.0, 1.0] to a number on the range [min, max] anti-logarithmically
| normalizedValue | normalized value |
| min | the minimum mapped value |
| max | the maximum mapped value |
|
inline |
maps a mod-knob value on the range of [0.0, 1.0] to a number on the range [min, max]
| normalizedValue | normalized value |
| min | the minimum mapped value |
| max | the maximum mapped value |
|
inline |
maps a mod-knob value on the range of [0.0, 1.0] to a number on the range [min, max] logarithmically
| normalizedValue | normalized value |
| min | the minimum mapped value |
| max | the maximum mapped value |
|
inline |
Helper to get the outer plugin folder with the inner folder path.
| str | the string to manipulate, pass-by-reference |
|
inline |
converts a BPM value and a NoteDuration into a time
| BPM | timing BPM value |
| duration | NoteDuration constant |
| returnMilliseconds | set true if you want milliseconds |
|
inline |
converts a BPM value and a normalized note multiplier on the range [0, 1] to a note duration multiplier
| BPM | timing BPM value |
| normalizedNoteMult | normalized value |
|
inline |
tests a number to see if it is withing a certain range
| low | the minimum value of the range |
| high | the maximum value of the range |
| x | the value to test |
|
inline |
log-normalized to normalized version
| logNormalizedValue | log-normalized value |
|
inline |
map double on a range of (min, max) to a uint32_t on the range of (minMap, maxMap)
| value | to be mapped |
| min | minimum value of source range |
| max | maximum value of source range |
| minMap | minimum value of destination (mapped) range |
| maxMap | maximum value of destination (mapped) range |
| roundValue | set true to round the final value |
|
inline |
map double on a range of (min, max) to the same double on the range of (minMap, maxMap)
| value | to be mapped, pass-by-reference, returns in this variable |
| min | minimum value of source range |
| max | maximum value of source range |
| minMap | minimum value of destination (mapped) range |
| maxMap | maximum value of destination (mapped) range |
|
inline |
map double on a range of (min, max) to the same double on the range of (minMap, maxMap) using a pre-calculated slope variable where:
| value | to be mapped, pass-by-reference, returns in this variable |
| min | minimum value of source range |
| minMap | minimum value of destination (mapped) range |
|
inline |
map int on a range of (min, max) to the same int on the range of (minMap, maxMap)
| value | to be mapped, pass-by-reference, returns in this variable |
| min | minimum value of source range |
| max | maximum value of source range |
| minMap | minimum value of destination (mapped) range |
| maxMap | maximum value of destination (mapped) range |
| roundValue | set true to round the final value (crucial that you get this right for MIDI) |
|
inline |
map uint32_t on a range of (min, max) to a double on the range of (minMap, maxMap)
| value | to be mapped |
| min | minimum value of source range |
| max | maximum value of source range |
| minMap | minimum value of destination (mapped) range |
| maxMap | maximum value of destination (mapped) range |
|
inline |
map unsigned int on a range of (min, max) to the same unsigned int on the range of (minMap, maxMap)
| value | to be mapped, pass-by-reference, returns in this variable |
| min | minimum value of source range |
| max | maximum value of source range |
| minMap | minimum value of destination (mapped) range |
| maxMap | maximum value of destination (mapped) range |
| roundValue | set true to round the final value (crucial that you get this right for MIDI) |
|
inline |
convert a time in milliseconds to a floating point sample count
| sampleRate | fs |
| timeMSec | time in milliseconds to convert |
|
inline |
normalized to anti-log normalized version
| normalizedValue | log-normalized value |
|
inline |
normalized to Log-normalized version
| normalizedValue | normalized value |
|
inline |
highest accurace sinudoid approximation function
| angle | sine angle -pi to +pi |
|
inline |
calculates the peak magnitude for a given Q
| Q | the Q value |
|
inline |
produces the quadratic sine approximation
| angle | sine angle |
|
inline |
Quantizes a double value into some number of quantization levels.
| d | the double value to quntize |
| qLevels | number of quantization levels |
|
inline |
calculates dB for given input
| raw | value to convert to dB |
|
inline |
Read a table that has been encoded as uint64_t HEX values.
| table | the table to read |
| xn | the fractional location within the table to read |
|
inline |
Helper to relace strings within a std::string object.
| str | the string to manipulate, pass-by-reference |
| from | the string to find |
| to | the string to replace with |
|
inline |
Perform the MMA reverse concave tranform on a unipolar value.
| xn | the unipolar bipolar value to transform |
| useLUT | set to true to use lookup table instead of direct calculation |
|
inline |
Perform the MMA reverse convex tranform on a unipolar value.
| xn | the unipolar value to transform |
| useLUT | set to true to use lookup table instead of direct calculation |
|
inline |
calculates the number of semitones between a start and end frequency
| startFrequency | start frequency in Hz |
| endFrequency | end frequency in Hz |
|
inline |
calculates sgn( ) of input
| xn | the input value |
|
inline |
calculates hyptan waveshaper
| xn | the input value |
| saturation | the saturation control |
|
inline |
Helper to strip the last folder path from a given path.
| str | the string to manipulate, pass-by-reference |
|
inline |
calculates hyptan waveshaper
| xn | the input value |
| saturation | the saturation control |
|
inline |
maps a uint32_t value to a float value without casting or mangling bits
| u | the uint32_t value to convert |
|
inline |
maps a uint64 value to a double value without casting or mangling bits
| u | the uint64_t value to convert |
|
inline |
wraps a value around a maximum value enough times that it falls within the maximum boundary
| x | the value to wrap |
| max | the maximum value to wrap over |
|
inline |
wraps a value around a maximum value enough times that it falls within the maximum boundary
| x | the value to wrap |
| min | the minimum value to wrap from |
| max | the maximum value to wrap over |