Safe Haskell | Safe-Inferred |
---|
Functions shared between instrument and effect faust patches.
Synopsis
- isBasicallySilent :: V.Vector Audio.Sample -> Bool
- rms :: V.Vector Float -> Float
- findControls :: Ord control => Map control (ptr, config) -> Map control block -> [(ptr, block)]
- takeControls :: Ord control => Frames -> Map control AUtil.Audio1 -> Resource.ResourceT IO (Map control Audio.Block, Map control AUtil.Audio1)
- takeExtend :: Monad m => Frames -> Audio.Audio m rate 1 -> m (Maybe (Audio.Block, Audio.Audio m rate 1))
- renderControl :: Monad m => Int -> RealTime.RealTime -> [(Double, Double)] -> Audio.Audio m rate 1
- controlBreakpoints :: Frames -> Control.Control -> [(RealTime.RealTime, Map Control.Control Signal.Signal)] -> [(Double, Double)]
- roundBreakpoints :: Frames -> [(RealTime.RealTime, Y)] -> [(Double, Double)]
- roundTo :: RealTime.RealTime -> RealTime.RealTime -> RealTime.RealTime
Documentation
controls
findControls :: Ord control => Map control (ptr, config) -> Map control block -> [(ptr, block)] Source #
takeControls :: Ord control => Frames -> Map control AUtil.Audio1 -> Resource.ResourceT IO (Map control Audio.Block, Map control AUtil.Audio1) Source #
Pull a chunk from each of the controls. Omit the control if its signal has run out. This is ok because controls naturally retain their last value.
takeExtend :: Monad m => Frames -> Audio.Audio m rate 1 -> m (Maybe (Audio.Block, Audio.Audio m rate 1)) Source #
Audio.splitAt
, but extend the final sample. I need this because
PatchC.render relies on all control blocks being the same length, for
simplicity.
renderControl :: Monad m => Int -> RealTime.RealTime -> [(Double, Double)] -> Audio.Audio m rate 1 Source #
controlBreakpoints :: Frames -> Control.Control -> [(RealTime.RealTime, Map Control.Control Signal.Signal)] -> [(Double, Double)] Source #
roundBreakpoints :: Frames -> [(RealTime.RealTime, Y)] -> [(Double, Double)] Source #
Round controls to controlSize boundaries. See NOTE [faust-controls].