module Synthesizer.Dimensional.Straight.Displacement where
import qualified Synthesizer.Dimensional.Abstraction.RateIndependent as Ind
import qualified Synthesizer.Dimensional.Abstraction.Flat as Flat
import qualified Synthesizer.Dimensional.Straight.Signal as SigS
import qualified Synthesizer.State.Displacement as Disp
import qualified Synthesizer.State.Signal as Sig
import qualified Algebra.Additive as Additive
mix :: (Additive.C v) => SigS.R s v -> SigS.R s v -> SigS.R s v
mix x = SigS.processSamples (SigS.toSamples x Additive.+)
raise :: (Ind.C w, Additive.C v) =>
v -> w SigS.S v -> w SigS.S v
raise x = SigS.processSamples (Disp.raise x)
map :: (Ind.C w, Flat.C flat y0) =>
(y0 -> y1) ->
w flat y0 ->
w SigS.S y1
map f =
Ind.processSignal
(SigS.Cons .
Sig.map f .
Flat.unwrappedToSamples)
distort :: (c -> a -> a) -> SigS.R s c -> SigS.R s a -> SigS.R s a
distort f c = SigS.processSamples (Disp.distort f (SigS.toSamples c))