14 class ReorderableEffectChain;
16 class SynthVoiceHandler;
67 void process(
int num_samples)
override;
367 int last_oversampling_amount_;
368 int last_sample_rate_;
369 Value* oversampling_;
377 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
SoundEngine)
A class for generating and storing a line shape, defined by a series of points and associated powers.
Definition line_generator.h:20
A class for managing microtonal tunings and custom pitch mappings in Vital.
Definition tuning.h:23
Adds two input buffers sample-by-sample.
Definition operators.h:205
A generic circular buffer (FIFO) data structure that allows adding and removing elements efficiently.
Definition circular_queue.h:32
A ProcessorRouter that intelligently reduces audio sample rate based on configured stages.
Definition decimator.h:19
A container managing a fixed number of ModulationConnections.
Definition synth_types.h:87
An interface for handling MIDI note events within a synthesizer or audio system.
Definition note_handler.h:16
A processor that computes both instantaneous peak and a "memory peak" of an incoming audio signal.
Definition peak_meter.h:27
A module that manages a chain of audio effects whose order can be dynamically changed.
Definition reorderable_effect_chain.h:17
Holds and manages a single sampled waveform, including stereo or mono data and multiple band-limited ...
Definition sample_source.h:25
Core class responsible for handling note events, oversampling, and the main effects chain.
Definition sound_engine.h:33
void setModWheelAllChannels(mono_float value)
Sets the modulation wheel value for all channels.
void setPitchWheel(mono_float value, int channel)
Sets the pitch wheel value for a given channel.
LineGenerator * getLfoSource(int index)
Gets a pointer to an LFO source by index.
void sustainOnRange(int from_channel, int to_channel)
Turns sustain on for a range of channels.
Wavetable * getWavetable(int index)
Gets a pointer to a wavetable by index.
void sustainOn(int channel)
Turns sustain on for a given channel.
void correctToTime(double seconds) override
Corrects internal timing to a given absolute time in seconds.
void sostenutoOff(int sample, int channel)
Turns sostenuto off for a given channel at a specific sample.
void process(int num_samples) override
Processes a block of samples through the voice handler and effects chain.
Definition sound_engine.cpp:234
void allSoundsOff() override
Turns off all sounds immediately.
void setChannelAftertouch(int channel, mono_float value, int sample)
Sets aftertouch values for an entire channel.
void sostenutoOnRange(int from_channel, int to_channel)
Turns sostenuto on for a range of channels.
void allNotesOff(int sample) override
Sends all voices a note-off command at a given sample.
static constexpr int kDefaultOversamplingAmount
Default oversampling factor.
Definition sound_engine.h:37
bool isModSourceEnabled(const std::string &source)
Checks if a modulation source is enabled.
SoundEngine()
Constructs a new SoundEngine instance.
void setZonedPitchWheel(mono_float value, int from_channel, int to_channel)
Sets the pitch wheel value for a range of channels.
void disconnectModulation(const modulation_change &change)
Disconnects a previously connected modulation source from its destination.
void checkOversampling()
Checks if the oversampling settings have changed and updates accordingly.
void setOversamplingAmount(int oversampling_amount, int sample_rate)
Configures the engine’s oversampling factor and sample rate.
Definition sound_engine.cpp:272
void sostenutoOn(int channel)
Turns sostenuto on for a given channel.
void setChannelSlide(int channel, mono_float value, int sample)
Sets channel-based slide (MPE/MIDI CC glides).
ModulationConnectionBank & getModulationBank()
Gets the modulation connection bank for this engine.
int getNumActiveVoices()
Gets the number of currently active voices.
static constexpr int kDefaultSampleRate
Default sample rate used before explicit configuration.
Definition sound_engine.h:42
void sustainOffRange(int sample, int from_channel, int to_channel)
Turns sustain off for a range of channels at a given sample.
void setTuning(const Tuning *tuning)
Sets the tuning to use for pitch calculations.
void setChannelRangeSlide(int from_channel, int to_channel, mono_float value, int sample)
Sets slide values for a range of channels.
void noteOn(int note, mono_float velocity, int sample, int channel) override
Triggers a note-on event.
void setChannelRangeAftertouch(int from_channel, int to_channel, mono_float value, int sample)
Sets aftertouch values for a range of channels.
void enableModSource(const std::string &source)
Enables a modulation source by name.
void disableUnnecessaryModSources()
Disables any modulation sources that are not required.
const StereoMemory * getEqualizerMemory()
Gets a pointer to the stereo memory used by the equalizer.
void connectModulation(const modulation_change &change)
Connects a modulation source to its destination.
void sustainOff(int sample, int channel)
Turns sustain off for a given channel at a specific sample.
force_inline int getOversamplingAmount() const
Gets the current oversampling amount.
Definition sound_engine.h:348
Sample * getSample()
Gets a pointer to the Sample object.
void init() override
Initializes the SoundEngine, setting up controls, voices, and effects.
mono_float getLastActiveNote() const
Gets the last active note played.
void allNotesOffRange(int sample, int from_channel, int to_channel)
Sends all voices in a range of channels a note-off command.
void allNotesOff(int sample, int channel) override
Sends all voices on a given channel a note-off command.
void setModWheel(mono_float value, int channel)
Sets the modulation wheel value for a given channel.
void disableModSource(const std::string &source)
Disables a modulation source by name.
void sostenutoOffRange(int sample, int from_channel, int to_channel)
Turns sostenuto off for a range of channels at a given sample.
int getNumPressedNotes()
Gets the number of currently pressed notes.
void setBpm(mono_float bpm)
Sets the BPM (beats per minute) value for the engine.
void noteOff(int note, mono_float lift, int sample, int channel) override
Triggers a note-off event.
virtual ~SoundEngine()
Destroys the SoundEngine instance.
void setAftertouch(mono_float note, mono_float value, int sample, int channel)
Sets note-based aftertouch values.
A specialized MemoryTemplate for two-channel (stereo) audio.
Definition memory.h:216
A ProcessorRouter that encapsulates a cohesive unit of functionality in the synthesizer.
Definition synth_module.h:129
Manages per-voice processing of audio signals within the Vital synthesizer.
Definition synth_voice_handler.h:31
A Processor that maintains and outputs a constant poly_float value.
Definition value.h:24
A class representing a wavetable, holding multiple frames of waveforms and their frequency-domain rep...
Definition wavetable.h:20
#define force_inline
Definition common.h:23
Contains classes and functions used within the Vital synthesizer framework.
float mono_float
Definition common.h:33
A structure describing changes to the modulation routing in the engine.
Definition synth_types.h:199
Defines the SynthModule class which extends ProcessorRouter to form a building block of the Vital syn...