No wonder Your brain hurts if You look for too long in that forest full
of delays , ints, bangs, trolls, hobbits etc
As first - what is that {< 0 } supposed to do ? there is no velocity lower than 0,
and even if so, and one had the result 0 or 1, it is set to bang on whatever output...
Where is sel 1 or sel 0 to trigger random object ?
If You make such simple mistakes to start with,
then It will get hard to do more complicated stuff...
Your patch is set to produce 32 notes of same pitch, each fired after delay time
which gets set randomly, so it is well possible that some notes would
get triggered only few miliseconds apart from each other.
That is never going to work properly, I mean the effect will be too weird,
overlapped notes, cut notes, overloaded polyphony ...
But that is not my bussiness, so I'll stay out of it, and I don't want to just criticise, but also
to be of some help as well.
You don't need that many things in there, one message containing
pitch - velocity combo can be banged by any number of delayed or timed bangs,
Then as next You need to decide how to deal with Note Off.
Let's suppose that You want only Note On to create random delay times
(means You fix that mistake {< 0} -> bang)
Than we get a list with pitch and velocity, which receives all the bangs from different delays,
or something better, let's leave that for later time.
When Note Off gets in it could turn all delays which did not allready bang,
by sending stop message to all delays. That would make retrigger effect
till note off stops the note.
Or if You want to hear ALL 32 delayed notes, then You could send Note Off (velocity 0)
through pipe having value of (highest delay time + note length) in ms.
Or anything else.
Here is a patch with simplier approach :
random values get stored in coll, highest delay time gets sent
to line which counts in ms and so recalls delay times form coll which then bangs
on each recall the message containing pitch - velocity.
When Note Off gets in, it gets sent when line comes to the end of ramp,
delayed by measured time of held note.