easy? question about note-offs.

hthaw's icon

hi all -
i'm trying to assign random velocities to notes without messing up the note-off messages and having a difficult time, especially when chords come into the picture. attached is my flawed approach. i know there is something simple that i'm missing here, i just can't place it..

flawed.maxpat
Max Patch
vichug's icon
Max Patch
Copy patch and select New From Clipboard in Max.

does this work ?

hthaw's icon

a bit - but it still struggles with chords a bit.. maybe this is a job for borax?

vichug's icon

hm, this is odd. Your thing should have worked as well as mine in fact. You could try something with borax but it will maybe be complicated?.. You don't have any midi problem with chords, when you don't use that thing ? try linking directly a midiparse to a midiformat ? i don't think it will change anything, but try placing integer 0's in place of floating point 0's in your unpack ? this looks like a midi specific timing related issue...but really, it should not be harder than that...

broc's icon

I think the problem is that individual chord notes are played with different velocities which sounds odd. For playing the chord notes with equal velocity you need to collect them using eg. the [thresh] object.

hthaw's icon

well, i'm actually using the velocity information for sample-triggering, rather than volume.. but i bet the thresh object will solve this problem...

hthaw's icon

Here's a similar patch with the same problem.
I'm trying to randomly route each new note to a new channel.
I'm not sure how to do that.

attempting.maxpat
Max Patch