Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellNone



Low level binding to patch_c.cc and the Patch c++ object, which represents any faust dsp, both instruments and effects processors.



type InstrumentP = Ptr CPatchP Source #

An allocated patch.


render Source #


:: Frames 
-> Frames 
-> InstrumentP 
-> [(Ptr Float, Audio.Block)] 
-> [V.Vector Float]

Input signals. The length must be equal to the the patchInputs, and each vector must have the same length.

-> IO [V.Vector Float]

one block of samples for each output channel

Render chunk of time and return samples.

withControls :: [(Ptr Float, Audio.Block)] -> (CInt -> Ptr (Ptr Float) -> Ptr (Ptr Float) -> IO a) -> IO a Source #


unsafeGetState :: InstrumentP -> IO ByteString.ByteString Source #

getState, but without copying, if you promise to finish with the State before you call render, which will change it.


withVectors :: [V.Vector Float] -> (Ptr (Ptr Float) -> IO a) -> IO a Source #

Allocate a list of vectors as **float. Pass nullptr for [], to avoid allocation.

withPtrs :: [V.Vector Float] -> ([Ptr Float] -> IO a) -> IO a Source #

Convert a list of vectors to a list of pointers, with no copying.