Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

Synth.Faust.PatchC

Description

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

Synopsis

Documentation

type InstrumentP = Ptr CPatchP Source #

An allocated patch.

Instrument

render Source #

Arguments

:: 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 #

state

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.

util

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.