hsc3-rec-0.12: Sound/SC3/UGen/Record/LastValue.hs
-- | Output the last value before the input changed
module Sound.SC3.UGen.Record.LastValue where
import qualified Sound.SC3.UGen as S
import Sound.SC3.UGen.Record
data LastValue = LastValue {
rate :: S.Rate,
input :: S.UGen,
diff :: S.UGen
} deriving (Show)
lastValue :: LastValue
lastValue = LastValue {
rate = S.AR,
input = 0.0,
diff = 0.01
}
mkLastValue :: LastValue -> S.UGen
mkLastValue (LastValue r a' b') = S.mkOsc r "LastValue" [a',b'] 1
instance Make LastValue where
ugen = mkLastValue