module Synthesizer.Dimensional.ChunkySize.Signal (
store, length,
) where
import qualified Synthesizer.Dimensional.Rate as Rate
import qualified Synthesizer.Dimensional.Amplitude as Amp
import qualified Synthesizer.Dimensional.Signal.Private as SigA
import qualified Synthesizer.ChunkySize as ChunkySize
import qualified Synthesizer.ChunkySize.Cut as CutC
import qualified Synthesizer.ChunkySize.Signal as SigC
import qualified Synthesizer.State.Signal as Sig
type Signal s amp sig =
SigA.T (Rate.Phantom s) amp sig
type Size s =
SigA.T (Rate.Phantom s) Amp.Abstract ChunkySize.T
store ::
(SigC.Write sig yv) =>
Size s ->
Signal s amp (Sig.T yv) ->
Signal s amp (sig yv)
store =
\cs -> SigA.processBody (SigC.fromState (SigA.body cs))
length :: (CutC.Read sig) =>
Signal s amp sig ->
Size s
length =
\xs -> SigA.abstractFromBody (CutC.length (SigA.body xs))