Remove_notes with JS?
I'm trying to remove all selected notes from a clip with a JS function.
Looking at the LOM, there aren't examples showing how functions, parameters, arguments are formulated. (please Cycling74, test your documentation by polling newbs, it's so difficult to understand documentation without any example code, just abstract ideas without real syntax!)
Broc suggests [call select_all_notes, call replace_selected_notes, call notes 0, call done]. "call notes 0" and "call done" doesn't make any sense to me and I can't integrate that in a JS function.var trackNumber = 1;
var currentClip = 1;
//path
var liveSet = new LiveAPI (callback, "live_set tracks " + trackNumber + " clip_slots " + currentClip + " clip");
//get clip notes
liveSet.call("select_all_notes");
clipMidiNotes = liveSet.call("get_selected_notes");
// this works!!!!!
//remove clip notes
liveSet.call("remove_notes", clipMidiNotes); // this does NOT
liveSet.call("remove_notes"); // this doesn't either
liveSet.call("replace_selected_notes","notes 0") // this also doesn't
hustling through the forums.. I figured it out.
function clearMidiNotes () {
var liveSet = new LiveAPI (callback, "live_set tracks " + trackNumber + " clip_slots " + currentClip + " clip");
liveSet.call("select_all_notes");
clipMidiNotes = liveSet.call("get_selected_notes");
log("Clip Midi Notes:", clipMidiNotes);
liveSet.call("replace_selected_notes");
liveSet.call("notes", 0);
liveSet.call("done");
}