Select all Plugins of the same type and replacing a plugin Macro help.

Discussion about: tracktion.com
Post Reply New Topic
RELATED
PRODUCTS

Post

Can some help me with writhing the macro to select all plugins of the same type and a macro for replacing a plugin. Thank You in advance.

Post

Need help with making these marcros please. thank you in advance.

Post

From the Javascript API help, I don't see how you can filter plugins "of the same type". You can get all the plugins of a given track with

Code: Select all

var plugins = Tracktion.getPluginsFromTracks (trackObject);
but unless there is an undocumented property of the plugin object, you can't filter by plugin type or even name. Sadly,

Code: Select all

Tracktion.getName(object);
only works with clips or tracks.

This is what I've tried:

Code: Select all

function listTrackPlugins() {
    var tracks   = Tracktion.getSelectedEditElements ('track');
    if (tracks.length == 0) {
        Tracktion.showMessage('No tracks selected');
        return;
    }
    if (tracks.length > 1) {
        Tracktion.showMessage('Select only 1 track!');
        return;
    }
    Tracktion.log("Track: " + Tracktion.getName(tracks[0]));
    for(var i=0; i<plugins.length; i++) {
        var pluginName = Tracktion.getName(plugins[i]);
        Tracktion.log("Plugin [" + i + "] name is " + pluginName);
    }
}

listTrackPlugins();

Post

Thank you for the help. The reason I asked for these macros is because you can do both of these things if you right click a plugin you have a option to select all the plugins in the edit of the same type, and also a replace this plugin feature. I want to assign it to a midi controller is the ultimate goal.

Post Reply

Return to “Tracktion”