8 {P::Decay, [
this](
float x) {
setDecay(x); }, 0},
9 {P::Sustain, [
this](
float x) {
setSustain(x); }, 2},
10 {P::Release, [
this](
float x) {
setRelease(x); }, 0}});
17 m_adsr.setSampleRate(sampleRate);
20 m_buffer.setSize(1, samplesPerBlock);
31 auto numSamples = buffer.getNumSamples();
32 auto numChannels = buffer.getNumChannels();
33 auto bufferPtr = buffer.getArrayOfWritePointers();
35 auto modulatorBufferPtr =
m_buffer.getWritePointer(0);
39 for (
int sampleIndex = 0; sampleIndex < numSamples; sampleIndex++)
43 auto amp =
m_adsr.getNextSample();
46 modulatorBufferPtr[sampleIndex] = amp;
49 for (
int channelIndex = 0; channelIndex < numChannels; channelIndex++)
50 bufferPtr[channelIndex][sampleIndex] *= amp;
void setValues(const float *values, int numValues)
Definition ModulationSource.h:34
Definition AirAbsorptionFilter.cpp:2
static const int MIDI_NOTE_FLAG_DRONE_NOTEUP
Definition OscillatorUtils.h:23
static const int MIDI_NOTE_FLAG_DRONE
Definition OscillatorUtils.h:22