Feb 1, 2011 at 5:08pm


Why does this return a tring length of 1?

function bang()
api = new LiveAPI(this.patcher, “live_set tracks 0 clip_slots 0 clip”);
var CLIPNAME=api.get(“name”);
var TEST=CLIPNAME.length;

post (TEST);

Thank you.

Feb 1, 2011 at 6:06pm

That heavily depends on the contents of the clipslot you mention. For example; for all we know it could contain a clip which is named “1″.

Feb 1, 2011 at 7:23pm

I believe you are parsing the length of an ARRAY, as that is what the API returns as a result of get(‘name’). Try var TEST=CLIPNAME.join().length instead, I think that will work.


Feb 2, 2011 at 12:32pm

Yes, that works. Thank you very much amourna.

Ok, I’ll move on with my patch till the next hurdle. :)


You must be logged in to reply to this topic.