- patterns are not good at resource management. Any pattern that
relies on external resources (or, to an extent, any resource defined
outside the pattern constructor that needs to be maintained across
events)
is risky in performance because you might create or destroy
the resources at the wrong time.
Monophonic or effect synths qualify
as "resource[s] defined outside the pattern constructor" because they
exist only in the context of the embedInStream method.
My solution in my chucklib framework is to create a container for an
event pattern and event stream. The stream remains immutable, but it
can refer to environment variables that the user can access and
change. The container also handles resource management (there are user
hooks to release resources on stop and free). It's a heavier structure
(too heavy to be a general solution for the class library) but it
opens up a lot of possibilities that are otherwise impossible or
prohibitively inconvenient.
So I wonder if there's a way to decouple resource management in Pmono
and Pfx? It may not be possible, but I've obtained massive benefits by
using patterns and streams for what they're good at it and creating
other structures for the things they don't do so well.
hjh
--
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman
_______________________________________________
sc-dev mailing list
sc-dev@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-dev