js observe clip added using "name" property

Sep 25, 2013 at 7:22am

js observe clip added using "name" property


In JS Im observing the “name” property of all clips in a track, but if a new clip is added there is no notification of this in JS. However, when using the live.observer object in max it at least outputs “empty”.

Im wondering why this is? and if there is any way around it?

As a workaround im trying to observe the “has_clip” property of the clip_slot. However, I cannot observe both “has_clip” and “name” in the same function. Is there any way to share arguments across callback functions?


Sep 25, 2013 at 7:58am

Here is a demo of the problem. The JS version observes clip_slot 1 on track 1. Im expecting for something to be printed in the max window when I add a clip to clip_slot 0, or 1. The live.object is observing clip_slot 0 and it outputs “empty” , but with JS clip_slot 1, nothing gets printed.


– Pasted Max Patch, click to expand. –


And the JS

autowatch = 1;
outlets = 1;

names = [];

function bang() {



function loadclips() {

names = new LiveAPI(this.patcher, 1, clipname, “live_set tracks 0 clip_slots 1 clip”);
names.property = “name”;


function clipname(args) {

Sep 25, 2013 at 1:02pm


Its also frustrating/confusing that html tags cannot be included in a post, since these are used to denote an empty clip in maxforlive

Is there any way to share data across different callback functions, that are observing properties?


You must be logged in to reply to this topic.