I would like something in the primitives/ref-implementation to accomodate a safe wrapping of imperative external generators (such as VST plug-ins etc). These typically have an internal state, and an API such as:
If we could safely wrap both of these in a Signal?
extenal :: IO ([Double] -> IO [Double]) -> Signal
When this signal is run, we must simply assure that each node receives its own instance (by calling the top-level IO expression), and that each such instance is unique in the graph.
data Dummy
makeDummy :: IO Dummy
dummify :: (a -> IO a) -> Dummy -> (a -> Dummy -> (a, Dummy))
I would like something in the primitives/ref-implementation to accomodate a safe wrapping of imperative external generators (such as VST plug-ins etc). These typically have an internal state, and an API such as:
If we could safely wrap both of these in a Signal?
When this signal is run, we must simply assure that each node receives its own instance (by calling the top-level IO expression), and that each such instance is unique in the graph.
Does this work?