How to log OSC messages? process_message in GlobalOscActions.lua isn&#

(gorg) #1


I’m experimenting with OSC mapping and some logging of OSC messages recieved by Renoise server would be very helpful.

I’m new to Lua, Duplex and OSC altogether. But i’m experienced programmer so I guess it should be relatively easy to dive into.

What I don’t undestand is that when I see, hat Handset-simple template of TouchOSC is working, when I place some print(“Hello!”) in process_message function, it doesn’t go to the console. Only when I make some typo in script, Renoise immidietely shows error after saving.

I’ve copied GlobalOscActions.lua to the Preference Folder in /scripts subdirectory as was instructed for custom modifications.

Curiosly when I’ve deleted this method (process_message) altogether, everything worked just fine. Even after deleting it from renoise main directory.

In that file is text warning that some messages are processed “internally” by Renoise and not handled by these functions.

To make this post more straightforward - I would like to see, what exactly is TouchOsc application sending to Renoise - to know what OSC controller ID names to write into template xml configuration file. (So I tried to put some breadcrumbs into process_message function)

Only log messages were when I somewhat managed to send OSC messages from Pure Data application. It was transport/start stop message and note on/off… And also REJECTED! when i evidently send something malformated. It was kinda confusing for a while to not see any other messages. It showed that working transport messages even they were valid (and Renoise really stopped and started accordingly) but not messages from phone.

Thanks for help…

(danoise) #2

Duplex is a completely standalone tool that listens for MIDI and OSC separately from Renoise itself.

If you want to experiment with OSC in Renoise (as a “technical exercise”), just ignore Duplex for now and focus on the GlobalOscActions. This is a good way of becoming familiar with the lua API and generally very flexible in itself.

Duplex is about creating bidirectional mappings - something that will transmit, as well as receive messages. It deals with both MIDI and OSC in an abstracted way, using it’s own persistent mapping system. This is great for creating applications that do something specific across a wide range of hardware, without having to deal with deeper technical aspects of the communication between devices. You can enable logging of messages by going into the Tools > Duplex menu

Another option would be to create a standalone tool - check out the OSC snippets to learn how to create your own OSC server.