Why is this js script not behaving?
Posted: Sat Feb 13, 2010 3:49 am
it says there are the correct number of notes...then it only returns about half in the post. it presents 22 numbers though.
Code: Select all
autowatch = 1;
function bang() {
watchClip = new LiveAPI(this.patcher, null, "live_set tracks 0 clip_slots 0 clip");
watchClip.call("select_all_notes");
clip_notes = watchClip.call("get_selected_notes");
clip_notes.shift();
var num_of_notes = clip_notes.shift();
noteArray = new Array();
post("there are:", num_of_notes, " notes\n");
var a;
var b;
for (a = 0; a < num_of_notes; a++) {
post(a);
noteArray[a] = clip_notes.splice((a*6), 6);
post(noteArray[a]);
post();
}
}