Max4Live - clear midi notes?

Is there a command that clears the midi notes from a clip? I can’t seem to find anything so I’m guessing the answer is no.

in the full Max, the midiflush object (apparently) can do this.

[flush] and [midiflush] will both sit in the midi stream and, when activated, end any notes which happen to be playing.

I don’t think that’s what Jesse’s asking for. It sounds like he wants to modify the contents of a MIDI clip, removing all notes from it.

No simple command for that; it’s a series of LOM calls. (getting the address of the current track, finding the currently playing clip, and editing its contents…)

1 Like

From memory I think using select_all_notes and replace_selected_notes (replacing them with nothing) might work, but it’s been ages since I last messed around with the LOM

https://docs.cycling74.com/max5/refpages/m4l-ref/m4l_live_object_model.html

1 Like

@greaterthanzero and @ehg are correct.

Here’s how I would do it (assuming you want to erase all notes from Clip 1 of Track 1).

I just tried the patch, it works.

:slightly_smiling_face:

3 Likes

Thank you! still getting the hang of the live.object

1 Like

You probably know this already, but just in case here’s the webpage that tells you everything about the LOM :
https://docs.cycling74.com/max7/vignettes/live_object_model

And here is the book that helped me make my first steps (and a little more) with MaxForLive :

1 Like