Renoise Keeps Releasing Midi-In Device


I am scripting a tool that sends and recieve a lot of midi messages. All the time, after certain amount of midi messages sent/received the bottom statusbar says “Released MIDI-in device: xxx” and my tool stops working, no midi goes in or out. No error message. When i reload all tools and kick it up again it works, but then the same thing happens.

Seems like it does not matter how long time lapses or how fast the messages being sent/recieved. If the tool idles, nothing happens, and if I stress it is seems like there is the same about of messages. Not sure how many in our out, but maybe 50-100…

The midi is sent and recieved via the virtual midi port tool MIDI Yoke. Could that be the problem?

Any idea? Is there a good way to troubleshoot this? Like does renoise have some logging that could explain why it does this…

I know I guess I should be posting code, but that means a lot of work to prepare something so I’m giving it a shot first…

Here is what I’m making BTW;

Cheers and keep up the good work!

Hey fredrik,

make sure that the result of “renoise.Midi.create_input_device” is stored in a global variable or table or wherever else. If it’s not referenced anywhere, the returned MidiInput object will be garbage collected somewhen soon by Lua. And when it’s garbage collected, it releases the device it is connected to too…

Ok! Sounds like the problem, I will try it out.

Thanks a bunch!

That did the trick, thanks!