I’m working on a tool that allows an external application to talk to renoise over OSC, things like loading a song, sending back all track names, sending back all instrument names, sending the bpm.
All is working fine for a while. Then suddenly my tool stops responding to incomming OSC. However, since I don’t get the crash dialog, I’m not even sure the tool crashed.
Any ideas how to approach the problem? Any idea what could be the problem?
First: remove the tablelength function. Instead of tablelength(t) you can simply use ``` #t
Also you seem to do some things double, with a big add_action method you don't use (and add_global_action, and sleep!) - you are already describing the complete behaviour for the server in the server:run clause; you don't need to use methods from GlobalOscActions and the Osc snippets together. If you place something in a tool, I believe it will always get somewhat reloaded/reinitialised when switching songs. So watch out for that and that your tool doesn't stuck. It might be the sockets are not closed in time.
I'm not sure about what you are trying to make (controlling from the outside?), but it might be the solution to place your ideas over in the GlobalOscActions.lua instead of a tool.
Ok, thanks. Agreed I need to clear this up quite a bit. It’s a small part of a bigger whole, and mostly I’m just happy when it works (which it apparently doesn’t all the time)…
The tool doesn’t get unresponsive on load, but during heafty OSC communication right after load. That’s where 99% of the communication is taking place anyhow.
Regarding GlobalOscActions.lua, that would be hard to maintain, like when (if ) a new version of renoise comes out, if I wish to move it somewhere else or throw it in git, right?
@Cas: shutting down, opening sockets should not be a problem in itself. I have extensively tested Duplex with a number of osc devices (hard and software) on mac, linux and windows platforms.
But don’t rule out that the problem might be outside Renoise, or a combination of circumstances?
I’ve found that the serialosc service (software driver for themonome range of controllers) will eventually stop functioning when running on windows, whereas the older monomeserial one will keep running just fine. This had me puzzled for a while…especially since serialosc works fine with most other software.
If we can reproduce a scenario in which OSC messages are generated “from somewhere else” but Renoise fails to receive them, then there is something to go hunting for. Until then, I’d be careful to set my sights only on Renoise…
it would be very helpful to have some instructions for reproducing this issue of messages no longer being received, or at least to have an idea of how long it takes for the messages to stop arriving. it would be super interested to see e.g. a packet capture to see if the OSC messages are somehow getting mis-routed.
I mentioned that serialosc on windows was problematic, but I was not very specific - I’ve mostly encountered the problem on win xp.
Right now, I’m using win 7 (x64) and the m128 is happily spitting out tilt sensor messages, and has being doing so for several hours.
Will of course report here if anything unexpected happens.
ok this is interesting… looks like a problem with renoise/lua’s osc server not serialosc.
I’ve just sent a load of osc messages to my test tool via SuperCollider.
My renoise tool always stops responding after 311 test messages no matter what speed I send them in at.
Here’s the code I use to send stuff to renoise from SuperCollider:
// set up renoise as a destination
r = NetAddr("127.0.0.1", 9997)
(
// repeatedly send a message to renoise via OSC
// i is a counter
t = {
inf.do { |i|
r.sendMsg("/test", i);
0.0125.wait;
}
}.fork
)
Is some buffer in Renoise or Lua getting filled up or something?