Add EEL transformation formula presets
Especially with the addition of rel_time (#593), having a few nice presets available would make the power of EEL transformation much more obvious.
It would be cool to make sets of presets sharable via ReaPack, similar to compartment presets. Each preset should contain at least the following information:
- Name
- Language: Only EEL at the moment, but we might add the expression language later
- Minimum ReaLearn version (displayed as "Made for newer version" but still loadable)
- The actual formula
Great idea, I'm finding the rel_time and EEL syntax to be more powerful than expected but somewhat difficult to get my head around.
I'm not sure how it would be displayed (maybe in the user guide) but an optional picture of the transformation could be helpful in some cases, i.e. to illustrate different curves
I'm not sure whether there are many "shareable" formulas, as they depend so much on what your context/setup is (and ReaLearn can be used in so many different contexts). But I would like to have something like a drop-down with your 5 last used, or favorite formulas. Besides the name, it might also be nice to have a short comment (didn't we also discuss this for compartment presets?)
I can think of a few different general transformation presets that would be handy:
Follow one exponential curve for the first half of the range and a different exponential curve for the second Follow one exponential curve for the first half of the range and then return back to original value with a different exponential curve Very subtle random movement around current value Triangle, Square, Saw LFOs LFOs that mostly follow their shape but have occasional random flutters
@arthurmcarthur1 As a first attempt, I'm soon going to hard-code some formulas. The ones you mentioned are just descriptions so far. If you create some actual formulas, I can include them. Hint: You can get a graphical representation by entering them on Google.
Here are some candidates on my list:
- Debouncing press/release (keep target "on" as long as moving fader and switch if "off" after not moving it for some time, to be used with fader/knob/encoder, good for the new mouse target to simulate a mouse drag, but also good with "Track: Set automation touch state" target to implement an auto-touch/release when you don't have a touch-sensitive fader at hand):
y = y == 0 ? 1 : (rel_time < 200 ? none : stop(0)) - Smooth transition from current value to control value (to be used with button press):
rel_time; y = abs(x - y) < 0.05 ? stop : y + 0.1 * (x - y)(can probably be improved by newstop()function) - Sinus LFO (to be used with button press):
y = (sin(rel_time / 500) + 1) / 2 - Linear transition to control value (1 second, to be used with button press):
y = abs(x - y) < 0.05 ? stop : x * min(rel_time / 500, 1)(can probably be improved by newstop()function) - 2 seconds chaos (to be used with button press):
y = rel_time < 2000 ? rand(1) : stop - Setting a value with delay (to be used with button press):
y = rel_time < 2000 ? none : stop(0.5)
Some others yet to come:
- LFO while button pressed (to be used with momentary button)
- Simulate a click (to be used with button press, turn target on and immediately off a tiny bit later) ... good for the new mouse target or trigger-like parameters such "Panic" in ColourCopy
- Simulate a double click (to be used with button press, turn target on/off twice) ... good for the new mouse target
Also, I think the preset should contain a description with hints what this formula is good for and how it can be adjusted etc.
I've added some templates to the new editor. Will keep adding more templates ad-hoc whenever there's something nice to add.