midi note length

Questions and discussion about building and using Max for Live devices
chapelier fou
Posts: 5059
Joined: Mon May 15, 2006 12:15 pm

Re: midi note length

Post by chapelier fou » Tue Mar 28, 2017 3:14 pm

Interesting idea. Need to sort when several notes are played at the same time, though.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

broc
Posts: 1148
Joined: Mon Jul 26, 2004 8:37 am

Re: midi note length

Post by broc » Tue Mar 28, 2017 9:11 pm

Good point. But notes playing "at the same time" are of course processed sequentially. And as far as I know, the Live API reads the clip notes from low to high, and clips play chord notes also in this order (as I've observed with a midi monitor).

broc
Posts: 1148
Joined: Mon Jul 26, 2004 8:37 am

Re: midi note length

Post by broc » Wed Mar 29, 2017 12:31 pm

Here is a patch that I'm using elsewhere to read clip notes into coll.
It ensures that notes with the same start time are stored in ascending pitch order.

<pre><code>
----------begin_max5_patcher----------
2902.3oc6cssaiiiD84juBAi8wLFjTTVR6CKvNy9ErXeqw.CYaZG0srjgDcl
LSi4ee4EcgTWo7sHEjznSrEIsp5TEqpXwhV+74mVrI4cR1Bq+o02rd5oe97S
OItD+BOk+9mVbL38sQAYhtsHJ7MxRJ4c5hWjs9VPZbvQhdieC86EseJkjQho
AzvjXdmf4WO4LMhPo+4Ih71uXwKr+a864MuIIcGIcaRTRprcvRajC1+E9KvN
.eOwqbkWCtDTNxSAoL5gRRWShC1DQTuoBBmSo+VT3Iq+k0ukDE0FgtNkrkJu
udKArOeae9ebWIdiixcK97wvXFijoda1mDS2GrUbqAUcTxxhdhxu5wjcZ8Jb
mf7R178ewqjvBnaeML9fBQgf.NkfWszoUpJK3Mxt0ATZZ3lyTR0qxxEs4xVt
3K5LIYewkKttJLFkDenOQrVmydMIk1r2s00BYOpk1NxT5DH5RPKsRXfYtVCi
9gbMG1eQkZOZcNL9svrvbEAjr8+94mq9i32+8yuX3LfXxevDOKpqQsUQUpcc
6Wpqi2ptSF8Okj5h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2s8gQQkiU0ZQQZMWbHMXWnxWbXKLl.UqUa4nfkk3s6JrqjG3.lXXXc
VJeHHyfhUtUiKH9PdMy5pXj5TZxojzx5KdoseY+OSSJ4RkmopJO.gUdvggJx
PZdGVHUyqajawQl1dXwGmvn8e+7+GLm6KwC
-----------end_max5_patcher-----------
</code></pre>

chapelier fou
Posts: 5059
Joined: Mon May 15, 2006 12:15 pm

Re: midi note length

Post by chapelier fou » Wed Mar 29, 2017 12:47 pm

Looks nice !
To the OP, this patch focuses on the first clip of the track the device is in.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

elt.net
Posts: 62
Joined: Fri Jul 29, 2005 11:02 pm
Contact:

Re: midi note length

Post by elt.net » Sun Apr 16, 2017 3:43 pm

yep, that's a really good starting point. thx a lot.
--------------------
www.altersessio.net
--------------------

Post Reply