WYSWYG editor for JUCE GUIs including Visualisers
Loading...
Searching...
No Matches
MidiParameterMapper Class Reference

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 &parameterID)
 
void unmapMidiController (int cc, const juce::String &parameterID)
 
void unmapAllMidiController (int cc)
 
int getLastController () const
 
juce::ValueTree getMappingSettings ()
 

Detailed Description

The MidiParameterMapper allows to connect CC values to RangedAudioParameters.

Constructor & Destructor Documentation

◆ MidiParameterMapper()

◆ ~MidiParameterMapper()

~MidiParameterMapper ( )
override

Member Function Documentation

◆ processMidiBuffer()

void processMidiBuffer ( juce::MidiBuffer & buffer)

Get Midi CC messages and set parameters accordingly

Parameters
bufferthe last midi events

Referenced by MagicProcessorState::processMidiBuffer().

◆ mapMidiController()

void mapMidiController ( int cc,
const juce::String & parameterID )

Map a MIDI CC to a parameter

Parameters
ccthe MIDI CC number to map
parameterIDthe parameterID to map to

References MidiParameterMapper::getMappingSettings().

Referenced by MagicProcessorState::mapMidiController().

◆ unmapMidiController()

void unmapMidiController ( int cc,
const juce::String & parameterID )

Remove a specific mapping

Parameters
ccthe MIDI CC number to map
parameterIDthe parameterID to unmap

References MidiParameterMapper::getMappingSettings().

◆ unmapAllMidiController()

void unmapAllMidiController ( int cc)

Remove all mappings from a specific CC controller

Parameters
ccthe MIDI CC number to unmap

References MidiParameterMapper::getMappingSettings().

◆ getLastController()

int getLastController ( ) const
Returns
the last touched MIDI controller so it can be mapped

Referenced by MagicProcessorState::getLastController().

◆ getMappingSettings()

juce::ValueTree getMappingSettings ( )

Grant access to the ValueTree to save or restore the mappings manually

Returns
the ValueTree containing the mappings

Referenced by MidiParameterMapper::mapMidiController(), MidiParameterMapper::unmapAllMidiController(), and MidiParameterMapper::unmapMidiController().


The documentation for this class was generated from the following files: