How to set output_routing?

so i tried this

renoise.song().tracks[renoise.song().selected_track_index].output_routing=1

and this

renoise.song().tracks[renoise.song().selected_track_index].output_routing=Master

and i keep getting an error:

>>> renoise.song().tracks[renoise.song().selected_track_index].output_routing[0]
*** [string "renoise.song().tracks[renoise.song().selected_track_index].outp..."]:1: '=' expected near '<eof>'

>>> renoise.song().tracks[renoise.song().selected_track_index].output_routing=0
*** No matching overload found, candidates:
*** void <unknown>(Track&,custom [class String] const&)
*** stack traceback:
***   [C]: ?
***   [C]: in function '__newindex'
***   [string "do..."]:22: in function <[string "do..."]:9>
***   [string "renoise.song().tracks[renoise.song().select..."]:1: in main chunk

>>> renoise.song().tracks[renoise.song().selected_track_index].output_routing=1
*** No matching overload found, candidates:
*** void <unknown>(Track&,custom [class String] const&)
*** stack traceback:
***   [C]: ?
***   [C]: in function '__newindex'
***   [string "do..."]:22: in function <[string "do..."]:9>
***   [string "renoise.song().tracks[renoise.song().select..."]:1: in main chunk

>>> renoise.song().tracks[renoise.song().selected_track_index].output_routing
*** [string "renoise.song().tracks[renoise.song().selected_track_index].outp..."]:1: '=' expected near '<eof>'

>>> renoise.song().tracks[renoise.song().selected_track_index].output_routing=[1]
*** [string "renoise.song().tracks[renoise.song().selected_track_index].outp..."]:1: unexpected symbol near '['

>>> renoise.song().tracks[renoise.song().selected_track_index].output_routing=Master
*** [string "renoise.song().tracks[renoise.song().select..."]:1: variable 'Master' is not declared
*** stack traceback:
***   [C]: in function '_error'
***   [string "local mt = getmetatable(_G)..."]:29: in function <[string "local mt = getmetatable(_G)..."]:24>
***   [string "renoise.song().tracks[renoise.song().select..."]:1: in main chunk

what am i supposed to do, to change the output routing of said track?

To get the available track output routings: (In the script editor terminal.)

rprint(renoise.song().tracks[renoise.song().selected_track_index].available_output_routings)

This returns a list of strings for the output names.

.

To set the track output routing:

renoise.song().tracks[renoise.song().selected_track_index].output_routing = 'Master'

Remember it’s a string, so you need to use quotes around the output name.

.

You can also do it by index if you prefer: (An index referring to something within the list of output names.)

renoise.song().tracks[renoise.song().selected_track_index].output_routing = renoise.song().tracks[renoise.song().selected_track_index].available_output_routings[1]

Obviously you should probably clean this up in your actual code, using local references to the song, track, etc.

For example:

local song = renoise.song()
local track = song:track(song.selected_track_index)
track.output_routing = track.available_output_routings[1]

3 Likes

no. way. wow. that is exactly what i hoped for!! thank you very very much.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.