Sending Osc Messages Using Custom Fx Command

Hi everyone,

I just began having a closer look a the lua scripting API but couldn’t figure out yet if what I want to do is possible at all.

I’d like to send custom OSC messages to several applications by using a custom fx column command.


0X11 => sends /osc/param1 value1  

However, the introduction in the HTML docs state: “You can write your own pattern editor, but not change the existing one.” So before I dive deeper
into the docs I’d like to know if this is possible or not (I don’t need specific examples, if it is possible I’ll read up the rest of the docs myself ;-)).

Thanks in advance!

It appears my question was either malformed or too easy to answer so I dug into the documentation yesterday. It appears there’s no observable for when the transport “jumps” to the next line, right?

So I thought I could a register a transport.playing observable and when renoise is playing just enter a while loop and poll for the current transport position. This however doesn’t work ^^, instead renoise kinda freezes and, what I assume, kills the process running the script.

I’ve read sth. about an app.idle observable but I cannot find anything about it in the docs. Is this what I’m looking for?

Thanks in advance.

Renoise freezes because you probably are processing each line with the loop and not giving Renoise breathing-space to update anything else.
You could do some coroutine handlings to prevent Renoise from getting stuck (The Nibbles game is one of the few i can name that uses some kind of non-blocking idle check) but you would nevertheless not be able to send a command on-the-fly to your OSC client at the minute your line is processed. You even don’t have any guarantee that when your routine gets the chance to read a line, the line that has this command will be read on that moment.

Renoise would need LuaJIT to do time-critical handling of these events.
LuaJIT is currently still Beta stadium so would not be implemented earlier than when a stable release is out.

Thanks for the answer. As timing is critical for my application I guess I have to stick to plan B and create some midi to osc middleware thingy in supercollider or puredata in the meantime.

what operating system?


you might be able to use something from here;

Thanks for the links! I’ve settled on pyrtmidi + pyOSC for now. I use the following to launch clips in live from renoise using an instrument that sends midi to a midi output on channel 16. note == track, velocity == clip (though I think I am gonna reverse that eventually - still thinking about it). This is still just an idea. For now I’m happy to be able to launch tracks on time, the whole note/velocity mapping thing leaves room for further stuff to trigger/control.

#!/usr/bin/env python  
import rtmidi  
import OSC  
osc_client = OSC.OSCClient()  
osc_client.connect(('', 9000))  
midi_in = rtmidi.RtMidiIn()  
ports = range(midi_in.getPortCount())  
if ports:  
 for i in ports:  
 port_name = midi_in.getPortName(i)  
 if port_name == "IAC Driver Bus 1":  
 while True:  
 midi_msg = midi_in.getMessage(50)  
 if midi_msg != None:  
 if midi_msg.isNoteOn() and midi_msg.getChannel() == 16:  
 osc_msg = OSC.OSCMessage()  
 track = midi_msg.getNoteNumber()  
 if midi_msg.getVelocity() < 127:  
 clip = midi_msg.getVelocity() - 1  
 osc_msg.append((track, clip))  
 "ERROR IAC Driver Bus 1 not present!"  

This script is merely a point of proof, it lacks error handling and a lot more convenient stuff, the midi port name is hardcoded etc. pp, but it does what it is supposed to do (for now ^^)