14 #ifndef AVIATE_AUDIOEFFECT_WRAPPER_H_
15 #define AVIATE_AUDIOEFFECT_WRAPPER_H_
17 #include "sysPlatform/SysTypes.h"
18 #include "sysPlatform/AudioStream.h"
19 #include "Aviate/Aviate.h"
20 #include "Aviate/ForwardDeclares.h"
21 #include "Aviate/LibBasicFunctions.h"
22 #include "Aviate/SramManager.h"
40 virtual void setParam(
int paramIndex,
float paramValue) = 0;
135 static constexpr
int MIDI_CHANNEL = 0;
136 static constexpr
int MIDI_CONTROL = 1;
138 bool m_isOmni =
false;
139 bool m_bypass =
true;
140 bool m_enable =
false;
142 float m_inputScaleFactor = 1.0f;
143 uint16_t m_inputMaxPeak = 0;
144 uint16_t m_outputMaxPeak = 0;
145 float m_volume = 1.0f;
#define AVIATE_API
enable default visibility. This is used for public API functions and classes.
Definition: Aviate.h:19
Audio Effect base class.
Definition: AudioEffectWrapper.h:27
void m_updateOutputPeak(const int16_t *audioData)
Process an audio block as a raw int16_t array and update the m_outputMaxPeak protected variable.
void sendValueReport(int controlIndex, float value)
For MONITOR-only controls, you can report them to the host using sendValueReport().
virtual uint16_t getOutputPeak()
Get the output peak level as a uint16_t.
virtual void volume(float vol)
Set the output volume. This affect both the wet and dry signals.
bool isSramReady()
Checks to seeif the SRAM Manager is ready.
virtual void processMidi(int channel, int midiCC, int value)=0
process a MIDI Continous-Controller (CC) message
virtual void resetInputPeak()
Reset the peak recorded input level.
virtual void toggleBypass()
Toggle the bypass effect.
virtual ~AudioEffectWrapper()
Destructor.
AudioEffectWrapper()
Constructor.
virtual void setParam(int paramIndex, float paramValue)=0
Updates the effect with specified parameter index and value.
void m_updateInputPeak(const audio_block_t *block)
Process an audio_block_t and update the m_inputMaxPeak protected variable.
virtual void mapMidiControl(int parameter, int midiCC, int midiChannel=0)=0
Configure an effect parameter to be controlled by a MIDI CC number on a particular channel.
virtual void enable()
Enables audio processing. Note: when not enabled, CPU load is nearly zero.
virtual void disable()
Disables audio process. When disabled, CPU load is nearly zero.
virtual void resetOutputPeak()
Reset the peak output level recorded.
void m_applyInputScaling(audio_block_t *block)
Convenience function for EFX developer. If you wish to apply input scaling, this function will use th...
void m_updateOutputPeak(const audio_block_t *block)
Process an audio_block_t and update the m_outputMaxPeak protected variable.
virtual void bypass(bool byp)
Bypass the effect.
void m_updateInputPeak(const int16_t *audioData)
Process an audio block as a raw int16_t array and update the m_inputMaxPeak protected variable.
virtual void setMidiOmni(bool isOmni)
Sets whether MIDI OMNI channel is processig on or off. When on, all midi channels are used for matchi...
virtual uint16_t getInputPeak()
Get the input peak level as a uint16_t.
void m_updatePeak(const int16_t *audioData, uint16_t &peak)
Internal function used to find the peak in a raw block of audio samples. Size must be AUDIO_SAMPLES_P...
virtual void volumeDb(float volDb)
Set the output volume in negative dB. Unity is 0.0, half volume would be -6.0 dB, etc.
virtual bool isBypass()
Get if the effect is bypassed.
virtual void inputLevelAdjust(float scaleFactor)
(OPTIONAL) controls an input scaling value applied to effects. This must be implemented by the effect...
virtual const uint8_t * getRblk()=0
Audio synchronization.
virtual const char * getName()=0
Name of the effect. This is normally implemented by automatically by the EffectCreator App.
SramManager * getSramManager()
Returns a pointer to the SramManager.
virtual float getUserParamValue(int paramIndex, float normalizedParamValue)=0
Converts a normalized [0,1.0] value to the user value/range from Effect Creator.
ReportManager provides a class to allows effects to report information back to the host computer.
Definition: ReportManager.h:30
SramManager provides a class to handle dividing an external SPI RAM into independent slots for genera...
Definition: SramManager.h:192
The Aviate library/namespace provides the primary API for working with Multiverse.
Definition: AudioEffectWrapper.h:24