Safe Haskell | Safe-Inferred |
---|
Low level binding to faust dsps, specialized for ones that generate audio.
Synopsis
- data PatchT ptr cptr = Patch {
- _name :: !Text
- _doc :: !Text
- _impulseGate :: !Bool
- _elementFrom :: !(Maybe Text)
- _controls :: !(Map Control (cptr, ControlConfig))
- _inputControls :: ![(Control.Control, ControlConfig)]
- _outputs :: !Int
- _ptr :: !ptr
- type Patch = PatchT PatchC.PatchP ()
- type Instrument = PatchT PatchC.InstrumentP (Ptr Float)
- type Control = (Element, Control.Control)
- getPatches :: IO (Map Text (Either Text Patch))
- imControls :: PatchT ptr cptr -> Map Control.Control ControlConfig
- data ControlConfig = ControlConfig {
- _constant :: !Bool
- _description :: !Text
- allocate :: Patch -> IO Instrument
- destroy :: Instrument -> IO ()
- render :: Frames -> Frames -> Instrument -> [(Ptr Float, Audio.Block)] -> [V.Vector Float] -> IO [V.Vector Float]
- getState :: Instrument -> IO Checkpoint.State
- unsafeGetState :: Instrument -> IO Checkpoint.State
- putState :: Instrument -> Checkpoint.State -> IO ()
Documentation
Patch | |
|
type Patch = PatchT PatchC.PatchP () Source #
A patch can be used to create Instrument
s.
type Instrument = PatchT PatchC.InstrumentP (Ptr Float) Source #
An allocated patch.
type Control = (Element, Control.Control) Source #
Patch
imControls :: PatchT ptr cptr -> Map Control.Control ControlConfig Source #
Map supported controls to ControlConfig. This is for the Im.Patch.
data ControlConfig Source #
ControlConfig | |
|
Instances
Show ControlConfig Source # | |
Defined in Synth.Faust.InstrumentC showsPrec :: Int -> ControlConfig -> ShowS # show :: ControlConfig -> String # showList :: [ControlConfig] -> ShowS # | |
Eq ControlConfig Source # | |
Defined in Synth.Faust.InstrumentC (==) :: ControlConfig -> ControlConfig -> Bool # (/=) :: ControlConfig -> ControlConfig -> Bool # | |
Pretty ControlConfig Source # | |
Defined in Synth.Faust.InstrumentC pretty :: ControlConfig -> Text Source # format :: ControlConfig -> Doc Source # formatList :: [ControlConfig] -> Doc Source # |
Instrument
destroy :: Instrument -> IO () Source #
:: Frames | |
-> Frames | |
-> Instrument | |
-> [(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.
state
getState :: Instrument -> IO Checkpoint.State Source #
putState :: Instrument -> Checkpoint.State -> IO () Source #