M4L Midi Device Dev - Having Trouble with M4L JS sending an undo to a midi clip that has just changed

gmazel's icon

Having Trouble with M4L JS sending an undo to a midi clip that has just changed

M4L Undo Bug in Presentation View

function undo() {

try {

var liveSet = new LiveAPI("live_set");

liveSet.call("undo");

outlet(1, "undo triggered");

} catch(e) {

outlet(1, "undo error: " + e.message);

}

}

in Max Console I see:

undo: undo bang

bridge: "undo triggered"

Undo function is getting triggered, but Live does not update the undo state to a midi clip. All other functions are operational in my .js code.

Funny thing, I saw this Undo live.button function actually working earlier today, and then it just suddenly stopped working.

Anyone have any ideas?

M4L Undo Bug - Patch Wiring

Thanks,

gmazel's icon

I fixed it, thanks to a YouTube by Tom Cosm.
The problem was all my control parameters were getting pushed onto Live's Undo Stack. Did not realize that was becoming a problem for Undo.

Every [live.dial], [live.toggle], and [live.button] with visible automation parameters pushes onto Live's undo stack when you interact with them, which buries your actual note modification under a pile of parameter changes. Setting them to hidden removes them from the undo stack entirely, leaving only the note write as the undo-able action.

FIXED Parameter Visibility


gmazel's icon
midi-note-index-select-fix.mp4