Vital
Loading...
Searching...
No Matches
lfo_module.h
Go to the documentation of this file.
1#pragma once
2
3#include "synth_module.h"
4
5class LineGenerator;
6
7namespace vital {
8
9 class SynthLfo;
10
18 class LfoModule : public SynthModule {
19 public:
27 enum {
32 };
33
41 enum {
46 };
47
55 LfoModule(const std::string& prefix, LineGenerator* line_generator, const Output* beats_per_second);
56 virtual ~LfoModule() { }
57
61 void init() override;
62
67 virtual Processor* clone() const override { return new LfoModule(*this); }
68
74 void correctToTime(double seconds) override;
75
81 void setControlRate(bool control_rate) override;
82
83 protected:
84 std::string prefix_;
87
88 JUCE_LEAK_DETECTOR(LfoModule)
89 };
90} // namespace vital
A class for generating and storing a line shape, defined by a series of points and associated powers.
Definition line_generator.h:20
A module that generates a Low-Frequency Oscillation (LFO) signal from a LineGenerator source.
Definition lfo_module.h:18
const Output * beats_per_second_
Reference for tempo synchronization.
Definition lfo_module.h:86
SynthLfo * lfo_
The internal SynthLfo processor generating the LFO signal.
Definition lfo_module.h:85
std::string prefix_
Prefix for parameter naming.
Definition lfo_module.h:84
void correctToTime(double seconds) override
Aligns the LFO's phase to a specific time, useful for syncing to a host timeline.
Definition lfo_module.cpp:60
virtual Processor * clone() const override
Creates a clone of the LfoModule with identical settings.
Definition lfo_module.h:67
@ kMidi
Definition lfo_module.h:30
@ kNoteCount
Definition lfo_module.h:29
@ kNumInputs
Definition lfo_module.h:31
@ kNoteTrigger
Definition lfo_module.h:28
@ kOscPhase
Definition lfo_module.h:43
@ kValue
Definition lfo_module.h:42
@ kNumOutputs
Definition lfo_module.h:45
@ kOscFrequency
Definition lfo_module.h:44
void setControlRate(bool control_rate) override
Sets whether the LFO should run at control-rate or audio-rate.
Definition lfo_module.cpp:67
LfoModule(const std::string &prefix, LineGenerator *line_generator, const Output *beats_per_second)
Constructs an LfoModule.
Definition lfo_module.cpp:8
virtual ~LfoModule()
Definition lfo_module.h:56
void init() override
Initializes the LfoModule, creating parameters and linking them to the SynthLfo processor.
Definition lfo_module.cpp:20
Base class for all signal-processing units in Vital.
Definition processor.h:212
A versatile Low-Frequency Oscillator (LFO) for audio synthesis, supporting multiple sync modes and sm...
Definition synth_lfo.h:16
A ProcessorRouter that encapsulates a cohesive unit of functionality in the synthesizer.
Definition synth_module.h:129
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
Defines the SynthModule class which extends ProcessorRouter to form a building block of the Vital syn...