ReactiveX Event flow operators like Buffer / Window possible in SC?

Hey there All,

So I’m really into ReactiveX as a way to work with asynchronous flows of events and was thinking about how this could be used musically.

I wonder if anybody has any ideas how, for instance, a buffer of MIDI events could be created in SC?

//////// Example:
To be more specific, this would work as so:

An object’s .next(event) method would called and it receives an event. The object keeps hold of all of the events that it receives during a set period of time, and after that period of time applies set processing to the events. Post-processing, the events are then played back according to the time at which they were received during the previous buffer period.

I hope that makes sense, it’s just like how digital audio processing is applied I think.

I guess the question is how to implement the kind of ‘flow’ paradigm that ReactiveX uses but in SC.