Lua Macros

Now I finally understand that you want to emulate keypress. I don’t know if this would be a good idea because keys are customizable and the same script can then do very different things when renoise is loaded with a different user’s Config.xml.
I’d rather have (even ugly) names for every button in the app then calling up keyboard shortcuts.
But yeah it gets difficult, because renoise is so customizable… In my scripts I’m also all the time thinking, should this behave the same or slightly different when called via keyboard/midi, etc.

I would like the second one in OP. For me tho being able to fire a note or a chord off with predetermined length (also kind of emulate a keypress) is more interesting.

Well, in my opinion, more precise focus control would do the API well, too!

So what we need isn’t only a function that is able to emulate a keypress, but a function that that returns the existing keybind related to a specific action (including the focus).
The macro should be able to set the right focus.
Because when you’ve got those existing keybinds, you can’t make any confusion about the way the macro will behave.

Oh man, huge +1 on this!

It seems like the benefit:development cost ratio would be enormous.

It would greatly extend the capabilities of the current API, while only requiring development of the macro API part. That is, it would unlock tons of functionality that already exists.

And not only would it enable scriptable macros, but recordable macros, like emacs’ keyboard macros.

Do you need to enter the same sequence of keystrokes 128 times?

  1. Start recording
  2. Enter the sequence of keystrokes once, no matter how complicated it may be
  3. Make sure, at the end, to leave Renoise in the initial state for the next iteration (for example, position the cursor in the same column on the next line, or similar)
  4. End recording
  5. Call your macro 127 more times (or provide for entry of the number of iterations)

emacs’ keyboard macros are like effing Black Magic. What would have been ridiculously complicated, repetitive, and human-error-prone text manipulations turn into a few keystrokes. The same could be possible in Renoise.

I literally just used them to create 15 *Instr. Automation .xrdp’s in emacs to accommodate all 512 VSTi parameters in less than 5 minutes (i.e. “Params 00.xrdp” references VSTi params 0-34, “Params 01.xrdp” references VSTi params 35-79, etc.)).

Doing that by hand in Renoise, would have taken hour(s), left me a zombie at the end, and would undoubtedly have been full of errors.