sfizz icon indicating copy to clipboard operation
sfizz copied to clipboard

Add support for LFOs

Open paulfd opened this issue 5 years ago • 2 comments

@jpcima already provided the LFO generation in #43 which allows to generate the waveforms from opcodes. What is needed now:

  • [x] Plumbing to have Regions store this information (with quick tests)
  • [x] Add either an LFOPool or a preallocation in the synth so that Voices can have the necessary allocated space to handle LFO operation
  • [x] Add CC/pitch modulation to LFO targets
  • [x] Add monophonic aftertouch event tracking in the midi state, LV2 and VST plugins
  • [x] Add aftertouch modulation to LFO targets
  • [ ] Add LFO modulation to LFO targets

Some questions remaining:

  • Are LFOs on different voices/regions supposed to be synchronized somehow?
  • Since LFOs can modulate LFOs, there needs to be a way to avoid cycles in this modulation graph. Either we force an evaluation order (the preferred, simpler approach) with a cycle check. Maybe verify/ask what other implementations are doing.

paulfd avatar Apr 02 '20 11:04 paulfd

LFOs synchronize with the start of note of their region. That includes their phase, their start delay, etc..

jpcima avatar Apr 02 '20 12:04 jpcima

@paulfd there was a discussion to allow voice LFO's to have a free running setting.

I'm assuming that such setting would lock the LFO to global time. Hence it would act differently for LFOs defined by beat- or freq.

Obviously for free running defined LFOs, there would be no sync with start of note, and other LFO opcodes.

However free running phase would be possible. (Assuming a free running LFO would be 0° at time 0)

AlexMitchellMus avatar Oct 09 '20 02:10 AlexMitchellMus