Skip to content

Lemon wiki

Lemon Formula Controller

Lemon Formula Controller makes no sound of its own. You type a formula, and it works the formula out as the song plays and sends the result out as a control value. Use it for slow sweeps, repeating ramps and wobbles that follow the song’s position, or for a bit of controlled randomness. It’s built into Lemon Studio and also comes as a VST3 and CLAP plugin for other DAWs.

The Lemon Formula Controller window: an INPUT card with three knobs and a FORMULA card with a text field

  1. Put Lemon Formula Controller in an effect slot on any mixer track. The sound passes through it untouched.
  2. Click the FORMULA field and type Frac(SongTime/4).
  3. Check the line under the field. Compiled ok means the formula is fine. Anything else is an error message that says what’s wrong.
  4. Link the controller’s output to the control you want it to move. Making a new link in the app isn’t available yet; see Good to know.
  5. Play the song. The linked control rises from nothing to full once every four beats, then starts again.

The INPUT card has three knobs, A, B and C. In a formula they are the numbers a, b and c, from 0 to 1, shown with three decimals. You can turn them while the song plays, or automate them.

A formula can also use:

  • SongTime, the song position in beats.
  • Rand, a new random number from 0 to 1 at every tick.
  • GetTempo, the tempo in beats per minute.
  • Pi, and the usual numbers and brackets.

Names aren’t case sensitive. The result is held between 0 and 1, so anything lower counts as 0 and anything higher as 1. The formula is worked out once for every tick of the song, 96 to a beat.

Use + - * / ^ for arithmetic, and functions such as Sin, Cos, Abs, Min, Max, Floor, Frac, Round, Sqrt and If. Frac keeps only the part after the decimal point, which turns a counter into a repeating ramp. Trigonometric functions work in radians.

Three formulas to try:

Formula What it does
Frac(SongTime/4) A ramp from 0 to 1 over four beats, then back to 0. Change the 4 to change the length.
Sin(SongTime*Pi/2)*0.5+0.5 A smooth wave that takes four beats to go from low to high and back.
a+Rand*b A random value between the A knob’s value and A plus B. Turn B up for a wider spread.

If a formula doesn’t compile, the controller leaves the controls it’s linked to where they are.

  • In Lemon Studio, links that come with an opened project work. Making or editing a link inside the app isn’t there yet.
  • In other DAWs, the output leaves the plugin as a MIDI message, which you can map to a control there.