113 WSOscillator(std::shared_ptr<MidiInputData> _midiInputData,
114 std::shared_ptr<WSOscParameters> _parameters,
115 std::shared_ptr<WavetableDatabase> _waveTableDatabase,
116 uint32_t blockSize = 64);
122 virtual bool reset(
double _sampleRate)
override;
123 virtual bool update()
override;
124 virtual bool render(uint32_t samplesToProcess = 1)
override;
131 void mixOscBuffers(std::shared_ptr<AudioBuffer> oscBuffers, uint32_t samplesInBlock,
double scaling);
134 bool oscIsFree(uint32_t oscIndex, uint32_t waveAIndex, uint32_t waveBIndex);
136 void setNewOscWaveA(uint32_t oscIndex, uint32_t waveAIndex,
double oscAMixCoeff);
137 void setNewOscWaveB(uint32_t oscIndex, uint32_t waveBIndex,
double oscBMixCoeff);
148 std::shared_ptr<WSOscParameters> parameters =
nullptr;
151 std::shared_ptr<WTOscillator> waveSeqOsc[
NUM_WS_OSCILLATORS] = {
nullptr,
nullptr,
nullptr,
nullptr };
152 std::shared_ptr<WTOscParameters> waveSeqParams[
NUM_WS_OSCILLATORS] = {
nullptr,
nullptr,
nullptr,
nullptr };
156 int32_t currSoloWave = -1;
162 bool initRoundRobin =
true;
165 std::vector<WaveStringData> waveStringFinder;
bool oscIsFree(uint32_t oscIndex, uint32_t waveAIndex, uint32_t waveBIndex)
Finds out if oscillator has the same core and waveform index as the selection.
Definition: wsoscillator.cpp:335
void setNewOscWaveA(uint32_t oscIndex, uint32_t waveAIndex, double oscAMixCoeff)
Change oscillator's waveform to Wave A.
Definition: wsoscillator.cpp:374
virtual bool startGlideModulation(GlideInfo &glideInfo) override
Calls the startGlideModulation handler for the first two oscillators; these will always be the first ...
Definition: wsoscillator.cpp:266
uint32_t activeOsc[2]
active pair
Definition: wsoscillator.h:155
virtual bool doNoteOn(MIDINoteEvent ¬eEvent) override
Calls the note-on handler for all cores on all four internal oscillators so that they will be running...
Definition: wsoscillator.cpp:227
virtual bool reset(double _sampleRate) override
Resets object to initialized state.
Definition: wsoscillator.cpp:71
virtual bool render(uint32_t samplesToProcess=1) override
Renders audio from the selected core.
Definition: wsoscillator.cpp:204
void makeWaveStringMap()
Creates a mapping that links the waveform names to their underlying cores and oscillators.
Definition: wsoscillator.cpp:279
Definition: addosccore.cpp:4
Definition: synthstructures.h:235
This is an aggregate of 4 wavetable oscillators being controlled with the single object that appears ...
Definition: wsoscillator.h:109
virtual ~WSOscillator()
Definition: wsoscillator.h:119
virtual bool update() override
Updates the the two active oscillators.
Definition: wsoscillator.cpp:129
virtual bool doNoteOff(MIDINoteEvent ¬eEvent) override
Calls the note-off handler on four internal oscillators.
Definition: wsoscillator.cpp:251
Abstract base class that encapsulates functionality of a module; used with the Module-Core paradigm...
Definition: synthbase.h:1600
void mixOscBuffers(std::shared_ptr< AudioBuffer > oscBuffers, uint32_t samplesInBlock, double scaling)
Helper function to mix oscillator buffers together during render() phase into the audio buffers on th...
Definition: wsoscillator.cpp:311
See also Designing Software Synthesizers in C++ 2nd Ed. by Will Pirkle.
void updateActiveOscillators()
Updates the two active oscillators during the update() phase.
Definition: wsoscillator.cpp:96
void setNewOscWaveB(uint32_t oscIndex, uint32_t waveBIndex, double oscBMixCoeff)
Change oscillator's waveform to Wave B.
Definition: wsoscillator.cpp:397
WSOscillator(std::shared_ptr< MidiInputData > _midiInputData, std::shared_ptr< WSOscParameters > _parameters, std::shared_ptr< WavetableDatabase > _waveTableDatabase, uint32_t blockSize=64)
Constructs Wave Sequencing Oscillator module.
Definition: wsoscillator.cpp:31
bool oscHasWaveIndex(uint32_t oscIndex, uint32_t waveIndex)
Finds out if oscillator has the same waveform index as the selection.
Definition: wsoscillator.cpp:356
hard-coded arrays of FIR filter coefficients for the sample rate conversion objects (Interpolator and...
std::shared_ptr< WTOscillator > getWTOscillator(uint32_t index)
Provides direct access to internal oscillator objects.
Definition: wsoscillator.cpp:428
std::shared_ptr< Modulators > getWSOscModulationInput(uint32_t oscIndex)
Gets the modulation input array pointer from one of the internal oscillators.
Definition: wsoscillator.cpp:417
const uint32_t NUM_WS_OSCILLATORS
Definition: synthconstants.h:100
Information about a MIDI note event (note on or note off).
Definition: synthstructures.h:212
See also Designing Software Synthesizers in C++ 2nd Ed. by Will Pirkle.