44 jassert (
voice !=
nullptr);
47 voice->noteOnTime = lastNoteOnCounter++;
53 jassert (
voice !=
nullptr);
72 for (
auto*
voice : voices)
77 voice->notePressureChanged();
86 for (
auto*
voice : voices)
91 voice->notePitchbendChanged();
100 for (
auto*
voice : voices)
105 voice->noteTimbreChanged();
114 for (
auto*
voice : voices)
119 voice->noteKeyStateChanged();
128 for (
auto i = voices.
size(); --i >= 0;)
145 for (
auto i = voices.
size(); --i >= 0;)
163 for (
auto*
voice : voices)
165 if (!
voice->isActive())
183 jassert (voices.
size() > 0);
193 for (
auto*
voice : voices)
195 jassert (
voice->isActive());
208 if (!
voice->isPlayingButReleased())
215 if (
top ==
nullptr ||
noteNumber >
top->getCurrentlyPlayingNote().initialNote)
249 jassert (
low !=
nullptr);
275 return voices [index];
294 voices.removeObject (
voice);
307 for (
auto*
voice : voices)
320 for (
auto*
voice : voices)
322 if (
voice->isActive())
323 voice->renderNextBlock (buffer, startSample, numSamples);
331 for (
auto*
voice : voices)
333 if (
voice->isActive())
334 voice->renderNextBlock (buffer, startSample, numSamples);
ElementType getUnchecked(int index) const
void ensureStorageAllocated(int minNumElements)
int size() const noexcept
void remove(int indexToRemove)
ElementType * begin() noexcept
ElementType * end() noexcept
void add(const ElementType &newElement)
void removeVoice(int index)
void reduceNumVoices(int newNumVoices)
virtual MPESynthesiserVoice * findFreeVoice(MPENote noteToFindVoiceFor, bool stealIfNoneAvailable) const
void stopVoice(MPESynthesiserVoice *voice, MPENote noteToStop, bool allowTailOff)
void setCurrentPlaybackSampleRate(double newRate) override
void startVoice(MPESynthesiserVoice *voice, MPENote noteToStart)
void notePressureChanged(MPENote changedNote) override
void noteReleased(MPENote finishedNote) override
void addVoice(MPESynthesiserVoice *newVoice)
~MPESynthesiser() override
virtual MPESynthesiserVoice * findVoiceToSteal(MPENote noteToStealVoiceFor=MPENote()) const
void noteTimbreChanged(MPENote changedNote) override
void noteAdded(MPENote newNote) override
MPESynthesiserVoice * getVoice(int index) const
void noteKeyStateChanged(MPENote changedNote) override
virtual void turnOffAllVoices(bool allowTailOff)
virtual void handleProgramChange(int, int)
void renderNextSubBlock(AudioBuffer< float > &outputAudio, int startSample, int numSamples) override
void notePitchbendChanged(MPENote changedNote) override
void handleMidiEvent(const MidiMessage &) override
virtual void handleController(int, int, int)
void setLowerZone(int numMemberChannels=0, int perNotePitchbendRange=48, int masterPitchbendRange=2) noexcept
int getChannel() const noexcept
bool isProgramChange() const noexcept
bool isController() const noexcept
int getControllerNumber() const noexcept
int getProgramChangeNumber() const noexcept
int getControllerValue() const noexcept
virtual void handleMidiEvent(const MidiMessage &)
void setZoneLayout(MPEZoneLayout newLayout)
std::unique_ptr< MPEInstrument > instrument
virtual void setCurrentPlaybackSampleRate(double sampleRate)
double getSampleRate() const noexcept