Create Alias Shortcut

Would be useful to have “create vst alias” under right click menu in instrument selector when you click plugin-based instrument.

I’m seeing

-- Valid for loaded and unloaded plugins.[].plugin_properties.alias_instrument_index  
 -> [read-only, number or 0 (when no alias instrument is set)][].plugin_properties.alias_fx_track_index  
 -> [read-only, number or 0 (when no alias FX is set)][].plugin_properties.alias_fx_device_index  
 -> [read-only, number or 0 (when no alias FX is set)]  

in the API, and if it’s somehow legible and understandable, it’d probably be easy to do. The issue is detecting where an empty space would be for a vst_alias.

you can use insert_instrument_at():

-- Insert a new instrument at the given index. This will remap all existing  
-- notes in all patterns, if needed, and also update all other instrument links  
-- in the song.  
 -> [new renoise.Instrument object]  

this function will automatically create the instrument slot, so you could call it using the index of the source instrument so that the alias will be created next to the source, which is most likely the wanted result

1 Like

Thanks, I’ve been mucking around with this and it does seem to work as advertised. I haven’t been able to figure out how to define an alias for a VSTi. However, this snippet of code of yours (hopefully) enables me to do a specific kind of sample_cloning / instrument_cloning I’ve been wanting to do for a while :)