26#ifndef WATER_SYNTHESISER_H_INCLUDED
27#define WATER_SYNTHESISER_H_INCLUDED
33#include "CarlaJuceUtils.hpp"
34#include "CarlaMutex.hpp"
133 int currentPitchWheelPosition) = 0;
150 virtual void stopNote (
float velocity,
bool allowTailOff) = 0;
380 virtual void noteOn (
int midiChannel,
396 virtual void noteOff (
int midiChannel,
445 int controllerNumber,
446 int controllerValue);
461 virtual void handleAftertouch (
int midiChannel,
int midiNoteNumber,
int aftertouchValue);
551 int startSample,
int numSamples);
575 bool stealIfNoneAvailable)
const;
584 int midiNoteNumber)
const;
617 CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
Synthesiser)
#define noexcept
Definition DistrhoDefines.h:72
Definition AudioSampleBuffer.h:42
Definition MidiBuffer.h:48
Definition MidiMessage.h:40
Definition OwnedArray.h:57
Definition ReferenceCountedArray.h:56
ReferenceCountedObject()
Definition ReferenceCountedObject.h:107
Definition ReferenceCountedObject.h:227
size_t getNumVoices() const noexcept
Definition Synthesiser.h:314
double sampleRate
Definition Synthesiser.h:610
bool isNoteStealingEnabled() const noexcept
Definition Synthesiser.h:364
bool sustainPedalsDown[17]
Definition Synthesiser.h:615
virtual void handleSoftPedal(int midiChannel, bool isDown)
Definition Synthesiser.cpp:491
virtual void handleSostenutoPedal(int midiChannel, bool isDown)
Definition Synthesiser.cpp:473
int lastPitchWheelValues[16]
Definition Synthesiser.h:562
virtual void renderVoices(AudioSampleBuffer &outputAudio, int startSample, int numSamples)
Definition Synthesiser.cpp:224
virtual void allNotesOff(int midiChannel, bool allowTailOff)
Definition Synthesiser.cpp:367
virtual ~Synthesiser()
Definition Synthesiser.cpp:99
virtual SynthesiserVoice * findVoiceToSteal(SynthesiserSound *soundToPlay, int midiChannel, int midiNoteNumber) const
Definition Synthesiser.cpp:531
SynthesiserSound * getSound(int index) const noexcept
Definition Synthesiser.h:340
void removeSound(int index)
Definition Synthesiser.cpp:135
virtual void handleSustainPedal(int midiChannel, bool isDown)
Definition Synthesiser.cpp:438
int minimumSubBlockSize
Definition Synthesiser.h:612
void setMinimumRenderingSubdivisionSize(int numSamples, bool shouldBeStrict=false) noexcept
Definition Synthesiser.cpp:145
int getNumSounds() const noexcept
Definition Synthesiser.h:337
Synthesiser()
Definition Synthesiser.cpp:86
double getSampleRate() const noexcept
Definition Synthesiser.h:522
void removeVoice(int index)
Definition Synthesiser.cpp:120
void clearVoices()
Definition Synthesiser.cpp:109
virtual void handleChannelPressure(int midiChannel, int channelPressureValue)
Definition Synthesiser.cpp:426
virtual void handlePitchWheel(int midiChannel, int wheelValue)
Definition Synthesiser.cpp:380
void stopVoice(SynthesiserVoice *, float velocity, bool allowTailOff)
Definition Synthesiser.cpp:326
void renderNextBlock(AudioSampleBuffer &outputAudio, const MidiBuffer &inputMidi, int startSample, int numSamples)
Definition Synthesiser.h:513
void processNextBlock(AudioSampleBuffer &outputAudio, const MidiBuffer &inputMidi, int startSample, int numSamples)
Definition Synthesiser.cpp:166
void setNoteStealingEnabled(bool shouldStealNotes)
Definition Synthesiser.cpp:140
uint32 lastNoteOnCounter
Definition Synthesiser.h:611
virtual void setCurrentPlaybackSampleRate(double sampleRate)
Definition Synthesiser.cpp:153
virtual void handleMidiEvent(const MidiMessage &)
Definition Synthesiser.cpp:230
bool shouldStealNotes
Definition Synthesiser.h:614
SynthesiserVoice * getVoice(int index) const
Definition Synthesiser.cpp:104
bool subBlockSubdivisionIsStrict
Definition Synthesiser.h:613
virtual void handleController(int midiChannel, int controllerNumber, int controllerValue)
Definition Synthesiser.cpp:391
virtual SynthesiserVoice * findFreeVoice(SynthesiserSound *soundToPlay, int midiChannel, int midiNoteNumber, bool stealIfNoneAvailable) const
Definition Synthesiser.cpp:504
virtual void noteOn(int midiChannel, int midiNoteNumber, float velocity)
Definition Synthesiser.cpp:271
void startVoice(SynthesiserVoice *voice, SynthesiserSound *sound, int midiChannel, int midiNoteNumber, float velocity)
Definition Synthesiser.cpp:300
virtual void handleProgramChange(int midiChannel, int programNumber)
Definition Synthesiser.cpp:497
void clearSounds()
Definition Synthesiser.cpp:125
SynthesiserSound * addSound(const SynthesiserSound::Ptr &newSound)
Definition Synthesiser.cpp:130
virtual void noteOff(int midiChannel, int midiNoteNumber, float velocity, bool allowTailOff)
Definition Synthesiser.cpp:336
OwnedArray< SynthesiserVoice > voices
Definition Synthesiser.h:558
SynthesiserVoice * addVoice(SynthesiserVoice *newVoice)
Definition Synthesiser.cpp:114
ReferenceCountedArray< SynthesiserSound > sounds
Definition Synthesiser.h:559
virtual void handleAftertouch(int midiChannel, int midiNoteNumber, int aftertouchValue)
Definition Synthesiser.cpp:413
Definition Synthesiser.h:52
virtual ~SynthesiserSound()
Definition Synthesiser.cpp:36
virtual bool appliesToChannel(int midiChannel)=0
virtual bool appliesToNote(int midiNoteNumber)=0
SynthesiserSound()
Definition Synthesiser.cpp:35
ReferenceCountedObjectPtr< SynthesiserSound > Ptr
Definition Synthesiser.h:77
Definition Synthesiser.h:96
bool keyIsDown
Definition Synthesiser.h:265
SynthesiserSound::Ptr currentlyPlayingSound
Definition Synthesiser.h:264
bool isKeyDown() const noexcept
Definition Synthesiser.h:224
bool isSostenutoPedalDown() const noexcept
Definition Synthesiser.h:230
virtual void aftertouchChanged(int newAftertouchValue)
Definition Synthesiser.cpp:76
bool sustainPedalDown
Definition Synthesiser.h:265
int currentlyPlayingNote
Definition Synthesiser.h:262
bool isSustainPedalDown() const noexcept
Definition Synthesiser.h:227
int currentPlayingMidiChannel
Definition Synthesiser.h:262
virtual ~SynthesiserVoice()
Definition Synthesiser.cpp:50
virtual void channelPressureChanged(int newChannelPressureValue)
Definition Synthesiser.cpp:77
void clearCurrentNote()
Definition Synthesiser.cpp:69
virtual void stopNote(float velocity, bool allowTailOff)=0
virtual void renderNextBlock(AudioSampleBuffer &outputBuffer, int startSample, int numSamples)=0
friend class Synthesiser
Definition Synthesiser.h:259
SynthesiserSound::Ptr getCurrentlyPlayingSound() const noexcept
Definition Synthesiser.h:114
virtual void controllerMoved(int controllerNumber, int newControllerValue)=0
bool isPlayingButReleased() const noexcept
Definition Synthesiser.h:233
double currentSampleRate
Definition Synthesiser.h:261
int getCurrentlyPlayingNote() const noexcept
Definition Synthesiser.h:109
virtual void setCurrentPlaybackSampleRate(double newRate)
Definition Synthesiser.cpp:59
bool wasStartedBefore(const SynthesiserVoice &other) const noexcept
Definition Synthesiser.cpp:79
SynthesiserVoice()
Definition Synthesiser.cpp:39
virtual bool isPlayingChannel(int midiChannel) const
Definition Synthesiser.cpp:54
virtual void startNote(int midiNoteNumber, float velocity, SynthesiserSound *sound, int currentPitchWheelPosition)=0
virtual void pitchWheelMoved(int newPitchWheelValue)=0
virtual bool canPlaySound(SynthesiserSound *)=0
AudioSampleBuffer tempBuffer
Definition Synthesiser.h:267
uint32 noteOnTime
Definition Synthesiser.h:263
bool sostenutoPedalDown
Definition Synthesiser.h:265
virtual bool isVoiceActive() const
Definition Synthesiser.cpp:64
double getSampleRate() const noexcept
Definition Synthesiser.h:218
Definition AudioSampleBuffer.h:33
unsigned int uint32
Definition water.h:98
#define const
Definition zconf.h:137