84 void prepareToPlay(
double sample_rate,
int buffer_size)
override;
96 void processBlock(AudioSampleBuffer&, MidiBuffer&)
override;
114 const String
getName()
const override;
230 double last_seconds_time_;
231 AudioPlayHead::CurrentPositionInfo position_info_;
233 std::map<std::string, ValueBridge*> bridge_lookup_;
235 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
SynthPlugin)
A base class providing foundational functionality for the Vital synthesizer’s engine,...
Definition synth_base.h:42
An interface class linking the Vital synthesizer backend (SynthBase) with a GUI.
Definition synth_gui_interface.h:56
An AudioProcessor implementation for a synthesizer plugin.
Definition synth_plugin.h:26
void parameterChanged(std::string name, vital::mono_float value) override
Called when a parameter changes externally via a ValueBridge.
Definition synth_plugin.cpp:188
void changeProgramName(int index, const String &new_name) override
Changes the name of a program (not implemented).
Definition synth_plugin.h:200
void processBlock(AudioSampleBuffer &, MidiBuffer &) override
Process audio and MIDI data each block.
Definition synth_plugin.cpp:139
void endChangeGesture(const std::string &name) override
Ends a parameter change gesture for the specified parameter.
Definition synth_plugin.cpp:51
void setStateInformation(const void *data, int size_in_bytes) override
Restores the plugin state from a memory block.
Definition synth_plugin.cpp:204
void prepareToPlay(double sample_rate, int buffer_size) override
Prepare the plugin to play with the given sample rate and buffer size.
Definition synth_plugin.cpp:128
bool acceptsMidi() const override
Checks if the plugin accepts MIDI input.
Definition synth_plugin.cpp:95
void releaseResources() override
Release any resources allocated for playback.
Definition synth_plugin.cpp:135
bool silenceInProducesSilenceOut() const override
Checks if silence in leads to silence out.
Definition synth_plugin.cpp:111
const String getOutputChannelName(int channel_index) const override
Returns the output channel name.
Definition synth_plugin.cpp:83
AudioProcessorEditor * createEditor() override
Creates and returns the AudioProcessorEditor for this plugin.
Definition synth_plugin.cpp:183
bool producesMidi() const override
Checks if the plugin produces MIDI output.
Definition synth_plugin.cpp:103
void beginChangeGesture(const std::string &name) override
Begins a parameter change gesture for the specified parameter.
Definition synth_plugin.cpp:45
void getStateInformation(MemoryBlock &destData) override
Saves the plugin state to a memory block.
Definition synth_plugin.cpp:193
int getNumPrograms() override
Returns the number of programs (only one here).
Definition synth_plugin.h:175
void setValueNotifyHost(const std::string &name, vital::mono_float value) override
Sets a parameter value and notifies the host.
Definition synth_plugin.cpp:57
bool supportsMPE() const override
Returns whether the plugin supports MPE (MIDI Polyphonic Expression).
Definition synth_plugin.h:120
AudioProcessorParameter * getBypassParameter() const override
Returns the bypass parameter for hosts that support bypass.
Definition synth_plugin.h:219
static constexpr int kSetProgramWaitMilliseconds
Wait time after setting a program.
Definition synth_plugin.h:28
const String getInputChannelName(int channel_index) const override
Returns the input channel name.
Definition synth_plugin.cpp:79
const String getProgramName(int index) override
Gets the name of a program.
Definition synth_plugin.cpp:119
void setCurrentProgram(int index) override
Sets the current program (does nothing here).
Definition synth_plugin.h:186
bool isInputChannelStereoPair(int index) const override
Checks if the given input channel forms a stereo pair.
Definition synth_plugin.cpp:87
bool hasEditor() const override
Checks if the plugin has an editor.
Definition synth_plugin.cpp:179
int getCurrentProgram() override
Returns the current program index (always 0 here).
Definition synth_plugin.h:180
SynthGuiInterface * getGuiInterface() override
Returns the GUI interface for this plugin.
Definition synth_plugin.cpp:37
const CriticalSection & getCriticalSection() override
Returns the CriticalSection for thread synchronization.
Definition synth_plugin.cpp:65
virtual ~SynthPlugin()
Destructor, cleans up allocated resources.
Definition synth_plugin.cpp:32
bool isOutputChannelStereoPair(int index) const override
Checks if the given output channel forms a stereo pair.
Definition synth_plugin.cpp:91
void pauseProcessing(bool pause) override
Pauses or resumes audio processing.
Definition synth_plugin.cpp:70
const String getName() const override
Returns the name of the plugin.
Definition synth_plugin.cpp:75
SynthPlugin()
Constructs the SynthPlugin.
Definition synth_plugin.cpp:12
double getTailLengthSeconds() const override
Gets the plugin's tail length in seconds.
Definition synth_plugin.cpp:115
An interface for receiving parameter change notifications from the ValueBridge.
Definition value_bridge.h:27
A parameter bridge that connects a vital::Value to an AudioProcessorParameter, allowing the host to m...
Definition value_bridge.h:17
float mono_float
Definition common.h:33