surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.12k stars 400 forks source link

Additional triggers in the LFOModulationSource #4548

Open mkruselj opened 3 years ago

mkruselj commented 3 years ago

Currently, there are retrigger_FEG and retrigger_AEG members in LFOModulationSource, that allow the voice step sequencers (and, since #4201 was implemented, MSEGs) retriggering the filter and amplifier envelopes.

Add an additional set of triggers (well, several vectors of triggers), that will allow triggering oscillators (currently, String and certain modes of Twist would require this, as per #4370), and also retriggering the LFO EGs.

UI-wise, there's lots to discuss, but for the time being we could have three-part instead of two-part split in the step sequencer trigger row:

image

This poses an issue where the default left click would enable all triggers, where in most cases we'd want just FEG and AEG to trigger simultaneously. Which leads us to the likely scenario that we would need to break off the triggers in step seq into separate lanes (so 3 lanes total), in order to free up the right click, so that we can use it in the additional trigger lane to pick the destination for the trigger (osc 1/2/3, any of the voice LFO EGs).

In MSEG and Formula this is rather easy - for MSEG it's in the RMB menu on the node, but we should also figure out a visual way to edit it.

This issue essentially subsumes #4370 so gonna close that one. It's also likely a much simpler way of gaining more flexibility regarding triggering stuff, compared to proposal in #4366.

baconpaul commented 3 years ago

So some technical notes to myself

data structures in LFOModulationSource

   bool osc_retrigger[n_oscs], lfo_retrigger[n_lfos]

in surge voice scan those and call lfo->attack() for lfo or a newly defined osc->externalRetrigger() which we add to oscbase

then basically add it as an output layer in the Formula and test it

then go whack the mseg

then think about how to do step sequencer

clearly formula is the place to start as we hash out the bugs though

on and for now only string and twist would do anything in externalRetrigger (twist would hit the LPG if active; string would re-burst if in a burst mode)

mkruselj commented 3 years ago

This one is very much linked to #2678. So let's link it.

mkruselj commented 3 years ago

@baconpaul This one needs some serious UI design work and discussion. Bumping it to XT 2.0.

baconpaul commented 3 years ago

Ha I almost did exactly this last night