Nope. I already know where the line-in device will be. It’s always in devices[2].
Hmm, now, this is interesting. The table size would then be set by total track_index. Using a table for all the tracks would make it very simple. If all the portions of the table of a 27 track song are set to 0, then there are no line-in devices in the song. If a Line-In device is added with Shift-I, then the 27 entry containing table has one of the entries switch to 1 or whichever number theline in will be at. then if one wishes to add the same line-in device to a second track, the track which has 1 on the table will get a removal request fromthe script before the script adds the line-in device to the selected_track.
i can understand why your approach requires you to use the number on the table for actual positioning of the line-in device, but if the line-in device is always at [2], then that frees the table to signify which type of line-in device there is.
0 for nothing, 1 for linein1, 2 for linein2, 3 for linein3, 4 for linein4 (im only simplifying, since linein1 is actually preset=5, linein2 is actually preset=6, but that’s beside the point)…
that way the table can be used to discover which track_index has a line-in-preset4 in it, and then just send that info. i guess the table itself could be called to provide the track_index?
It’s just a case of bypassing and enabling them with a script after panic. I’m not sure what will happen if I make a panic-shortcut which does panic and then immediately bypasses (this has to be done, i tested it) and then enables them for them to start working. It’s hard to know until you try it in actual, non-theoretical conditions.
There’s something about #Line-In Device. It has two parameters. None of which are the input.
>>> rprint (renoise.song().selected_track.devices[2].name)
#Line Input
>>> rprint (renoise.song().selected_track.devices[2].parameters)
[1] => userdata: 0x0x2609cb94 (DeviceParameter object)
[2] => userdata: 0x0x2609cc64 (DeviceParameter object)
>>> rprint (renoise.song().selected_track.devices[2].parameters[1].name)
Panning
>>> rprint
Volume
When I encounter Track DSP Devices which do not have all their parameters available to be controlled by the Renoise API, such as #Line Input Device (Channel, Input, Latency unavailable), DC Offset (Auto DC On/Off unavailable), #MultiBand Send Device (Keep, Send Channel unavailable)… There are others. Suffice it to say that when thse are encountered, I’m really happy for the possibility of saving a preset and loading it with scriptage, since telling the device what to do is not (yet) possible. Suffice it to say that I will, in my scripts, always use direct parameter changes from the script instead of preset-loading, if they are available in the track dsp device. If not, it’ll be back to preset-loading, or in some cases, using the “Save Init” script to, for instance, change MultibandSend & Send to have specific things toggled by default.
When I then encounter the Sample_Recorder Window dialogue and realize that it’s Channel, Input, sync start&stop, record dry, create a new instrument on each take, compenstate input & output latencies, extra latency ms cannot be controlled via lua API, I’m filled with hope that these things will change. I believe it is the fundamental nature of APIs to be improved over time and for new API functions to be added in future iterations.