diff --git a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp index ed8101aa50..c69f236731 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp @@ -26,7 +26,7 @@ namespace juce namespace { const uint8 noLSBValueReceived = 0xff; - const Range allChannels = Range (1, 17); + const Range allChannels { 1, 17 }; } //============================================================================== @@ -45,7 +45,7 @@ MPEInstrument::MPEInstrument() noexcept legacyMode.isEnabled = false; legacyMode.pitchbendRange = 2; - legacyMode.channelRange = Range (1, 17); + legacyMode.channelRange = allChannels; } MPEInstrument::~MPEInstrument() @@ -91,7 +91,7 @@ Range MPEInstrument::getLegacyModeChannelRange() const noexcept void MPEInstrument::setLegacyModeChannelRange (Range channelRange) { - jassert (Range(1, 17).contains (channelRange)); + jassert (allChannels.contains (channelRange)); releaseAllNotes(); const ScopedLock sl (lock); @@ -218,7 +218,7 @@ void MPEInstrument::processMidiAllNotesOffMessage (const MidiMessage& message) if (legacyMode.isEnabled && legacyMode.channelRange.contains (message.getChannel())) { - for (int i = notes.size(); --i >= 0;) + for (auto i = notes.size(); --i >= 0;) { auto& note = notes.getReference (i); @@ -233,7 +233,7 @@ void MPEInstrument::processMidiAllNotesOffMessage (const MidiMessage& message) } else if (auto* zone = zoneLayout.getZoneByMasterChannel (message.getChannel())) { - for (int i = notes.size(); --i >= 0;) + for (auto i = notes.size(); --i >= 0;) { auto& note = notes.getReference (i); @@ -251,7 +251,7 @@ void MPEInstrument::processMidiAllNotesOffMessage (const MidiMessage& message) //============================================================================== void MPEInstrument::handlePressureMSB (int midiChannel, int value) noexcept { - const uint8 lsb = lastPressureLowerBitReceivedOnChannel[midiChannel - 1]; + auto lsb = lastPressureLowerBitReceivedOnChannel[midiChannel - 1]; pressure (midiChannel, lsb == noLSBValueReceived ? MPEValue::from7BitInt (value) : MPEValue::from14BitInt (lsb + (value << 7))); @@ -264,7 +264,7 @@ void MPEInstrument::handlePressureLSB (int midiChannel, int value) noexcept void MPEInstrument::handleTimbreMSB (int midiChannel, int value) noexcept { - const uint8 lsb = lastTimbreLowerBitReceivedOnChannel[midiChannel - 1]; + auto lsb = lastTimbreLowerBitReceivedOnChannel[midiChannel - 1]; timbre (midiChannel, lsb == noLSBValueReceived ? MPEValue::from7BitInt (value) : MPEValue::from14BitInt (lsb + (value << 7))); @@ -383,7 +383,7 @@ void MPEInstrument::updateDimension (int midiChannel, MPEDimension& dimension, M { if (dimension.trackingMode == allNotesOnChannel) { - for (int i = notes.size(); --i >= 0;) + for (auto i = notes.size(); --i >= 0;) { auto& note = notes.getReference (i); @@ -404,7 +404,7 @@ void MPEInstrument::updateDimensionMaster (const MPEZone& zone, MPEDimension& di { auto channels = zone.getNoteChannelRange(); - for (int i = notes.size(); --i >= 0;) + for (auto i = notes.size(); --i >= 0;) { auto& note = notes.getReference (i); @@ -495,7 +495,7 @@ void MPEInstrument::handleSustainOrSostenuto (int midiChannel, bool isDown, bool if (legacyMode.isEnabled ? (! legacyMode.channelRange.contains (midiChannel)) : (affectedZone == nullptr)) return; - for (int i = notes.size(); --i >= 0;) + for (auto i = notes.size(); --i >= 0;) { auto& note = notes.getReference (i); @@ -525,7 +525,7 @@ void MPEInstrument::handleSustainOrSostenuto (int midiChannel, bool isDown, bool if (legacyMode.isEnabled) isNoteChannelSustained[midiChannel - 1] = isDown; else - for (int i = affectedZone->getFirstNoteChannel(); i <= affectedZone->getLastNoteChannel(); ++i) + for (auto i = affectedZone->getFirstNoteChannel(); i <= affectedZone->getLastNoteChannel(); ++i) isNoteChannelSustained[i - 1] = isDown; } } @@ -558,7 +558,7 @@ MPENote MPEInstrument::getNote (int midiChannel, int midiNoteNumber) const noexc if (auto* note = getNotePtr (midiChannel, midiNoteNumber)) return *note; - return MPENote(); + return {}; } MPENote MPEInstrument::getNote (int index) const noexcept @@ -572,12 +572,12 @@ MPENote MPEInstrument::getMostRecentNote (int midiChannel) const noexcept if (auto* note = getLastNotePlayedPtr (midiChannel)) return *note; - return MPENote(); + return {}; } MPENote MPEInstrument::getMostRecentNoteOtherThan (MPENote otherThanThisNote) const noexcept { - for (int i = notes.size(); --i >= 0;) + for (auto i = notes.size(); --i >= 0;) { auto& note = notes.getReference (i); @@ -585,7 +585,7 @@ MPENote MPEInstrument::getMostRecentNoteOtherThan (MPENote otherThanThisNote) co return note; } - return MPENote(); + return {}; } //============================================================================== @@ -629,7 +629,7 @@ MPENote* MPEInstrument::getNotePtr (int midiChannel, TrackingMode mode) noexcept //============================================================================== const MPENote* MPEInstrument::getLastNotePlayedPtr (int midiChannel) const noexcept { - for (int i = notes.size(); --i >= 0;) + for (auto i = notes.size(); --i >= 0;) { auto& note = notes.getReference (i); @@ -650,11 +650,11 @@ MPENote* MPEInstrument::getLastNotePlayedPtr (int midiChannel) noexcept const MPENote* MPEInstrument::getHighestNotePtr (int midiChannel) const noexcept { int initialNoteMax = -1; - const MPENote* result = nullptr; + MPENote* result = nullptr; - for (int i = notes.size(); --i >= 0;) + for (auto i = notes.size(); --i >= 0;) { - const auto& note = notes.getReference (i); + auto& note = notes.getReference (i); if (note.midiChannel == midiChannel && (note.keyState == MPENote::keyDown || note.keyState == MPENote::keyDownAndSustained) @@ -676,9 +676,9 @@ MPENote* MPEInstrument::getHighestNotePtr (int midiChannel) noexcept const MPENote* MPEInstrument::getLowestNotePtr (int midiChannel) const noexcept { int initialNoteMin = 128; - const MPENote* result = nullptr; + MPENote* result = nullptr; - for (int i = notes.size(); --i >= 0;) + for (auto i = notes.size(); --i >= 0;) { auto& note = notes.getReference (i); @@ -704,7 +704,7 @@ void MPEInstrument::releaseAllNotes() { const ScopedLock sl (lock); - for (int i = notes.size(); --i >= 0;) + for (auto i = notes.size(); --i >= 0;) { auto& note = notes.getReference (i); note.keyState = MPENote::off; diff --git a/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp b/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp index ebdc68993c..a8983a2a29 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp @@ -25,10 +25,10 @@ namespace juce MidiBuffer MPEMessages::addZone (MPEZone zone) { - MidiBuffer buffer (MidiRPNGenerator::generate (zone.getFirstNoteChannel(), - zoneLayoutMessagesRpnNumber, - zone.getNumNoteChannels(), - false, false)); + auto buffer = MidiRPNGenerator::generate (zone.getFirstNoteChannel(), + zoneLayoutMessagesRpnNumber, + zone.getNumNoteChannels(), + false, false); buffer.addEvents (perNotePitchbendRange (zone), 0, -1, 0); buffer.addEvents (masterPitchbendRange (zone), 0, -1, 0); diff --git a/modules/juce_audio_basics/mpe/juce_MPENote.cpp b/modules/juce_audio_basics/mpe/juce_MPENote.cpp index dad3ab6028..939d788176 100644 --- a/modules/juce_audio_basics/mpe/juce_MPENote.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPENote.cpp @@ -49,25 +49,13 @@ MPENote::MPENote (int midiChannel_, pitchbend (pitchbend_), pressure (pressure_), timbre (timbre_), - noteOffVelocity (MPEValue::minValue()), keyState (keyState_) { jassert (keyState != MPENote::off); jassert (isValid()); } -MPENote::MPENote() noexcept - : noteID (0), - midiChannel (0), - initialNote (0), - noteOnVelocity (MPEValue::minValue()), - pitchbend (MPEValue::centreValue()), - pressure (MPEValue::centreValue()), - timbre (MPEValue::centreValue()), - noteOffVelocity (MPEValue::minValue()), - keyState (MPENote::off) -{ -} +MPENote::MPENote() noexcept {} //============================================================================== bool MPENote::isValid() const noexcept @@ -78,7 +66,7 @@ bool MPENote::isValid() const noexcept //============================================================================== double MPENote::getFrequencyInHertz (double frequencyOfA) const noexcept { - double pitchInSemitones = double (initialNote) + totalPitchbendInSemitones; + auto pitchInSemitones = double (initialNote) + totalPitchbendInSemitones; return frequencyOfA * std::pow (2.0, (pitchInSemitones - 69.0) / 12.0); } diff --git a/modules/juce_audio_basics/mpe/juce_MPENote.h b/modules/juce_audio_basics/mpe/juce_MPENote.h index 8d549ddd9e..5398db424a 100644 --- a/modules/juce_audio_basics/mpe/juce_MPENote.h +++ b/modules/juce_audio_basics/mpe/juce_MPENote.h @@ -92,17 +92,17 @@ struct JUCE_API MPENote sounding notes that may use the same note number or MIDI channel. This should never change during the lifetime of a note object. */ - uint16 noteID; + uint16 noteID = 0; /** The MIDI channel which this note uses. This should never change during the lifetime of an MPENote object. */ - uint8 midiChannel; + uint8 midiChannel = 0; /** The MIDI note number that was sent when the note was triggered. This should never change during the lifetime of an MPENote object. */ - uint8 initialNote; + uint8 initialNote = 0; //============================================================================== // The five dimensions of continuous expressive control @@ -110,7 +110,7 @@ struct JUCE_API MPENote /** The velocity ("strike") of the note-on. This dimension will stay constant after the note has been turned on. */ - MPEValue noteOnVelocity; + MPEValue noteOnVelocity { MPEValue::minValue() }; /** Current per-note pitchbend of the note (in units of MIDI pitchwheel position). This dimension can be modulated while the note sounds. @@ -122,18 +122,18 @@ struct JUCE_API MPENote @see totalPitchbendInSemitones, getFrequencyInHertz */ - MPEValue pitchbend; + MPEValue pitchbend { MPEValue::centreValue() }; /** Current pressure with which the note is held down. This dimension can be modulated while the note sounds. */ - MPEValue pressure; + MPEValue pressure { MPEValue::centreValue() }; /** Current value of the note's third expressive dimension, tyically encoding some kind of timbre parameter. This dimension can be modulated while the note sounds. */ - MPEValue timbre; + MPEValue timbre { MPEValue::centreValue() }; /** The release velocity ("lift") of the note after a note-off has been received. @@ -141,7 +141,7 @@ struct JUCE_API MPENote been received for the note (and keyState is set to MPENote::off or MPENOte::sustained). Initially, the value is undefined. */ - MPEValue noteOffVelocity; + MPEValue noteOffVelocity { MPEValue::minValue() }; //============================================================================== /** Current effective pitchbend of the note in units of semitones, relative @@ -158,7 +158,7 @@ struct JUCE_API MPENote /** Current key state. Indicates whether the note key is currently down (pressed) and/or the note is sustained (by a sustain or sostenuto pedal). */ - KeyState keyState; + KeyState keyState { MPENote::off }; //============================================================================== /** Returns the current frequency of the note in Hertz. This is the a sum of diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp index ac519c494b..afd0cb17ed 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp @@ -26,7 +26,7 @@ namespace juce MPESynthesiser::MPESynthesiser() { MPEZoneLayout zoneLayout; - zoneLayout.addZone (MPEZone (1, 15)); + zoneLayout.addZone ({ 1, 15 }); setZoneLayout (zoneLayout); } @@ -58,7 +58,7 @@ void MPESynthesiser::noteAdded (MPENote newNote) { const ScopedLock sl (voicesLock); - if (MPESynthesiserVoice* voice = findFreeVoice (newNote, shouldStealVoices)) + if (auto* voice = findFreeVoice (newNote, shouldStealVoices)) startVoice (voice, newNote); } @@ -66,10 +66,8 @@ void MPESynthesiser::notePressureChanged (MPENote changedNote) { const ScopedLock sl (voicesLock); - for (int i = 0; i < voices.size(); ++i) + for (auto* voice : voices) { - MPESynthesiserVoice* voice = voices.getUnchecked (i); - if (voice->isCurrentlyPlayingNote (changedNote)) { voice->currentlyPlayingNote = changedNote; @@ -82,10 +80,8 @@ void MPESynthesiser::notePitchbendChanged (MPENote changedNote) { const ScopedLock sl (voicesLock); - for (int i = 0; i < voices.size(); ++i) + for (auto* voice : voices) { - MPESynthesiserVoice* voice = voices.getUnchecked (i); - if (voice->isCurrentlyPlayingNote (changedNote)) { voice->currentlyPlayingNote = changedNote; @@ -98,10 +94,8 @@ void MPESynthesiser::noteTimbreChanged (MPENote changedNote) { const ScopedLock sl (voicesLock); - for (int i = 0; i < voices.size(); ++i) + for (auto* voice : voices) { - MPESynthesiserVoice* voice = voices.getUnchecked (i); - if (voice->isCurrentlyPlayingNote (changedNote)) { voice->currentlyPlayingNote = changedNote; @@ -114,10 +108,8 @@ void MPESynthesiser::noteKeyStateChanged (MPENote changedNote) { const ScopedLock sl (voicesLock); - for (int i = 0; i < voices.size(); ++i) + for (auto* voice : voices) { - MPESynthesiserVoice* voice = voices.getUnchecked (i); - if (voice->isCurrentlyPlayingNote (changedNote)) { voice->currentlyPlayingNote = changedNote; @@ -132,7 +124,7 @@ void MPESynthesiser::noteReleased (MPENote finishedNote) for (int i = voices.size(); --i >= 0;) { - MPESynthesiserVoice* const voice = voices.getUnchecked (i); + auto* voice = voices.getUnchecked (i); if (voice->isCurrentlyPlayingNote(finishedNote)) stopVoice (voice, finishedNote, true); @@ -165,10 +157,8 @@ MPESynthesiserVoice* MPESynthesiser::findFreeVoice (MPENote noteToFindVoiceFor, { const ScopedLock sl (voicesLock); - for (int i = 0; i < voices.size(); ++i) + for (auto* voice : voices) { - MPESynthesiserVoice* const voice = voices.getUnchecked (i); - if (! voice->isActive()) return voice; } @@ -297,7 +287,7 @@ void MPESynthesiser::reduceNumVoices (const int newNumVoices) while (voices.size() > newNumVoices) { - if (MPESynthesiserVoice* voice = findFreeVoice (MPENote(), true)) + if (MPESynthesiserVoice* voice = findFreeVoice ({}, true)) voices.removeObject (voice); else voices.remove (0); // if there's no voice to steal, kill the oldest voice @@ -308,8 +298,8 @@ void MPESynthesiser::turnOffAllVoices (bool allowTailOff) { // first turn off all voices (it's more efficient to do this immediately // rather than to go through the MPEInstrument for this). - for (int i = voices.size(); --i >= 0;) - voices.getUnchecked (i)->noteStopped (allowTailOff); + for (auto* voice : voices) + voice->noteStopped (allowTailOff); // finally make sure the MPE Instrument also doesn't have any notes anymore. instrument->releaseAllNotes(); @@ -318,10 +308,8 @@ void MPESynthesiser::turnOffAllVoices (bool allowTailOff) //============================================================================== void MPESynthesiser::renderNextSubBlock (AudioBuffer& buffer, int startSample, int numSamples) { - for (int i = voices.size(); --i >= 0;) + for (auto* voice : voices) { - MPESynthesiserVoice* voice = voices.getUnchecked (i); - if (voice->isActive()) voice->renderNextBlock (buffer, startSample, numSamples); } @@ -329,10 +317,8 @@ void MPESynthesiser::renderNextSubBlock (AudioBuffer& buffer, int startSa void MPESynthesiser::renderNextSubBlock (AudioBuffer& buffer, int startSample, int numSamples) { - for (int i = voices.size(); --i >= 0;) + for (auto* voice : voices) { - MPESynthesiserVoice* voice = voices.getUnchecked (i); - if (voice->isActive()) voice->renderNextBlock (buffer, startSample, numSamples); } diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp index 7759eea5e2..51483f0eba 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp @@ -24,18 +24,13 @@ namespace juce { MPESynthesiserBase::MPESynthesiserBase() - : instrument (new MPEInstrument), - sampleRate (0), - minimumSubBlockSize (32), - subBlockSubdivisionIsStrict (false) + : instrument (new MPEInstrument) { instrument->addListener (this); } MPESynthesiserBase::MPESynthesiserBase (MPEInstrument* inst) - : instrument (inst), - sampleRate (0), - minimumSubBlockSize (32) + : instrument (inst) { jassert (instrument != nullptr); instrument->addListener (this); @@ -132,7 +127,7 @@ void MPESynthesiserBase::renderNextBlock (AudioBuffer& outputAudio, return; } - const int samplesToNextMidiMessage = midiEventPos - startSample; + auto samplesToNextMidiMessage = midiEventPos - startSample; if (samplesToNextMidiMessage >= numSamples) { diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h index b2b787a58d..83c39a8d6f 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h @@ -198,9 +198,9 @@ protected: private: //============================================================================== CriticalSection noteStateLock; - double sampleRate; - int minimumSubBlockSize; - bool subBlockSubdivisionIsStrict; + double sampleRate = 0.0; + int minimumSubBlockSize = 32; + bool subBlockSubdivisionIsStrict = false; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MPESynthesiserBase) }; diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.cpp b/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.cpp index 6ac688eba9..5cb03eee50 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.cpp @@ -24,7 +24,6 @@ namespace juce { MPESynthesiserVoice::MPESynthesiserVoice() - : currentSampleRate (0), noteStartTime (0) { } diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.h b/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.h index 142c963783..9420b051ad 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.h +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.h @@ -174,13 +174,13 @@ protected: void clearCurrentNote() noexcept; //============================================================================== - double currentSampleRate; + double currentSampleRate = 0.0; MPENote currentlyPlayingNote; private: //============================================================================== friend class MPESynthesiser; - uint32 noteStartTime; + uint32 noteStartTime = 0; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MPESynthesiserVoice) }; diff --git a/modules/juce_audio_basics/mpe/juce_MPEValue.cpp b/modules/juce_audio_basics/mpe/juce_MPEValue.cpp index 2b82929d9b..b9a071303e 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEValue.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEValue.cpp @@ -23,27 +23,24 @@ namespace juce { -MPEValue::MPEValue() noexcept : normalisedValue (8192) -{ -} - -MPEValue::MPEValue (int value) : normalisedValue (value) -{ -} +MPEValue::MPEValue() noexcept {} +MPEValue::MPEValue (int value) : normalisedValue (value) {} //============================================================================== MPEValue MPEValue::from7BitInt (int value) noexcept { jassert (value >= 0 && value <= 127); - const int valueAs14Bit = value <= 64 ? value << 7 : int (jmap (float (value - 64), 0.0f, 63.0f, 0.0f, 8191.0f)) + 8192; - return MPEValue (valueAs14Bit); + auto valueAs14Bit = value <= 64 ? value << 7 + : int (jmap (float (value - 64), 0.0f, 63.0f, 0.0f, 8191.0f)) + 8192; + + return { valueAs14Bit }; } MPEValue MPEValue::from14BitInt (int value) noexcept { jassert (value >= 0 && value <= 16383); - return MPEValue (value); + return { value }; } //============================================================================== diff --git a/modules/juce_audio_basics/mpe/juce_MPEValue.h b/modules/juce_audio_basics/mpe/juce_MPEValue.h index 4bb5afc966..7df8e2bd10 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEValue.h +++ b/modules/juce_audio_basics/mpe/juce_MPEValue.h @@ -86,7 +86,7 @@ public: private: //============================================================================== MPEValue (int normalisedValue); - int normalisedValue; + int normalisedValue = 8192; }; } // namespace juce diff --git a/modules/juce_audio_basics/mpe/juce_MPEZone.cpp b/modules/juce_audio_basics/mpe/juce_MPEZone.cpp index 5b97f0677f..176f827f4c 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEZone.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEZone.cpp @@ -35,7 +35,7 @@ namespace // was not within the allowed range! // we fit this back into the allowed range here to maintain a valid // state for the zone, but probably the resulting zone is not what you - //wanted it to be! + // wanted it to be! jassertfalse; valueToCheckAndLimit = jlimit (minValue, maxValue, valueToCheckAndLimit); @@ -134,7 +134,7 @@ bool MPEZone::overlapsWith (MPEZone other) const noexcept //============================================================================== bool MPEZone::truncateToFit (MPEZone other) noexcept { - const int masterChannelDiff = other.masterChannel - masterChannel; + auto masterChannelDiff = other.masterChannel - masterChannel; // we need at least 2 channels to be left after truncation: // 1 master channel and 1 note channel. otherwise we can't truncate. diff --git a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp index 54d3d6a6b0..a1a262d692 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp @@ -23,9 +23,7 @@ namespace juce { -MPEZoneLayout::MPEZoneLayout() noexcept -{ -} +MPEZoneLayout::MPEZoneLayout() noexcept {} MPEZoneLayout::MPEZoneLayout (const MPEZoneLayout& other) : zones (other.zones)