Page 1 of 1
Select individual notes in midi clips
Posted: Wed Aug 18, 2010 8:28 pm
by occular
Hello,
Is there a way to select notes in midi clips without selecting them in the UI ?
Maybe just get an information on the position of each note in clip ?
I just can't find the right solution in the manual, forum and tutorials on the max4live.info site.
I want to be able to set/remove/replace notes on controller.
I know I can manupulate notes with "replace_selected_notes" command, but for this operation the notes must be selected first...
many thanks,
--occ
Re: Select individual notes in midi clips
Posted: Wed Aug 18, 2010 10:23 pm
by Surreal
select_all_notes
http://www.cycling74.com/docs/max5/refp ... model.html
that will get you all of the notes in a clip. i still haven't thunk up a way to get portions.
Re: Select individual notes in midi clips
Posted: Wed Aug 18, 2010 11:38 pm
by broc
I think with select_all_notes and get_selected_notes you could store all notes in a [coll] object.
There you may change individual notes or portions and then write all notes back into the clip.
Re: Select individual notes in midi clips
Posted: Thu Aug 19, 2010 3:47 am
by Surreal
yeah, but my problem (not to hijack the thread) is that you have to get that list whole. the 'cleanest' way i thought up to watch a clip and edit its content was to simply get the list if something changed.
Re: Select individual notes in midi clips
Posted: Thu Aug 19, 2010 9:08 am
by occular
yes, as workaround I thought about to replace the whole content of the clip with coll. I have to try this out...
Re: Select individual notes in midi clips
Posted: Sun Aug 22, 2010 2:57 pm
by Palmer Eldritch
Hi Occular,
as a suggestion,
with the following patch you can select notes on your choice.
in this case all notes inside the clip loop (if the clip is looped) or inside the clip start/end points (if the clip is not looped).
But you can change the rules very easily.
<pre><code>
----------begin_max5_patcher----------
2456.3oc0b0saaarD9Z6mhMB9hV.GWt+RtEsA3btqOCAAtTRqrYCMofHkSNo
su6mcmYoLssnEoVRFDfTwNTJjy9wY9le1g4uu7hEKK+poZA4WIejbwE+8kWb
AbJ2ItvKewhGR+5p7zJ3msXU4COXJpWbM9c0luVCm+cu6cj7rGMjxkUlcOZ1
QxKKqLjr5+rhrcW4Vyt5LSEIcSs86pReLq3NR88Fx1z5U2S1WTmkmS1YxKSW
+7uxdkata4YElUk1eq6VJ7mbSYQcU12LtyQY2D4Ocw9G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5vdYTWktlNeVqR7Pr90RTketLYGSBeufv4c.jliUoqAvm0pThqK5qk7
1n9IREjlkmWtURzvWIBOYO80RJbjiEwQGjBbk3ROskRd7UB7JdLjkRnJEyd6
XmPobC09ffWaEpTkRIUttfywlVh9DOSRguObJI+fzXrbNIF6F7lgYtD2Zir4
H60ykjLzbAmnTPZLVJmxvGrVXym0RTOf2W7L3znaruYYBrsFHVKEAifv6S1I
gP26kvL5v4FZGB+jr.pgoTtMRGd62vAOAC4.RghgQ84Qtdf7uMtIBcCGaiTn
nqtO9+Cjh0qeBLcENFaCjBTaU8Jfv7FOHtG5zPMN4Xq4hf2PSAlMKHMFzQmx
+9EqnoF.48hhbfAfD39hx7.omvjGdPlDZOzVYx.01HQylf3ddi5NHEn1J6SF
T7yCaoXW0aKEp0odBvVleyPvw+sQaYrQHXYeR2PLrJFFCch0GchMu5DuO5De
d0IQezIw7oShdkI97l6ktu13ymNI38Am3CyFm52MZEsIhajWJznaw8UaG.KA
E6LHWgSuA1PAPZL7K5k1Nj3EdzzWtRh5fTvoZ2KOF97RAK6sRMnBpw2X4HU6
7+GkxU3SP4JiQN0mh1QMvzTEJz9KRh8NAGh3HY3EkDOAHnW+jnSSyC7wvooO
1mp40mQ0qm2CEAk9+8FAactfdPJTssOdLb07VDUepLdvM802XW+Tz3arab3d
LI5IPakZ3MjPEqdl1FNEolNAZaSKbG8llq6Ee971ybsbBPvfS0Q1mdcNzF4i
CVQB13Frr9jv6aCsWr1L8YUZrF2OpmDFi9vexB9FXva+7ghooGi93fTnH6DX
Y5UOUB1NmFe6vamyKpSnCe6PZOuU3eu7+CHOsdAN
-----------end_max5_patcher-----------
</code></pre>
Have fun, palmer
Re: Select individual notes in midi clips
Posted: Sun Aug 22, 2010 8:48 pm
by occular
Whooooohaaaaaaaaaa !!!! You are a genius !!!
It is a great solution, I have to work it out !
By the way I didn't realize ( overlooked ) the message -call note-, this was the puzzle I was looking for. And see here: in the manual it is...
Greetz from Bonn and maaany thanks !
P.S: If I get the solution to work properly, I'll post it here, of course.
Re: Select individual notes in midi clips
Posted: Tue Dec 27, 2011 1:03 pm
by S4racen
I realise this is a long time dead thread but i'm trying to find a way to select an individual note line in a clip and then delete all instances of that note, i seem to be going round in circles and getting nowhere!
Cheers
D
Re: Select individual notes in midi clips
Posted: Tue Dec 27, 2011 2:34 pm
by ST8
You need to select all the notes in the clip, get the list of notes, remove the row you dont want, then use replace_selected_notes.
Re: Select individual notes in midi clips
Posted: Tue Dec 27, 2011 6:09 pm
by S4racen
Sounds easy, obviously i can print the list of notes but which object should i be pulling them in to then allow me to select a note to delete??
Cheers
D
Re: Select individual notes in midi clips
Posted: Tue Dec 27, 2011 7:05 pm
by ST8
Not 100% sure how it works in max, in python you get a tuple. In max does get_selected_notes give you a list? If so you need to do some zl magic to remove the rows you dont want, then call replace_selected_notes with your updated list.
Re: Select individual notes in midi clips
Posted: Tue Dec 27, 2011 7:32 pm
by S4racen
Thanks i'll have a look, i seem to remember troubles with tuples before though...
Cheers
D
Re: Select individual notes in midi clips
Posted: Wed Dec 28, 2011 1:22 am
by JuanSOLO
Darren, you should look inside Mark Egloff's step sequencer. It's been a long time since I was messing with that device, but it does what you seek, plus a few other things.
Re: Select individual notes in midi clips
Posted: Wed Dec 28, 2011 1:47 am
by S4racen
Good news, been tearing hair all day over this one and it's only for a simple device!
Cheers
D
Re: Select individual notes in midi clips
Posted: Wed Dec 28, 2011 1:54 am
by JuanSOLO
Well pack a lunch if you plan on learning from Egloff's work. It's really clean, and really informative, BUT it's really deep and complex. However you could probably just message him if you got questions. At one time I was trying to learn how to do similar stuff with M4L. I have recently abandoned most efforts to learn python
It's a snails pace I tell you.