Simple formula device improvement regarding lfo resets

This idea was coming to me often. Now just again.

In renoise, we seem to have 3 different kinds of event sending types in meta/modulation devices.

First is to send only updated values - this is the hydra for example, I think macros/doofers also work this way.

Another is to send on each “event” which is what keytracker and velocity tracker will do, it is especially useful for retriggering LFOs as it will not “freeze” the lfo and work on each event even if it is the same as the last.

The third is a bit unfortunate, it is the formula device which will send on every single tick, regardless of changed value or not. So it will freeze lfos instead of triggering the sync once, and programming lfo triggers will mean to use a hydra in between and haing a sync lag of a line or a tick to live with.

To make the formula device more flexible, I propose a simple change to the way it works.

Instead of always having zo return a number, it should be made valid to return the “nil” value from code, to prevent further events. This way one could send a trigger on one tick, and nil on all others to directly sync an lfo from a formula, and not having to cope with the lag any more.

Further it could be made valid that each parameter (A,B,C) could also be “nil”, like when a keytracker is plugged into it it would only have a value on the tick when the keytracker is actually triggering it. As not to break older formulas, the parameter variables could be redefined into different names, like “AE, BE, CE”, to take into account that they are sensitive to the event style parameter updates.

The first change could be made without breaking compatibility to older formulas, the second could be more sensitive to fomulas expecting a value between 0 or 1, or using the potentially new reserved variable names for other purposes.