Currently, to run multiple Event streams in parallel, you need to use one of the Ppar
classes. The list of parallel patterns being run can ONLY be specified at construction time - you cannot add new parallel streams once you’re started playback of the Ppar.
This is an initial attempt at an alternate Ppar implementation, that allows adding new parallel streams dynamically. My hope here is to consolidate some of various implementations of “parallel-ish” pattern playback in one place. This overlaps somewhat with the Xspawn
classes, but these have much more narrow and specific use-cases - I eventually hope that I can implement these as well with the PparStream.
For now, it provides two major pieces of functionality.
- An
injectStream
method that plays a new parallel stream starting at the current time (with a possible delta offset). A function wrapping this method is implicitly added to events passing through the stream in the~injectStream
key, so it can be accessed from your Event playback. - A
\fork
parent Event type, that mirrors the behavior of the Pdef recursive phrasing functionality. Event’s of this type will take the contents of the\pattern
key (assumed to be another event pattern), and play them in parallel starting at the current time, and stopping them according to\legato
/\sustain
as a normal Event would be.
This is still very beta, but I’ll post a few simple examples if anyone wants to explore or poke holes in it.