A solution I found is sending the note messages via OSC, with the ability to specify destination track I just sign them to Master track (midi-in can’t do that), that way the notes won’t get recorded as Master doesn’t have a note pattern.
So the second question is, if OSC to master track is the route to go, is there a method to get Renoise to report current total track numbers to Bidule? via something like Formula? This is not necessary tho, just for some tiny convenience.
If you are using OSC you can also send messages to toggle recording on and off. I don’t if this will step on other things that should be recorded.
Hacking on GlobalOscActions.lua is reasonably straight-forward if you know some Lua.
I didn’t know any Lua before using Renoise, though I’ve many years experience as a software developer.
I got started by copying existing OSC handler code in GlobalOscActions.lua and making a few tweaks, then digging through the Renoise Lua API to find what was possible.
I’ve now moved to writing my custom OSC in a tool, and having that tool proxy off to the Renoise OSC server all of the built-in Renoise handlers. I did this mainly so I could more easily distribute my code. The bulk of my OSC code is in the OSC Jumper tool.
https://github.com/Neurogami/renoise-ng/tree/master/lua/com.neurogami.OscJumper.xrnx
Lately I’ve been experimenting with having an OSC client in the tool that talks back to what it is that is sending OSC messages to Renoise.
At first this was an on-demand process. I wrote a simple client that would request the current BPM and get it back as an OSC message.
However, I’m interested in writing client scripts that manipulate a running Renoise song by watching for various conditions and then instructing the song to change pattern loops, alter tracks, modify devices, etc.
Renoise has timers that can execute a function at a specified interval. For example, if you had a function that sent back the current track count:
renoise.tool():add_timer(my_track_count_function, 1000)
This would call my_track_count_function() once every second (more or less; it is not atomic-clock precise. ).
(You can get the track count using renoise.song().sequencer_track_count )
If the number of tracks is not something that changes during a song then this is overkill. (I’ve been using functions that track the current pattern.)
If you just want to occasionally fetch the track count you can write an OSC handler just for that, and have it send back an OSC message.
I looked for my own code for this but seemed to have borked in during some re-writes.