This class represents the current MPE zone layout of a device capable of handling MPE. More...
#include <juce_MPEZoneLayout.h>
Classes | |
class | Listener |
Listener class. More... | |
Public Member Functions | |
MPEZoneLayout ()=default | |
Creates a layout with inactive upper and lower zones. | |
MPEZoneLayout (MPEZone lower, MPEZone upper) | |
Creates a layout with the given upper and lower zones. | |
MPEZoneLayout (MPEZone singleZone) | |
Creates a layout with a single upper or lower zone, leaving the other zone uninitialised. | |
MPEZoneLayout (const MPEZoneLayout &other) | |
MPEZoneLayout & | operator= (const MPEZoneLayout &other) |
bool | operator== (const MPEZoneLayout &other) const |
bool | operator!= (const MPEZoneLayout &other) const |
MPEZone | getLowerZone () const noexcept |
Returns a struct representing the lower MPE zone. | |
MPEZone | getUpperZone () const noexcept |
Returns a struct representing the upper MPE zone. | |
void | setLowerZone (int numMemberChannels=0, int perNotePitchbendRange=48, int masterPitchbendRange=2) noexcept |
Sets the lower zone of this layout. | |
void | setUpperZone (int numMemberChannels=0, int perNotePitchbendRange=48, int masterPitchbendRange=2) noexcept |
Sets the upper zone of this layout. | |
void | clearAllZones () |
Clears the lower and upper zones of this layout, making them both inactive and disabling MPE mode. | |
bool | isActive () const |
Returns true if either of the zones are active. | |
void | processNextMidiEvent (const MidiMessage &message) |
Pass incoming MIDI messages to an object of this class if you want the zone layout to properly react to MPE RPN messages like an MPE device. | |
void | processNextMidiBuffer (const MidiBuffer &buffer) |
Pass incoming MIDI buffers to an object of this class if you want the zone layout to properly react to MPE RPN messages like an MPE device. | |
void | addListener (Listener *const listenerToAdd) noexcept |
Adds a listener. | |
void | removeListener (Listener *const listenerToRemove) noexcept |
Removes a listener. | |
This class represents the current MPE zone layout of a device capable of handling MPE.
An MPE device can have up to two zones: a lower zone with master channel 1 and allocated MIDI channels increasing from channel 2, and an upper zone with master channel 16 and allocated MIDI channels decreasing from channel 15. MPE mode is enabled on a device when one of these zones is active and disabled when both are inactive.
Use the MPEMessages helper class to convert the zone layout represented by this object to MIDI message sequences that you can send to an Expressive MIDI device to set its zone layout, add zones etc.
|
default |
Creates a layout with inactive upper and lower zones.
Creates a layout with the given upper and lower zones.
MPEZoneLayout::MPEZoneLayout | ( | MPEZone | singleZone | ) |
Creates a layout with a single upper or lower zone, leaving the other zone uninitialised.
MPEZoneLayout::MPEZoneLayout | ( | const MPEZoneLayout & | other | ) |
MPEZoneLayout & MPEZoneLayout::operator= | ( | const MPEZoneLayout & | other | ) |
bool MPEZoneLayout::operator== | ( | const MPEZoneLayout & | other | ) | const |
bool MPEZoneLayout::operator!= | ( | const MPEZoneLayout & | other | ) | const |
References operator==().
|
noexcept |
Returns a struct representing the lower MPE zone.
|
noexcept |
Returns a struct representing the upper MPE zone.
|
noexcept |
Sets the lower zone of this layout.
|
noexcept |
Sets the upper zone of this layout.
void MPEZoneLayout::clearAllZones | ( | ) |
Clears the lower and upper zones of this layout, making them both inactive and disabling MPE mode.
bool MPEZoneLayout::isActive | ( | ) | const |
Returns true if either of the zones are active.
void MPEZoneLayout::processNextMidiEvent | ( | const MidiMessage & | message | ) |
Pass incoming MIDI messages to an object of this class if you want the zone layout to properly react to MPE RPN messages like an MPE device.
MPEMessages::rpnNumber will add or remove zones; RPN 0 will set the per-note or master pitchbend ranges.
Any other MIDI messages will be ignored by this class.
void MPEZoneLayout::processNextMidiBuffer | ( | const MidiBuffer & | buffer | ) |
Pass incoming MIDI buffers to an object of this class if you want the zone layout to properly react to MPE RPN messages like an MPE device.
MPEMessages::rpnNumber will add or remove zones; RPN 0 will set the per-note or master pitchbend ranges.
Any other MIDI messages will be ignored by this class.
|
noexcept |
Adds a listener.
|
noexcept |
Removes a listener.
References MPEZone::lower.