I want to use the monome in Ubuntu Studio, roughly.* I know there was at least one app for the monome written entirely in Python. I’d like to use that as a model.** Does anybody know which app(s) that is? Is that something that can be run without emulating Windows?
actually a KUbuntu distribution, but with everything from the Studio repos installed
** I want to use the monome to control SuperCollider, via Haskell – but if I can connect to the monome from Python, I assume I’ll be able to connect to it from Haskell.
I would guess that link could get you started. Also, there is a grid studies page for SuperCollider as well. The grids and arcs are well supported in SC if you ever wanted to do everything in SC.
at first you want to follow steps 1 and 2 from https://monome.org/docs/linux/ then you will have everything that’s needed to use the grid with any language supporting the OSC protocol.
EDIT: I might see the answer. The serialosc server listens on port 12002, and I should only communicate with that, not directly to the device. So sending a message will look something like udp.send( 12002, "/grid/led/level/set x y l" ), correct?
I want to connect to the monome using Haskell, by sending raw OSC over UDP.
I can connect to the monome using Python, via the pymonome library – but pymonome is too high-level for me to see how it’s doing that.
To connect to a device over UDP, what do you need? Just the device’s address in the filetree? Or maybe I shouldn’t send directly to the monome at all, and should instead send to the serialosc server? That’s my impression from looking at the monome OSC protocol. If that’s true, is serialosc running on a specific port? How can I know which one?
When I plug the monome in, a device called ttyUSB0 shows up in my /dev/ folder. Probably related, if I run serialosc-detector, I see the following print to the screen:
�*V\P
/dev/ttyUSB0\P
Maybe there is a UDP port number associated with the monome, too? If so, how can I find out which port number is associated with the monome?
There are also some examples in that repo. One issue is how to deal with incoming events (i.e. button presses), I’m not sure if libmonome expects you to only use it’s event loop (via callbacks), or if you can manually poll the event queue. Either way, you’ll eventually need some sort of higher level event model in your Haskell code.
I might indeed use foreign function calls and let Python handle talking to serialosc. I was only worried that it might introduce latency.
Do I have the connection strategy right? That the address “127.0.0.1” and the port “12002” all that should be required in order to find serialosc, and that the message /monome/grid/led/set 1 1 15 (where the three numbers are integers) is something that should be understood by the monome?
I’m suspicious about the message, because what if I had two monomes plugged in? They can’t both be called “monome”, so the OSC type tag string /monome/grid/led/set seems ambiguous.
With the help of @artfwo I was able to get monome communication working. Here is a proof of concept. It sends one message to serialosc and receives one from it as a result. I will have fleshed it out along the lines of pymonome by the end of the year.
What I wrote before that edit
I’ve got a working demo that sends and receives UDP over a specified host/port combination. But when I try to do that with the monome, it doesn’t work.
(I originally started by trying to use Rohan Drape’s work, but didn’t get it, and then Tom Murphy added a really simple demo to Vivid-OSC, so I’m using that.)
Am I correct in understanding that serialosc listens on localhost port 12002, and when you send it the OSC message “/sys/info host port” it will send information about connected devices to the port specified in that OSC message? Should the host be encoded as a string, and the port as an integer?