Safe Haskell | None |
---|
Low level binding to patch_c.cc and the Patch c++ object, which represents any faust dsp, both instruments and effects processors.
Synopsis
- type PatchP = Ptr CConstPatchP
- data CConstPatchP
- type InstrumentP = Ptr CPatchP
- data CPatchP
- patches :: IO [(Text, PatchP)]
- c_faust_patches :: Ptr (Ptr PatchP) -> IO CInt
- c_faust_name :: PatchP -> CString
- patchInputs :: PatchP -> Int
- patchOutputs :: PatchP -> Int
- instInputs :: InstrumentP -> Int
- instOutputs :: InstrumentP -> Int
- c_faust_num_inputs :: PatchP -> CInt
- c_faust_num_outputs :: PatchP -> CInt
- getMetadata :: PatchP -> IO (Map Text Text)
- parseDescription :: Map Text Text -> Text
- c_faust_metadata :: PatchP -> Ptr (Ptr CString) -> Ptr (Ptr CString) -> IO CInt
- getUiControls :: PatchP -> IO [(([Text], Control.Control), Text)]
- c_faust_controls :: PatchP -> Ptr (Ptr (Ptr CString)) -> Ptr (Ptr CString) -> Ptr (Ptr CString) -> IO CInt
- allocate :: PatchP -> IO (InstrumentP, [(([Text], Control.Control), Ptr Float)])
- c_faust_allocate :: PatchP -> CInt -> IO InstrumentP
- c_faust_control_ptrs :: InstrumentP -> Ptr (Ptr (Ptr Float)) -> IO CInt
- c_faust_destroy :: InstrumentP -> IO ()
- render :: Frames -> Frames -> InstrumentP -> [(Ptr Float, Audio.Block)] -> [V.Vector Float] -> IO [V.Vector Float]
- withControls :: [(Ptr Float, Audio.Block)] -> (CInt -> Ptr (Ptr Float) -> Ptr (Ptr Float) -> IO a) -> IO a
- c_faust_render :: InstrumentP -> CInt -> CInt -> CInt -> Ptr (Ptr Float) -> Ptr (Ptr Float) -> Ptr (Ptr Float) -> Ptr (Ptr Float) -> IO ()
- getState :: InstrumentP -> IO ByteString.ByteString
- unsafeGetState :: InstrumentP -> IO ByteString.ByteString
- putState :: ByteString.ByteString -> Text -> InstrumentP -> IO ()
- c_faust_get_state_size :: InstrumentP -> CSize
- c_faust_get_state :: InstrumentP -> Ptr CString -> IO ()
- c_faust_put_state :: InstrumentP -> CString -> IO ()
- peekTexts :: Int -> Ptr CString -> IO [Text]
- peekTexts0 :: Ptr CString -> IO [Text]
- withVectors :: [V.Vector Float] -> (Ptr (Ptr Float) -> IO a) -> IO a
- withPtrs :: [V.Vector Float] -> ([Ptr Float] -> IO a) -> IO a
Documentation
type PatchP = Ptr CConstPatchP Source #
data CConstPatchP Source #
type InstrumentP = Ptr CPatchP Source #
An allocated patch.
c_faust_name :: PatchP -> CString Source #
patchInputs :: PatchP -> Int Source #
patchOutputs :: PatchP -> Int Source #
instInputs :: InstrumentP -> Int Source #
instOutputs :: InstrumentP -> Int Source #
c_faust_num_inputs :: PatchP -> CInt Source #
c_faust_num_outputs :: PatchP -> CInt Source #
getUiControls :: PatchP -> IO [(([Text], Control.Control), Text)] Source #
c_faust_controls :: PatchP -> Ptr (Ptr (Ptr CString)) -> Ptr (Ptr CString) -> Ptr (Ptr CString) -> IO CInt Source #
Instrument
allocate :: PatchP -> IO (InstrumentP, [(([Text], Control.Control), Ptr Float)]) Source #
c_faust_allocate :: PatchP -> CInt -> IO InstrumentP Source #
c_faust_control_ptrs :: InstrumentP -> Ptr (Ptr (Ptr Float)) -> IO CInt Source #
c_faust_destroy :: InstrumentP -> IO () 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 #
c_faust_render :: InstrumentP -> CInt -> CInt -> CInt -> Ptr (Ptr Float) -> Ptr (Ptr Float) -> Ptr (Ptr Float) -> Ptr (Ptr Float) -> IO () Source #
state
putState :: ByteString.ByteString -> Text -> InstrumentP -> IO () Source #
c_faust_get_state :: InstrumentP -> Ptr CString -> IO () Source #
c_faust_put_state :: InstrumentP -> CString -> IO () Source #