Yes the formula device uses LUA. So learning some basic (procedural, not necessarily object oriented) LUA knowledge is necessary for using the device. I’d go for basic syntax like hello world, variables and formulas, functions, arrays, the math library, conditions and loops, and then you already know enough to use the device to full effect.
It executes at each tick the “y =” formula line, which is to be a LUA formula to calculate the output value. It implies the “y=” part, so the formula must return a number value. You can use functions and variables in that line that you declare in the code field. Whatever is written in the code field will get executed once at startup or when the content is changed, then the formula field seems to get called for each tick and for each input value change. Try a formula “A+B” and move the first two sliders to see what happens, to get an idea…
The output must be in the range between 0.0 and 1.0, and can be used to control an effect/plugin automation parameter. So really it is really mostly only useful for automation, but you can program the automation in very custom ways with it. The A,B,C parameters are three effect parameters (also 0.0…1.0) of the formula that can be used to automate the formula itself (but you don’t have to use them), and they are available as variables in the code you write. The “help” field just lists the available variables and functions. Thus you can do calculations based on current line number, BPM and stuff like that.
Note that it is stripped down LUA, it does not have all the functions and stuff available that normal LUA has (for example when writing renoise tools). But I think the formula device is a nice little toy to get started with LUA programming. It is not easy to debug though. The code will be executed immediately when you change something, and will be effective right away…if there is a syntax error, the device will stop working and show an error message above the code field. But if your code is wrong somehow but has no syntax errors, it will not detect that, and the formula might not work as expected…
So…to get started, you first need a proper use case you wish to program. Like some special kind of automation that you would like to have going on automatically. Like for example a custom LFO that changes behavior dependent on the value from a velocity tracker, or from the line number that is currently playing… Just think - it will control one parameter, and you can use three inputs to define what is done. The rest ist subject to math/programming. It can be very simple, or very complicated…in the end it is just LUA programming to achive what is needed.
And no, it cannot be used for FM/PM, it is bound to controlling plugin parameters at tick rate. So it is rather an automation tool. Chaining multiple formula devices can result in interesting possibilities…or playful things, like I once put work into that a formula device can have more than three inputs parameters by mathematically compressing numbers into a single value, or to translate pattern FX commands controlling the A,B,C sliders into actions that the formula device will execute, like retriggering an LFO at certain positions, or setting the speed to exact values. That is what I mostly use it for. Other people seem to rather use it for procedural music kind of things, where programmed automation yields mathematically controlled audio landscapes. Just saying, for your inspiration on what to try…