Aviate Audio Multiverse Library
|
The Aviate library/namespace provides the primary API for working with Multiverse. More...
Classes | |
class | AudioEffectWrapper |
Audio Effect base class. More... | |
class | RingBuffer |
Customer RingBuffer with random access. More... | |
class | EfxLogger |
struct | QueuePosition |
QueuePosition is used for storing the index (in an array of queues) and the offset within an audio_block_t data buffer. More... | |
class | AudioDelay |
Audio delays are a very common function in audio processing. More... | |
class | IirBiQuadFilter |
IIR BiQuad Filter - Direct Form I y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] Some design tools (like Matlab assume the feedback coefficients 'a' are negated. More... | |
class | IirBiQuadFilterHQ |
A High-precision version of IirBiQuadFilter often necessary for complex, multistage filters. More... | |
class | IirBiQuadFilterFloat |
A single-precision floating-point biquad using CMSIS-DSP hardware instructions. More... | |
class | ParameterAutomation |
The class will automate a parameter using a trigger from a start value to an end value, using either a preprogrammed function or a user-provided LUT. More... | |
class | ParameterAutomationSequence |
This class allows you to create a sequence of automations where each stage has it's own configuration of start, end, function values. More... | |
class | LowFrequencyOscillatorVector |
The LFO is commonly used on modulation effects where some parameter (delay, volume, etc.) is modulated via waveform at a frequency below 20 Hz. More... | |
class | Compressor |
Simple Compressor. More... | |
class | ReportManager |
ReportManager provides a class to allows effects to report information back to the host computer. More... | |
class | SramMemSlot |
This object is used for data transfers to/from the external SPI SRAM. More... | |
class | SramManager |
SramManager provides a class to handle dividing an external SPI RAM into independent slots for general use. More... | |
class | TunerManager |
The TunerManager class provides an API to access the Tuner display on the Multiverse hardware screen. More... | |
Enumerations | |
enum class | Waveform : unsigned { SINE , TRIANGLE , SQUARE , SAWTOOTH , RANDOM , NUM_WAVEFORMS } |
Supported LFO waveforms. More... | |
enum class | TunerNote : unsigned { C_NATURAL = 0 , C_SHARP_D_FLAT , D_NATURAL , D_SHARP_E_FLAT , E_NATURAL , F_NATURAL , F_SHARP_G_FLAT , G_NATURAL , G_SHARP , A_FLAT , A_NATURAL , A_SHARP_B_FLAT , B_NATURAL , NO_DETECT } |
enum to specify detected notes to the TunerManager | |
Functions | |
QueuePosition AVIATE_API | calcQueuePosition (float milliseconds) |
Calculate the exact sample position in an array of audio blocks that corresponds to a particular offset given as time. More... | |
QueuePosition AVIATE_API | calcQueuePosition (size_t numSamples) |
Calculate the exact sample position in an array of audio blocks that corresponds to a particular offset given as a number of samples. More... | |
size_t AVIATE_API | calcAudioSamples (float milliseconds) |
Calculate the number of audio samples (rounded up) that correspond to a given length of time. More... | |
float AVIATE_API | calcAudioTimeMs (size_t numSamples) |
Calculate a length of time in milliseconds from the number of audio samples. More... | |
size_t AVIATE_API | calcOffset (QueuePosition position) |
Calculate the number of audio samples (usually an offset) from a queue position. More... | |
void AVIATE_API | clearAudioBlock (audio_block_t *block) |
Clear the contents of an audio block to zero. More... | |
void AVIATE_API | alphaBlend (audio_block_t *out, audio_block_t *dry, audio_block_t *wet, float mix) |
Perform an alpha blend between to audio blocks. Performs out = dry*(1-mix) + wet*(mix) More... | |
void AVIATE_API | gainAdjust (audio_block_t *out, audio_block_t *in, float vol, int coeffShift=0) |
Applies a gain to the audio via fixed-point scaling according to out = int * (vol * 2^coeffShift) More... | |
void AVIATE_API | combine (audio_block_t *out, audio_block_t *in0, audio_block_t *in1) |
Combine two audio blocks through vector addition out[n] = in0[n] + in1[n]. More... | |
float AVIATE_API | calcVolumeExp (float volumeIn) |
Calculate an exponential volume from a linear volume. E.g. convert a linear volume curve to an exponentional one that better matches human loudness perception. More... | |
float AVIATE_API | convertLinearToLogPow (float inputValue, float midpoint=0.8f) |
Apply a non-linear taper to a normalized control. Input value must be between [0.0, 1.0]. Return value will be between [0.0, 1.0]. Recommend midpoint=0.8f for a pseudo-logarithmic curve (i.e. volume taper) and mdipoint 0.2f for an exponential taper. More... | |
float AVIATE_API | log2Fast (float input) |
Fast log2() implementation. More... | |
float AVIATE_API | log10Fast (float input) |
Fast log10() implementation. More... | |
float AVIATE_API | dbfsFast (int16_t inputAbs) |
Fast convert 16-bit positive audio sample to dbFS value (decibal fullscale) More... | |
float | dbfsFast (float inputAbs) |
Fast convert positive float value to dbFS value (decibal fullscale) More... | |
uint16_t AVIATE_API | getPeakAbsIntegerValue (const int16_t *audioDataPtr) |
get the peak absolute value as from an audio block More... | |
template<typename T > | |
T AVIATE_API | saturate (T val, T min, T max) |
min/max function More... | |
Variables | |
EfxLogger | efxLogger |
const size_t | AUDIO_BLOCK_SIZE_BYTES |
size of an audio block in bytes | |
constexpr int | MAX_PARAMETER_SEQUENCES = 32 |
Maximum number of automation sequences. | |
volatile ReportManager * | reportManagerPtr |
pointer to global SramManager pointer | |
volatile SramManager * | sramManagerPtr |
pointer to global SramManager pointer | |
TunerManager * | tunerManagerPtr |
pointer to global TunerManager pointer | |
The Aviate library/namespace provides the primary API for working with Multiverse.
|
strong |
void AVIATE_API Aviate::alphaBlend | ( | audio_block_t * | out, |
audio_block_t * | dry, | ||
audio_block_t * | wet, | ||
float | mix | ||
) |
Perform an alpha blend between to audio blocks. Performs
out = dry*(1-mix) + wet*(mix)
out | pointer to the destination audio block |
dry | pointer to the dry audio |
wet | pointer to the wet audio |
mix | float between 0.0 and 1.0. |
size_t AVIATE_API Aviate::calcAudioSamples | ( | float | milliseconds | ) |
Calculate the number of audio samples (rounded up) that correspond to a given length of time.
milliseconds | length of the interval in milliseconds |
float AVIATE_API Aviate::calcAudioTimeMs | ( | size_t | numSamples | ) |
Calculate a length of time in milliseconds from the number of audio samples.
numSamples | Number of audio samples to convert to time |
size_t AVIATE_API Aviate::calcOffset | ( | QueuePosition | position | ) |
Calculate the number of audio samples (usually an offset) from a queue position.
position | specifies the index and offset within a queue |
QueuePosition AVIATE_API Aviate::calcQueuePosition | ( | float | milliseconds | ) |
Calculate the exact sample position in an array of audio blocks that corresponds to a particular offset given as time.
milliseconds | length of the interval in milliseconds |
QueuePosition AVIATE_API Aviate::calcQueuePosition | ( | size_t | numSamples | ) |
Calculate the exact sample position in an array of audio blocks that corresponds to a particular offset given as a number of samples.
numSamples | length of the interval in audio samples |
float AVIATE_API Aviate::calcVolumeExp | ( | float | volumeIn | ) |
Calculate an exponential volume from a linear volume. E.g. convert a linear volume curve to an exponentional one that better matches human loudness perception.
volumeIn | value between 0 and 1.0 representing a linear volume. E.g. 0.5f means you perceived 50% volume |
void AVIATE_API Aviate::clearAudioBlock | ( | audio_block_t * | block | ) |
Clear the contents of an audio block to zero.
block | pointer to the audio block to clear |
void AVIATE_API Aviate::combine | ( | audio_block_t * | out, |
audio_block_t * | in0, | ||
audio_block_t * | in1 | ||
) |
Combine two audio blocks through vector addition out[n] = in0[n] + in1[n].
out | pointer to output audio block |
in0 | pointer to first input audio block to combine |
in1 | pointer to second input audio block to combine |
float AVIATE_API Aviate::convertLinearToLogPow | ( | float | inputValue, |
float | midpoint = 0.8f |
||
) |
Apply a non-linear taper to a normalized control. Input value must be between [0.0, 1.0]. Return value will be between [0.0, 1.0]. Recommend midpoint=0.8f for a pseudo-logarithmic curve (i.e. volume taper) and mdipoint 0.2f for an exponential taper.
When midpoint is 0.5, the function is approximately linear (so not very interesting.) Values > 0.5 will take the top end of the linear scale and shift it down. This is good for controls where all the interesting values are at the top end. Use midpoint < 0.5 to make it exponential, so the low end of the linear scale is expanded, and the top end is compressed.
float Aviate::dbfsFast | ( | float | inputAbs | ) |
Fast convert positive float value to dbFS value (decibal fullscale)
inputAbs | input float audio sample (must be positive) |
float AVIATE_API Aviate::dbfsFast | ( | int16_t | inputAbs | ) |
Fast convert 16-bit positive audio sample to dbFS value (decibal fullscale)
inputAbs | input 16-bit audio sample (must be positive) |
void AVIATE_API Aviate::gainAdjust | ( | audio_block_t * | out, |
audio_block_t * | in, | ||
float | vol, | ||
int | coeffShift = 0 |
||
) |
Applies a gain to the audio via fixed-point scaling according to
out = int * (vol * 2^coeffShift)
out | pointer to output audio block |
in | pointer to input audio block |
vol | volume coefficient between -1.0 and +1.0 |
coeffShift | number of bits to shift the coefficient |
uint16_t AVIATE_API Aviate::getPeakAbsIntegerValue | ( | const int16_t * | audioDataPtr | ) |
get the peak absolute value as from an audio block
audioDataPtr | pointer to an audio block of integer data |
float AVIATE_API Aviate::log10Fast | ( | float | input | ) |
Fast log10() implementation.
input | input float value |
float AVIATE_API Aviate::log2Fast | ( | float | input | ) |
Fast log2() implementation.
input | input float value |
T AVIATE_API Aviate::saturate | ( | T | val, |
T | min, | ||
T | max | ||
) |
min/max function
T | the data type |
val | the value to saturate |
min | the minimum return value |
max | the maximum return value |