What are the limitations of Renoise LUA?

Hi, i think about learning LUA and make some tools for Renoise?
I know Python, Javascript and SQL…

What are the limitations in Renoise but not in LUA?

Can serious Piano Roll be programmed?

Or something like clip launcher?

Look at Reaper JS Api… Is Renoise LUA Api simillar?
Thank you

Scripting in Renoise is composed from 10 different APIs, each dealing with a unique aspect of the software:

Viewbuilder, Application, MIDI, OSC, Networking (sockets), and the big one - the Renoise Song (covering everything from the Instrument to the Pattern Sequence, etc.)

While they are all very full-featured, of course there are plenty of things that could be done.

These are the biggest limitations I can think of:

  1. Scripting of realtime audio is not currently possible (processing DSP in realtime).
  2. “Self-scheduled” events is done in UI thread, so precision is limited ** see below **
  3. Viewbuilder Full flexibility in creating user interfaces (a raw “canvas” to draw on)

The timing/precision of Lua in Renoise always seems to cause a great deal of confusion - let me try to explain…

On the most basic level, you can create a tool in Renoise and let it evaluate it’s own code somewhere between 10-20 times per second (also known as “idle time”, the time when Renoise has nothing more important to do than to hand off time to tools). The exact frequency varies slightly with the CPU load, but still more than enough to e.g. create sequencers that write pattern data ahead of time.

But you can also make the tool respond to incoming messages: MIDI, OSC, HTTP, etc. By doing this, you get near-instantaneous results by evaluating code when a message arrives (especially true as MIDI messages live in the audio thread). Obviously, playing an instrument by hand will require this amount of precision.

Can serious Piano Roll be programmed?

Or something like clip launcher?

A serious Piano Roll requires a serious commitment to the mouse. For example, you would expect click-and-drag to select, and select-and-drag to rearrange. Neither of which are possible with the current viewbuilder API. But thinking outside the box, it’s absolutely possible: if I wanted to, I could create some base classes in lua (getting/setting note data and so on), and connect them to some external program which would display the piano roll itself. So, building e.g. an HTML5 application with modern frameworks which would receive it’s data from a pure lua “backend” in Renoise.

As for a clip launcher, sure. Live Dive, Grid Pie and other tools are investigations into this type of workflow… the hard part is to make it feel integrated - actually make it compelling to use in an everyday scenario (I use GP from time to time, it’s great fun but I never save the results)

But thinking outside the box, it’s absolutely possible: if I wanted to, I could create some base classes in lua (getting/setting note data and so on), and connect them to some external program which would display the piano roll itself. So, building e.g. an HTML5 application with modern frameworks which would receive it’s data from a pure lua “backend” in Renoise.

As a very very very silly old example in Linux of something along those lines → https://forum.renoise.com/t/experimental-miniroll/40559

As a very very very silly old example in Linux of something along those lines → https://forum.renoise.com/t/experimental-miniroll/40559

Exactly, I had that in mind. I have not really looked into the code of the MiniRoll, but that’s definitely proof that it can be done :slight_smile:

Somebody created HTML layer to Renoise LUA i think.
So OSC + HTML5 + LUA can be beatiful solution how to make alternative renoise sequencers?

I know the HTML5 part… :slight_smile:

Exactly, I had that in mind. I have not really looked into the code of the MiniRoll, but that’s definitely proof that it can be done :slight_smile:

Ah, the code of ‘The MiniRoll’. MiniRoll was a three day crude hack if there was ever one. If I was doing something like that now I’d firstly use a slightly higher level API like JUCE (that would also make it more cross platform (and we could have nice fancy buttons!)) Secondly, thinking back now, I wonder if it would’ve been slightly quicker to write out the pattern data to a file (rather than go through LUA networking sockets.) Hmm. (Edit: Nah, probably not.)