Revision: 64083
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at July 3, 2013 00:51 by yannxou
Initial Code
// Returns true if the given track is the Master Track function isMasterTrack(track) { var api = new LiveAPI(); var path = track.path.split("\"")[1]; // remove quotes from path api.path = path + " mixer_device"; // post(api.type); // type is 'Track' for all normal tracks, Returns and MasterTrack so I try another way: var val = api.get("cue_volume"); // this parameter only exists when in the Master Track. if (typeof val == "object") { return true; } return false; // Problem with this approach is that always a javascript error is triggered, even when surrounded by try/catch, but it works. }
Initial URL
Initial Description
Returns true if the given track is the Master Track. Problem with this approach is that always a javascript error is triggered, even when surrounded by try/catch, but it works.
Initial Title
Check if a track object corresponds to the Master Track in Ableton Live
Initial Tags
Initial Language
JavaScript