upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)

This commit is contained in:
Alex Birch
2019-06-22 20:41:38 +01:00
parent d22c2cd4fa
commit 9ee566b251
1140 changed files with 67534 additions and 105952 deletions

View File

@ -129,12 +129,12 @@ void MPEInstrument::setTimbreTrackingMode (TrackingMode modeToUse)
}
//==============================================================================
void MPEInstrument::addListener (Listener* const listenerToAdd) noexcept
void MPEInstrument::addListener (Listener* listenerToAdd)
{
listeners.add (listenerToAdd);
}
void MPEInstrument::removeListener (Listener* const listenerToRemove) noexcept
void MPEInstrument::removeListener (Listener* listenerToRemove)
{
listeners.remove (listenerToRemove);
}
@ -156,7 +156,7 @@ void MPEInstrument::processNextMidiEvent (const MidiMessage& message)
//==============================================================================
void MPEInstrument::processMidiNoteOnMessage (const MidiMessage& message)
{
// Note: if a note-on with velocity = 0 is used to convey a note-off,
// Note: If a note-on with velocity = 0 is used to convey a note-off,
// then the actual note-off velocity is not known. In this case,
// the MPE convention is to use note-off velocity = 64.

View File

@ -241,7 +241,7 @@ public:
{
public:
/** Destructor. */
virtual ~Listener() {}
virtual ~Listener() = default;
/** Implement this callback to be informed whenever a new expressive MIDI
note is triggered.
@ -271,7 +271,7 @@ public:
MPE note's key state (whether the key is down and/or the note is
sustained) has changed.
Note: if the key state changes to MPENote::off, noteReleased is
Note: If the key state changes to MPENote::off, noteReleased is
called instead.
*/
virtual void noteKeyStateChanged (MPENote changedNote) = 0;
@ -286,10 +286,10 @@ public:
//==============================================================================
/** Adds a listener. */
void addListener (Listener* listenerToAdd) noexcept;
void addListener (Listener* listenerToAdd);
/** Removes a listener. */
void removeListener (Listener* listenerToRemove) noexcept;
void removeListener (Listener* listenerToRemove);
//==============================================================================
/** Puts the instrument into legacy mode.
@ -352,8 +352,7 @@ private:
struct MPEDimension
{
MPEDimension() noexcept : trackingMode (lastNotePlayedOnChannel) {}
TrackingMode trackingMode;
TrackingMode trackingMode = lastNotePlayedOnChannel;
MPEValue lastValueReceivedOnChannel[16];
MPEValue MPENote::* value;
MPEValue& getValue (MPENote& note) noexcept { return note.*(value); }

View File

@ -215,7 +215,7 @@ private:
std::size_t pos = 0;
MidiBuffer::Iterator iter (midiBuffer);
MidiMessage midiMessage;
int samplePosition; // Note: not actually used, so no need to initialise.
int samplePosition; // Note: Not actually used, so no need to initialise.
while (iter.getNextEvent (midiMessage, samplePosition))
{

View File

@ -35,7 +35,7 @@ namespace juce
class instead. You just need to take care to send them to the appropriate
per-note MIDI channel.
Note: if you are working with an MPEZoneLayout object inside your app,
Note: If you are working with an MPEZoneLayout object inside your app,
you should not use the message sequences provided here. Instead, you should
change the zone layout programmatically with the member functions provided in the
MPEZoneLayout class itself. You should also make sure that the Expressive

View File

@ -132,7 +132,7 @@ struct JUCE_API MPENote
*/
MPEValue pressure { MPEValue::centreValue() };
/** Inital value of timbre when the note was triggered.
/** Initial value of timbre when the note was triggered.
This should never change during the lifetime of an MPENote object.
*/
MPEValue initialTimbre { MPEValue::centreValue() };

View File

@ -42,13 +42,16 @@ MPESynthesiser::~MPESynthesiser()
void MPESynthesiser::startVoice (MPESynthesiserVoice* voice, MPENote noteToStart)
{
jassert (voice != nullptr);
voice->currentlyPlayingNote = noteToStart;
voice->noteOnTime = lastNoteOnCounter++;
voice->noteStarted();
}
void MPESynthesiser::stopVoice (MPESynthesiserVoice* voice, MPENote noteToStop, bool allowTailOff)
{
jassert (voice != nullptr);
voice->currentlyPlayingNote = noteToStop;
voice->noteStopped (allowTailOff);
}
@ -197,7 +200,7 @@ MPESynthesiserVoice* MPESynthesiser::findVoiceToSteal (MPENote noteToStealVoiceF
// compilers generating code containing heap allocations..
struct Sorter
{
bool operator() (const MPESynthesiserVoice* a, const MPESynthesiserVoice* b) const noexcept { return a->wasStartedBefore (*b); }
bool operator() (const MPESynthesiserVoice* a, const MPESynthesiserVoice* b) const noexcept { return a->noteOnTime < b->noteOnTime; }
};
std::sort (usableVoices.begin(), usableVoices.end(), Sorter());

View File

@ -72,7 +72,7 @@ public:
MPESynthesiser (MPEInstrument* instrument);
/** Destructor. */
~MPESynthesiser();
~MPESynthesiser() override;
//==============================================================================
/** Deletes all voices. */
@ -188,7 +188,7 @@ protected:
renderNextBlock(). Do not call it yourself, otherwise the internal MPE note state
will become inconsistent.
*/
virtual void noteAdded (MPENote newNote) override;
void noteAdded (MPENote newNote) override;
/** Stops playing a note.
@ -203,7 +203,7 @@ protected:
renderNextBlock(). Do not call it yourself, otherwise the internal MPE note state
will become inconsistent.
*/
virtual void noteReleased (MPENote finishedNote) override;
void noteReleased (MPENote finishedNote) override;
/** Will find any voice that is currently playing changedNote, update its
currently playing note, and call its notePressureChanged method.
@ -211,7 +211,7 @@ protected:
This method will be called automatically according to the midi data passed into
renderNextBlock(). Do not call it yourself.
*/
virtual void notePressureChanged (MPENote changedNote) override;
void notePressureChanged (MPENote changedNote) override;
/** Will find any voice that is currently playing changedNote, update its
currently playing note, and call its notePitchbendChanged method.
@ -219,7 +219,7 @@ protected:
This method will be called automatically according to the midi data passed into
renderNextBlock(). Do not call it yourself.
*/
virtual void notePitchbendChanged (MPENote changedNote) override;
void notePitchbendChanged (MPENote changedNote) override;
/** Will find any voice that is currently playing changedNote, update its
currently playing note, and call its noteTimbreChanged method.
@ -227,7 +227,7 @@ protected:
This method will be called automatically according to the midi data passed into
renderNextBlock(). Do not call it yourself.
*/
virtual void noteTimbreChanged (MPENote changedNote) override;
void noteTimbreChanged (MPENote changedNote) override;
/** Will find any voice that is currently playing changedNote, update its
currently playing note, and call its noteKeyStateChanged method.
@ -235,24 +235,24 @@ protected:
This method will be called automatically according to the midi data passed into
renderNextBlock(). Do not call it yourself.
*/
virtual void noteKeyStateChanged (MPENote changedNote) override;
void noteKeyStateChanged (MPENote changedNote) override;
//==============================================================================
/** This will simply call renderNextBlock for each currently active
voice and fill the buffer with the sum.
Override this method if you need to do more work to render your audio.
*/
virtual void renderNextSubBlock (AudioBuffer<float>& outputAudio,
int startSample,
int numSamples) override;
void renderNextSubBlock (AudioBuffer<float>& outputAudio,
int startSample,
int numSamples) override;
/** This will simply call renderNextBlock for each currently active
voice and fill the buffer with the sum. (souble-precision version)
Override this method if you need to do more work to render your audio.
*/
virtual void renderNextSubBlock (AudioBuffer<double>& outputAudio,
int startSample,
int numSamples) override;
void renderNextSubBlock (AudioBuffer<double>& outputAudio,
int startSample,
int numSamples) override;
//==============================================================================
/** Searches through the voices to find one that's not currently playing, and
@ -304,6 +304,7 @@ protected:
private:
//==============================================================================
bool shouldStealVoices = false;
uint32 lastNoteOnCounter = 0;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MPESynthesiser)
};

View File

@ -42,11 +42,6 @@ bool MPESynthesiserVoice::isPlayingButReleased() const noexcept
return isActive() && currentlyPlayingNote.keyState == MPENote::off;
}
bool MPESynthesiserVoice::wasStartedBefore (const MPESynthesiserVoice& other) const noexcept
{
return noteStartTime < other.noteStartTime;
}
void MPESynthesiserVoice::clearCurrentNote() noexcept
{
currentlyPlayingNote = MPENote();

View File

@ -156,8 +156,10 @@ public:
*/
double getSampleRate() const noexcept { return currentSampleRate; }
/** Returns true if this voice started playing its current note before the other voice did. */
bool wasStartedBefore (const MPESynthesiserVoice& other) const noexcept;
/** This will be set to an incrementing counter value in MPESynthesiser::startVoice()
and can be used to determine the order in which voices started.
*/
uint32 noteOnTime = 0;
protected:
//==============================================================================
@ -182,7 +184,6 @@ protected:
private:
//==============================================================================
friend class MPESynthesiser;
uint32 noteStartTime = 0;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MPESynthesiserVoice)
};

View File

@ -80,13 +80,7 @@ public:
*/
struct Zone
{
Zone (const Zone& other) noexcept
: numMemberChannels (other.numMemberChannels),
perNotePitchbendRange (other.perNotePitchbendRange),
masterPitchbendRange (other.masterPitchbendRange),
lowerZone (other.lowerZone)
{
}
Zone (const Zone& other) = default;
bool isLowerZone() const noexcept { return lowerZone; }
bool isUpperZone() const noexcept { return ! lowerZone; }
@ -185,7 +179,7 @@ public:
{
public:
/** Destructor. */
virtual ~Listener() {}
virtual ~Listener() = default;
/** Implement this callback to be notified about any changes to this
MPEZoneLayout. Will be called whenever a zone is added, zones are