i'm at work, so i can't try out, if it works, but you could try to store the midi note-values in an array (multiplied by result of velocity values connected to [> 0]), indexed by the voice number from [poly] and use [Uzi] and [tabread] to serialize the values in the array, so that you can find the samllest number.
[notein]
| |
[poly 12 1]
| | \
| [expr $f1*($f2>0)] <------- note value is zero in case of note off
\ /
X
/ \
[tabwrite array1] <------- write to the array, voice # is index
to check the values for the smallest one:
[bang( <----- should be banged by a [poly] out,
| immediately after structure above (t b f)
|
[t b b b]
| | |
| | [arraysize array1] <---- send arraysize to uzi, so it counts
| | | from 1 to arraysize
| | |
| [Uzi]
| |
| [- 1] <-------- begin counting at zero to arraysize-1
| |
| [tabread array1] <---- read array1 at index
| |
| [deny 0] <--------filter note offs
| |
| [t f f f]
| / X
| | [<] <------compare with previous number
| | | if smaller, let it pass spigot
| [spigot]
| |
[float]
|
[nbx\ <-- actual lowest number in the array
no guarantee that this works - as i said before, i'm at work and can't verify, what i tell you here. but this could give you an idea, how it could be done.