OpenShot Audio Library | OpenShotAudio: juce::MPEZoneLayout Class Reference

OpenShot Audio Library | OpenShotAudio 1.0.0

Loading...
Searching...
No Matches
juce::MPEZoneLayout Class Reference

`#include <juce_MPEZoneLayout.h>`

## Classes
class | Listener

## Public Types
using | Zone = MPEZone

## Public Member Functions
| MPEZoneLayout ()=default
| MPEZoneLayout (MPEZone lower, MPEZone upper)
| MPEZoneLayout (MPEZone singleZone)
| 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
MPEZone | getUpperZone () const noexcept
void | setLowerZone (int numMemberChannels=0, int perNotePitchbendRange=48, int masterPitchbendRange=2) noexcept
void | setUpperZone (int numMemberChannels=0, int perNotePitchbendRange=48, int masterPitchbendRange=2) noexcept
void | clearAllZones ()
bool | isActive () const
void | processNextMidiEvent (const MidiMessage &message)
void | processNextMidiBuffer (const MidiBuffer &buffer)
void | addListener (Listener *const listenerToAdd) noexcept
void | removeListener (Listener *const listenerToRemove) noexcept

## Detailed Description

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.

See also
  MPEInstrument

Definition at line 122 of file juce_MPEZoneLayout.h.

## Member Typedef Documentation

## ◆ Zone

using juce::MPEZoneLayout::Zone = MPEZone

Definition at line 218 of file juce_MPEZoneLayout.h.

## Constructor & Destructor Documentation

## ◆ MPEZoneLayout() [1/4]

juce::MPEZoneLayout::MPEZoneLayout | ( |  | ) |
| default

Creates a layout with inactive upper and lower zones.

Referenced by MPEZoneLayout(), and juce::MPEZoneLayout::Listener::zoneLayoutChanged().

## ◆ MPEZoneLayout() [2/4]

juce::MPEZoneLayout::MPEZoneLayout | ( | MPEZone | lower,
|  | MPEZone | upper )

Creates a layout with the given upper and lower zones.

Definition at line 26 of file juce_MPEZoneLayout.cpp.

## ◆ MPEZoneLayout() [3/4]

juce::MPEZoneLayout::MPEZoneLayout | ( | MPEZone | singleZone | ) |

Creates a layout with a single upper or lower zone, leaving the other zone uninitialised.

Definition at line 31 of file juce_MPEZoneLayout.cpp.

## ◆ MPEZoneLayout() [4/4]

juce::MPEZoneLayout::MPEZoneLayout | ( | const MPEZoneLayout & | other | ) |

Definition at line 38 of file juce_MPEZoneLayout.cpp.

## Member Function Documentation

## ◆ addListener()

void juce::MPEZoneLayout::addListener | ( | Listener *const | listenerToAdd | ) |
| noexcept

Adds a listener.

Definition at line 184 of file juce_MPEZoneLayout.cpp.

## ◆ clearAllZones()

void juce::MPEZoneLayout::clearAllZones | ( |  | ) |

Clears the lower and upper zones of this layout, making them both inactive and disabling MPE mode.

Definition at line 97 of file juce_MPEZoneLayout.cpp.

## ◆ getLowerZone()

MPEZone juce::MPEZoneLayout::getLowerZone | ( |  | ) | const
| inlinenoexcept

Returns a struct representing the lower MPE zone.

Definition at line 143 of file juce_MPEZoneLayout.h.

Referenced by juce::MPEMessages::setZoneLayout().

## ◆ getUpperZone()

MPEZone juce::MPEZoneLayout::getUpperZone | ( |  | ) | const
| inlinenoexcept

Returns a struct representing the upper MPE zone.

Definition at line 146 of file juce_MPEZoneLayout.h.

Referenced by juce::MPEMessages::setZoneLayout().

## ◆ isActive()

bool juce::MPEZoneLayout::isActive | ( |  | ) | const
| inline

Returns true if either of the zones are active.

Definition at line 164 of file juce_MPEZoneLayout.h.

Referenced by isActive().

## ◆ operator!=()

bool juce::MPEZoneLayout::operator!= | ( | const MPEZoneLayout & | other | ) | const
| inline

Definition at line 139 of file juce_MPEZoneLayout.h.

## ◆ operator=()

MPEZoneLayout & juce::MPEZoneLayout::operator= | ( | const MPEZoneLayout & | other | ) |

Definition at line 44 of file juce_MPEZoneLayout.cpp.

## ◆ operator==()

bool juce::MPEZoneLayout::operator== | ( | const MPEZoneLayout & | other | ) | const
| inline

Definition at line 138 of file juce_MPEZoneLayout.h.

## ◆ processNextMidiBuffer()

void juce::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.

See also
  MPEMessages

Definition at line 177 of file juce_MPEZoneLayout.cpp.

## ◆ processNextMidiEvent()

void juce::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.

See also
  MPEMessages

Definition at line 106 of file juce_MPEZoneLayout.cpp.

Referenced by processNextMidiBuffer().

## ◆ removeListener()

void juce::MPEZoneLayout::removeListener | ( | Listener *const | listenerToRemove | ) |
| noexcept

Removes a listener.

Definition at line 189 of file juce_MPEZoneLayout.cpp.

## ◆ setLowerZone()

void juce::MPEZoneLayout::setLowerZone | ( | int | numMemberChannels = 0,
|  | int | perNotePitchbendRange = 48,
|  | int | masterPitchbendRange = 2 )
| noexcept

Sets the lower zone of this layout.

Definition at line 87 of file juce_MPEZoneLayout.cpp.

## ◆ setUpperZone()

void juce::MPEZoneLayout::setUpperZone | ( | int | numMemberChannels = 0,
|  | int | perNotePitchbendRange = 48,
|  | int | masterPitchbendRange = 2 )
| noexcept

Sets the upper zone of this layout.

Definition at line 92 of file juce_MPEZoneLayout.cpp.

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

- juce_MPEZoneLayout.h
- juce_MPEZoneLayout.cpp