hanshoglund / comb

Experimental audio engine
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Safely wrap external (imperative) plug-ins #5

Closed hanshoglund closed 8 years ago

hanshoglund commented 11 years ago

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:

create :: IO VST
run:: VST -> [Double] -> IO [Double]

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))

Does this work?

hanshoglund commented 8 years ago

Project inactive, closing.