The available devices that can be put between “” can be found in renoise.song().tracks[1].available_devices for example.
So far so good. The problem is that I can’t find this same string in renoise.song().tracks[1].devices[2]. .name will only say “Bus Compressor”.
Does this mean that it’s currently not possible to make a safe and future proof “copy dsp” tool? I will have to rely on string.find and hope there are no duplicates.
available_devices is what you can select for the specific track
renoise.song().tracks[1].devices[2].name is simply the name of the second device in the chain. If you want to check for duplicates you enumerate all device names to an array and then compare if there is a duplicate around.
note the following snippet is untested: (written in a texteditor)
local scanned_device = {}
for x = 1, #renoise.song().tracks[1].devices[] do
local scanned_device[x] = renoise.song().tracks[1].devices[x].name
local count = 0
for y = 1, #renoise.song().tracks[1].devices[] do
if renoise.song().tracks[1].devices[x].name == scanned_device[x] then
count = count + 1
end
end
if count > 1 then
print(scanned_device[x].." effect appears "..tostring(count).." times")
end
end
Imo the ID that was used when inserting a device should also be available later in the device array. Searching for renoise.song().tracks[].devices[].name in renoise.song().tracks[].available_devices seems a bit unsafe. What happens if there is a VST named “Bus compressor”?
Or did I miss some golden value available someplace?
I think I have concluded that there is no safe way to match tracks[].devices[].name with .available_devices
For example device name “VST: mda: SubSynth” corresponds with “[307] => Audio/Effects/VST/mda SubSynth”, but there is no consistent pattern for this when it comes to VSTs. This means that the best you can do is to search for the last portion of the string, which is very unsafe (consider terms like “compressor” for example). Neither there is a :copy_from when it comes to dsps.
I just hope this issue will be addressed in a future API update.