Probably i didn't explain it correctly.
Bag does store all the notes on so when receive [ flush ( it sends out all the notes of.
I.e when the sustain pedal is on and three [ 64 127 ( in a row are received no [ 64 0 ( are sent out before the new [ 64 127 ( arrives but they are sent out all together only when sustain turns off.
This is conceptually the same way as [poly] works with voice allocation so that repeated notes with the same MIDI note number are treated without a specific system. So probably solving those voice allocation things with an array of 128 values (one for each possible midi note) is the only way to model the piano behavior with polyphony and the sustain pedal.