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




Functions shared between instrument and effect faust patches.




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.

roundBreakpoints :: Frames -> [(RealTime.RealTime, Y)] -> [(Double, Double)] Source #

Round controls to controlSize boundaries. See NOTE [faust-controls].