Renoise Osc Device Not Changable From Lua?

I get an error when trying to set the Midi-in device to the Renoise OSC device:

*** std::logic_error: ‘trying to set a midi device to a non existing device name’
*** stack traceback:
*** [C]: ?
*** [C]: in function ‘__newindex’
*** [string “do…”]:22: in function <[string “do…”]:11>
*** .\gui.lua:238: in function <.\gui.lua:235>
*** [C]: ?
*** [C]: in function ‘__newindex’
*** [string “do…”]:22: in function <[string “do…”]:11>
*** .\gui.lua:530: in function ‘update_instrument_list’
*** main.lua:46: in function main.lua:39

I can read it fine:

Renoise OSC Device<

But i can’t change the device to it. Changing to any of the other existing devices works fine.
Hasn’t it been added to the table or am i doing something wrong?

“Renoise OSC Device” can not be opened. It’s not a real device.

All raw MIDI messages that Renoise receives via OSC are routed internally to this device. In other words: If you send MIDI via OSC to Renoise, it will end up in a “Renoise OSC Device” for the instrument routing.

No, but it is listed in the Midi in properties yet i get the mentioned error if i do this:
renoise.song().instruments[1].midi_input_properties.device_name = “Renoise OSC Device”
And that really looks like a bug to me.
(I mean, what is the purpose of listing it if you can’t use it anyway?)

I just came across this matter.

With the current API it seems that it is not possible to select the “virtual” device Renoise OSC Device.
If you write this equality in your code, it will return an error:
renoise.song():instrument(1).midi_input_properties.device_name = "Renoise OSC Device"

To work with this, it is possible to create an “input_devices” table whose names would be:

[1] → “” - (empty string) this would be to select “None”
[2] → “Name of MIDI Input Device 1”
[3] → “Name of MIDI Input Device 2”
[4] → “Name of MIDI Input Device 3”
[5] → “Name of MIDI Input Device 4”
[6] → “Renoise OSC Device”

The last item would not be selectable. So this would return an error:

renoise.song():instrument(1).midi_input_properties.device_name = input_devices[6]

But if Renoise has the device selected “Renoise OSC Device”, it will return its name “Renoise OSC Device” correctly.