JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::MPEChannelRemapper Class Reference

This class handles the logic for remapping MIDI note messages from multiple MPE sources onto a specified MPE zone. More...

#include <juce_MPEUtils.h>

Collaboration diagram for juce::MPEChannelRemapper:

Public Member Functions

 MPEChannelRemapper (MPEZoneLayout::Zone zoneToRemap)
 Constructor. More...
 
void clearChannel (int channel) noexcept
 Clears a specified channel of this MPE zone. More...
 
void clearSource (uint32 mpeSourceID)
 Clears all channels in use by a specified source. More...
 
void remapMidiChannelIfNeeded (MidiMessage &message, uint32 mpeSourceID) noexcept
 Remaps the MIDI channel of the specified MIDI message (if necessary). More...
 
void reset () noexcept
 Resets all the source & channel combinations. More...
 

Static Public Attributes

static const uint32 notMPE = 0
 Used to indicate that a particular source & channel combination is not currently using MPE. More...
 

Private Member Functions

bool applyRemapIfExisting (int channel, uint32 sourceAndChannelID, MidiMessage &m) noexcept
 
int getBestChanToReuse () const noexcept
 
bool messageIsNoteData (const MidiMessage &m)
 
void zeroArrays ()
 

Private Attributes

int channelIncrement
 
uint32 counter = 0
 
int firstChannel
 
int lastChannel
 
uint32 lastUsed [17]
 
uint32 sourceAndChannel [17]
 
MPEZoneLayout::Zone zone
 

Detailed Description

This class handles the logic for remapping MIDI note messages from multiple MPE sources onto a specified MPE zone.

@tags{Audio}

Constructor & Destructor Documentation

◆ MPEChannelRemapper()

juce::MPEChannelRemapper::MPEChannelRemapper ( MPEZoneLayout::Zone  zoneToRemap)

Constructor.

Member Function Documentation

◆ applyRemapIfExisting()

bool juce::MPEChannelRemapper::applyRemapIfExisting ( int  channel,
uint32  sourceAndChannelID,
MidiMessage m 
)
privatenoexcept

◆ clearChannel()

void juce::MPEChannelRemapper::clearChannel ( int  channel)
noexcept

Clears a specified channel of this MPE zone.

◆ clearSource()

void juce::MPEChannelRemapper::clearSource ( uint32  mpeSourceID)

Clears all channels in use by a specified source.

◆ getBestChanToReuse()

int juce::MPEChannelRemapper::getBestChanToReuse ( ) const
privatenoexcept

◆ messageIsNoteData()

bool juce::MPEChannelRemapper::messageIsNoteData ( const MidiMessage m)
inlineprivate

References juce::gl::m.

◆ remapMidiChannelIfNeeded()

void juce::MPEChannelRemapper::remapMidiChannelIfNeeded ( MidiMessage message,
uint32  mpeSourceID 
)
noexcept

Remaps the MIDI channel of the specified MIDI message (if necessary).

Note that the MidiMessage object passed in will have it's channel changed if it needs to be remapped.

Parameters
messagethe message to be remapped
mpeSourceIDthe ID of the MPE source of the message. This is up to the user to define and keep constant

◆ reset()

void juce::MPEChannelRemapper::reset ( )
noexcept

Resets all the source & channel combinations.

◆ zeroArrays()

void juce::MPEChannelRemapper::zeroArrays ( )
private

Member Data Documentation

◆ channelIncrement

int juce::MPEChannelRemapper::channelIncrement
private

◆ counter

uint32 juce::MPEChannelRemapper::counter = 0
private

◆ firstChannel

int juce::MPEChannelRemapper::firstChannel
private

◆ lastChannel

int juce::MPEChannelRemapper::lastChannel
private

◆ lastUsed

uint32 juce::MPEChannelRemapper::lastUsed[17]
private

◆ notMPE

const uint32 juce::MPEChannelRemapper::notMPE = 0
static

Used to indicate that a particular source & channel combination is not currently using MPE.

◆ sourceAndChannel

uint32 juce::MPEChannelRemapper::sourceAndChannel[17]
private

◆ zone

MPEZoneLayout::Zone juce::MPEChannelRemapper::zone
private

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