Yeah I used the get note, but within the boundaries of Live's clip loop.
Here's a straight copy from my "extract" encapsulation:
First you want to have your midi clip selected since it uses [detail_clip] to get the notes.
Then the notes are placed by order of time into a dictionary, which you can then use a counter to fire off the keys to send the midi notes. That's pretty much it.
One handy thing (thanks to some assistance on here) is that notes that are close together under 1/16th note will be rounded off to be put in the same dictionary key. This is because if you have human input playing some chords, obviously the notes in the chord won't be recorded at the exact same time, which means they would be entered as single notes in the dictionary and the chord wouldn't be fired, it would fire each note independently.
Alright- GetSelectedNotes dumps MIDI to a Jitter Matrix, which then has to be reinterpreted to translate back to MIDI- I think that makes sense - I'm unfamiliar with M4L, so I'm a little unclear about how to get the MIDI Clip into the GetSelectedNotes API, though.
wow, thanks mooter, this was exactly what I was looking for!
How did you figure out the syntax for get_notes? It's very very different from what's in the LOM; there's no specification of get_notes "type" and then it's double int double int afterwards, it's weird. :?
In my little patch I've done without the jitter matrix, since they're basically dumping into a matrix and then going straight back out; instead I've opted to simply sort them with a coll, but then your little wonder comes along with that nice rounding there, I may stick with this. It looks really slick :)
Thanks. The syntax was trial and error. Yes the LOM says to use double for all but really for pitch and velocity it's int. And yes jitter matrix can be overkill for some tasks and I stick to coll when I just need a temp cache. I initially used a coll to dump the notes but then I needed them to be saved with the live set so I replaced it with a dict:) Dict is going to be pretty essential for most of my stuff, I think, while coll is still useful as a temp cache. I really like that you push and pull between the 2.
I'll be releasing my advanced round robin device soon ("AdRoRob"?) to open up a lot of possibilities using that encapsulation so keep your eyes open!
Yeah, looking forward to seeing that! It really helped to crossreference the LOM with your patch... man, this documentation...
the possibilities for my group are pretty immense; this means I can make any clip available over the network. I've been pondering this for quite a while.
It also solves a problem of handling polyphonic midi recording and sequencing for me. Doing it in-clip is pretty cool; combining the sequencing madness of max with the easy-in,easy-out of Live is going to be fun.