This is my first LFO in a midi plugin; I think its normal to update the LFO value by processSample
.
However, I am only iterating through midi messages in my buffer in the process block, not samples.
How do I ensure the accurate updating of the LFO value in this situation?
void myplugin::processBlock(juce::AudioBuffer<float>& buffer, juce::MidiBuffer& midiMessages)
{
buffer.clear();
juce::MidiBuffer processedMidi;
juce::MidiMessage currentMessage;
int samplePos;
juce::MidiBuffer::Iterator it(midiMessages);
while (it.getNextEvent(currentMessage, samplePos))
{
// Process my LFO values
float lfo1Value = mLfo1.processSample(0.0f) * get_mLfo1Depth() + get_mLfo1Offset();