MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
47 for (AudioMixer4 *mixer :
mixers)
48 for (uint8_t ch = 0; ch < 4; ch++)
49 mixer->gain(ch, gain);
A super class for object that have to be updated regularly.
Array< AudioMixer4 *, N > mixers
VolumeControl(const Array< AudioMixer4 *, N > &mixers, pin_t analogPin, float maxGain=1.0)
Create a new VolumeControl object.
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
void update() override
Read the potentiometer value, and adjust the gain of the mixers.
float getFloatValue() const
Get the filtered value of the analog input with the mapping function applied as a floating point numb...
#define BEGIN_CS_NAMESPACE
A class that reads and filters an analog input.
bool update()
Read the analog input value, apply the mapping function, and update the average.
An array wrapper for easy copying, comparing, and iterating.
void map(MappingFunction fn)
Specify a mapping function/functor that is applied to the analog value after filtering and before app...
void invert()
Invert the analog value.
void begin() override
Initialize.
void map(MappingFunction fn)
Specify a mapping function that is applied to the raw analog value before setting the volume.
void invert()
Invert the analog value.
AH::FilteredAnalog filteredAnalog
A class for controlling the volume of AudioMixer4 objects using a potentiometer.
analog_t(*)(analog_t) MappingFunction