Vital
Loading...
Searching...
No Matches
reorderable_effect_chain.h
Go to the documentation of this file.
1#pragma once
2
3#include "synth_module.h"
4#include "synth_constants.h"
5
6namespace vital {
7
8 class StereoMemory;
9
18 public:
23 enum {
27 };
28
35 ReorderableEffectChain(const Output* beats_per_second, const Output* keytrack);
36
42 virtual void process(int num_samples) override;
43
49 virtual void hardReset() override;
50
57 virtual void processWithInput(const poly_float* audio_in, int num_samples) override;
58
64 virtual Processor* clone() const override { return new ReorderableEffectChain(*this); }
65
73 virtual void correctToTime(double seconds) override;
74
81 SynthModule* getEffect(constants::Effect effect) { return effects_[effect]; }
82
91
92 protected:
102
111 JUCE_LEAK_DETECTOR(ReorderableEffectChain)
112 };
113} // namespace vital
Base class for all signal-processing units in Vital.
Definition processor.h:212
A module that manages a chain of audio effects whose order can be dynamically changed.
Definition reorderable_effect_chain.h:17
SynthModule * createEffectModule(int index)
Creates an effect module based on a given index.
Definition reorderable_effect_chain.cpp:108
virtual void hardReset() override
Performs a hard reset on all effects in the chain.
Definition reorderable_effect_chain.cpp:185
Value * effects_on_[constants::kNumEffects]
Definition reorderable_effect_chain.h:107
virtual void process(int num_samples) override
Processes a block of audio samples using the configured effect chain order.
Definition reorderable_effect_chain.cpp:143
SynthModule * getEffect(constants::Effect effect)
Retrieves a pointer to a specific effect in the chain by its enum type.
Definition reorderable_effect_chain.h:81
virtual void correctToTime(double seconds) override
Corrects the timing of all effects to a given playback time.
Definition reorderable_effect_chain.cpp:195
float last_order_
Definition reorderable_effect_chain.h:109
ReorderableEffectChain(const Output *beats_per_second, const Output *keytrack)
Constructs a ReorderableEffectChain.
Definition reorderable_effect_chain.cpp:81
const Output * keytrack_
Definition reorderable_effect_chain.h:105
@ kOrder
Definition reorderable_effect_chain.h:25
@ kNumInputs
Definition reorderable_effect_chain.h:26
@ kAudio
Definition reorderable_effect_chain.h:24
virtual Processor * clone() const override
Creates a clone of this ReorderableEffectChain.
Definition reorderable_effect_chain.h:64
int effect_order_[constants::kNumEffects]
Definition reorderable_effect_chain.h:108
const StereoMemory * equalizer_memory_
Definition reorderable_effect_chain.h:103
SynthModule * effects_[constants::kNumEffects]
Definition reorderable_effect_chain.h:106
const StereoMemory * getEqualizerMemory()
Retrieves the memory object used by the equalizer effect.
Definition reorderable_effect_chain.h:90
const Output * beats_per_second_
Definition reorderable_effect_chain.h:104
virtual void processWithInput(const poly_float *audio_in, int num_samples) override
Processes a block of samples from a given input buffer.
Definition reorderable_effect_chain.cpp:157
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
A Processor that maintains and outputs a constant poly_float value.
Definition value.h:24
Effect
Identifiers for the various audio effects available in Vital.
Definition synth_constants.h:177
@ kNumEffects
Definition synth_constants.h:187
Contains classes and functions used within the Vital synthesizer framework.
Holds and manages a buffer of samples (poly_float) for a Processor's output.
Definition processor.h:35
Represents a vector of floating-point values using SIMD instructions.
Definition poly_values.h:600
Defines the SynthModule class which extends ProcessorRouter to form a building block of the Vital syn...