Midi Input Part Of Instruments

Hi all,

can someone tell me if this is possible to access, reading and writing to the Midi input part of instruments through scripting: Device, Channel, Assign to track. I looked at the API without finding but I would like to be sure.

I don’t know if this has already been discussed (or if such a feature already exists in Renoise :unsure:), but I would like to be able to do an instrument-capture-like which would handle multiple vst. The script would change the settings automatically as you change the selected track, and your midi keyboard would play different multiple vstis. It would be useful if you like stacking vst and do that a lot to construct instruments.

thanks in advance ^_^

The instrument midi properties can be accessed via renoise.song().instruments[].midi_properties

I’m not completely sure what you are trying to do, but if you give a step by step example of the feature maybe I can help you with an approach and relevant properties in case you need.

thank of your answer! where did you find that ? I am not able to find it anywhere in Renoise.Song.API.lua on Google code. (edit: did a test in the scripting terminal and Renoise doesn’t seem to know that propertie)

Imagine that your bass is composed of two vsti playing at the same time, and that you want to map the first one on the first track and the second one on the second track. Same with your lead which is composed of 3 vsti and you want each of their audio stream to go into each of the track 3 to 5.

For the moment, if you have only one midi keyboard, you have to manually (or maybe I’m missing an existing renoise feature) change midi settings of all these instruments each time you want to swap, playing the lead after playing the bass, or same for the inverse.

So the idea is when you select a track that the script know to be part of your bass (number 1 or 2), it changes the settings (device) of all 5 vstis in order you can play the bass. Now, if you select one of the tracks number 3 to 5, your midi keyboard would have to play the 3 vsti composing your lead.

I think (and might be wrong) this should be rather simple to implement, the hardest thing being to let the user define/modify composed-instrument profiles through some graphical interface. I will have a look at some scripts with GUI approaching what would be needed for this one and instrument-capture script too.

The input part of the instruments is indeed missing at the moment in Lua. Sorry, we simply forgot that in the last update, but will try to add this for the next release round.


I had a look at the new API improvements coming with Renoise 2.8 (b1) and I see that midi_input_properties of instruments
are read-only.

-- MIDI input properties.  
 -> [read-only, renoise.InstrumentMidiInputProperties object]  

Does that mean scripts aren’t able to modify these properties in any way (seems pretty logical :lol: but if not what’s the use of adding it to the API)?


get B4 (oops, B3) right now! don’t get stuck on 2.8b1.

There’s one thing I’ve noted with the renoise api documentation, some things might be read-only, while there is going to be other stuff that can be used to set these values. sometimes. not always.
these should help you out.

 -> [read-only, renoise.InstrumentMidiInputProperties object]  
 -> [read-only, renoise.InstrumentMidiOutputProperties object]  
renoise.song().instruments[].midi_input_properties.device_name, _observable  
 -> [string]  
renoise.song().instruments[].midi_input_properties.channel, _observable  
 -> [number, 1 - 16, 0 = Any channel]  
renoise.song().instruments[].midi_input_properties.assigned_track, _observable  
 -> [number, 1 - renoise.song().sequencer_track_count, 0 = Current track]  
renoise.song().instruments[].midi_output_properties.instrument_type, _observable  
 -> [enum = TYPE]  
-- When setting new devices, device names must be one of:  
-- renoise.Midi.available_output_devices.  
-- Devices are automatically opened when needed. To close a device, set its name  
-- to "", e.g. an empty string.  
renoise.song().instruments[].midi_output_properties.device_name, _observable  
 -> [string]  
renoise.song().instruments[].midi_output_properties.channel, _observable  
 -> [number, 1 - 16]  
renoise.song().instruments[].midi_output_properties.transpose, _observable  
 -> [number, -120 - 120]  
renoise.song().instruments[].midi_output_properties.program, _observable  
 -> [number, 1 - 128, 0 = OFF]  
renoise.song().instruments[].midi_output_properties.bank, _observable  
 -> [number, 1 - 65536, 0 = OFF]  
renoise.song().instruments[].midi_output_properties.delay, _observable  
 -> [number, 0 - 100]  
renoise.song().instruments[].midi_output_properties.duration, _observable  
 -> [number, 1 - 8000, 8000 = INF]  

Thank you very much :rolleyes: . I should have inspected InstrumentMidiInputProperties object in the first place.
So I can know try to implement the idea !

Also, PC Keyboard as an input source would be awesome.

You can get a list of available input and output mini devices like this:



rprint (renoise.Midi.available_input_devices())
rprint (renoise.Midi.available_output_devices())

doesn’t seem to have pc keyboard as an input source. or maybe i’m looking at it wrong.