Reprogramming the virtual keyboard

I’m not too sure if the subject conveys what I’m asking for here, but I’d like to be able to reassign the notes played on the keyboard. As far as I’m aware, you can only capture key presses when the GUI is in focus, but is there a way to globally catch them, so it doesn’t matter what window is currently open?

Many thanks!

1 Like

If you have a Lua tool window in the foreground, you can still run Renoise commands. Is this what you ask?

Thank you for the reply! I’ll try to explain in a little more detail what I’m trying to do. I wanted to write a tool that allows you to change what notes are played when you use Renoise’s virtual keyboard. So you select a profile depending on what DAW you came from (and what keyboard layout you are most comfortable with), then it assigns the notes to your keyboard appropriately.
Obviously for this to work correctly, it should be global, so you wouldn’t need my tools window open after you’ve selected a profile.
Basically if I press a note while recording in the tracker, the note that is recorded is whatever was mapped in my tool. Hopefully that makes sense.

Thanks :slight_smile:

Would you be talking about microtonal tunings? We have Scala for Renoise here:

You can also program your own tunings into this, out of the 4,000 included. It’s a great Tool for making more abstract tunings. Meaning, you can tune your keyboard to play notes at whatever distance between that you like. The method of programming these tunings is relatively easy, you’ll have to research the “how” using the forum, or the Internet, but from a non-programmer’s perspective (me), it’s not hard at all.

The only thing may be that it’s not a global tuning, but per-instrument. Some extra steps involved, but not awful.

All about using it in Renoise here: New Tool (2.8): scl to xrni

1 Like

That actually sounds pretty cool. By “global” I just meant you didn’t require to have the tool interface open. Having it only apply on a per-instrument basis isn’t too bad.
I’ll definitely check this project out, thanks!

1 Like

Yep, it is just a thing that’ll have to be applied to each individual track. It’s also not an easy process (I believe I had to ask how to do it in that forum post), but it’s not hard. Having your own tunings is a lot of fun, and there’s some really gonzo tunings in there. When you play these for ordinary folk - they’ll hate it! Great fun :smiley:

If you are a Lua programmer you can create a tool that takes full control of recording the notes (playing the notes and also recording them in the pattern editor if edit mode is on), or even taking control of your keyboard USB alphanumeric, or MIDI control.

Here are 3 concepts to investigate:

  1. The key handler. Here you can customize keyboard commands for your tool (a single key or a combination of several).
  2. The OSC protocol, with trigger_on, trigger_off. This allows you to play and be able to record notes in the pattern editor if the edit mode is activated (this also works with the transpose scales of each instrument).
  3. MIDI. You can map any object to your LUA window tool, for example a button, a popup or a slider. That object can trigger a specific function. Therefore, from MIDI messages you can execute specific functions even involving a custom graphical interface of your Lua window tool.

All of this information is in the Renoise API documentation. If you mix these 3 things you can create tools that take control of the entire USB keyboard, “control the sound” of the notes, and edit. Maybe all this together is a bit complicated and confusing to explain, but if you are a programmer, focus on investigating these 3 things.

With all this, a Lua tool can be turned on or off, and if it is a window tool, you can close it and it will continue to work.


This sounds exactly what I’m after. I’m definitely no stranger to Lua, but I wasn’t sure if I needed my tool window open for Renoise to capture the keystrokes. Many thanks for this information!