The MidiParameterMapper allows to connect CC values to RangedAudioParameters. More...
#include <foleys_MidiParameterMapper.h>
Inherits Listener.
Public Member Functions | |
MidiParameterMapper (MagicProcessorState &state) | |
~MidiParameterMapper () override | |
void | processMidiBuffer (juce::MidiBuffer &buffer) |
void | mapMidiController (int cc, const juce::String ¶meterID) |
void | unmapMidiController (int cc, const juce::String ¶meterID) |
void | unmapAllMidiController (int cc) |
int | getLastController () const |
juce::ValueTree | getMappingSettings () |
The MidiParameterMapper allows to connect CC values to RangedAudioParameters.
MidiParameterMapper | ( | MagicProcessorState & | state | ) |
|
override |
void processMidiBuffer | ( | juce::MidiBuffer & | buffer | ) |
Get Midi CC messages and set parameters accordingly
buffer | the last midi events |
Referenced by MagicProcessorState::processMidiBuffer().
void mapMidiController | ( | int | cc, |
const juce::String & | parameterID ) |
Map a MIDI CC to a parameter
cc | the MIDI CC number to map |
parameterID | the parameterID to map to |
References MidiParameterMapper::getMappingSettings().
Referenced by MagicProcessorState::mapMidiController().
void unmapMidiController | ( | int | cc, |
const juce::String & | parameterID ) |
Remove a specific mapping
cc | the MIDI CC number to map |
parameterID | the parameterID to unmap |
References MidiParameterMapper::getMappingSettings().
void unmapAllMidiController | ( | int | cc | ) |
Remove all mappings from a specific CC controller
cc | the MIDI CC number to unmap |
References MidiParameterMapper::getMappingSettings().
int getLastController | ( | ) | const |
Referenced by MagicProcessorState::getLastController().
juce::ValueTree getMappingSettings | ( | ) |
Grant access to the ValueTree to save or restore the mappings manually
Referenced by MidiParameterMapper::mapMidiController(), MidiParameterMapper::unmapAllMidiController(), and MidiParameterMapper::unmapMidiController().