Copy/paste Device Chain Functionality In Lua

So I wanted to do a quick tool to make a quick “x2” times two FX Chain possible without rendering (and hopefully, keeping Velocity Tracker etc functionality). Luckily I found out quickly it’s exponentially annoying as of this point and perhaps even impossible to build well in scripting right now. Patterns, PatternTracks, they can all be copied but not the TrackDevice or chain thereof :(.

I also requested better dsp handling in the “wishlist” thread. Today it doesn’t seem possible even to safely copy one device to another track.

Let’s hope for some nice improvements in the next version :)

The current API has all you need for such functionality, only requires a tiny bit more effort to implement.

First you loop through the source device chain and store the device path and active preset data of each device into an own buffer like a table. After that simply iterate over your buffer again and create the devices on the target track and apply the cached active preset data on the newly device to restore the parameter settings.[].devices[].device_path[].devices[].active_preset_data[]:insert_device_at(device_path, device_index)

Also copy[].devices[].display_name - I think that would cover a complete copy.

Thanks! gonna try this out soon