Safe Haskell | None |
---|---|
Language | Haskell98 |
- type ToMessageFunc = Shape -> Tempo -> Int -> (Double, Double, ParamMap) -> Maybe (IO ())
- data Backend a = Backend {}
- data Param
- data Shape = Shape {}
- data Value
- class ParamType a where
- type ParamMap = Map Param Value
- type ParamPattern = Pattern ParamMap
- ticksPerCycle :: Num t => t
- defaultValue :: Param -> Value
- hasDefault :: Param -> Bool
- defaulted :: Shape -> [Param]
- defaultMap :: Shape -> ParamMap
- required :: Shape -> [Param]
- hasRequired :: Shape -> ParamMap -> Bool
- isSubset :: Eq a => [a] -> [a] -> Bool
- doAt :: RealFrac a => a -> IO () -> IO ()
- logicalOnset' :: Integral t => Tempo -> t -> Double -> Double -> Double
- applyShape' :: Shape -> ParamMap -> Maybe ParamMap
- start :: Backend a -> Shape -> IO (MVar ParamPattern)
- state :: Backend a -> Shape -> IO (MVar (ParamPattern, [ParamPattern]))
- stream :: Backend a -> Shape -> IO (ParamPattern -> IO ())
- streamcallback :: (ParamPattern -> IO ()) -> Backend a -> Shape -> IO (ParamPattern -> IO ())
- onTick :: Backend a -> Shape -> MVar ParamPattern -> Tempo -> Int -> IO ()
- onTick' :: Backend a -> Shape -> MVar (ParamPattern, [ParamPattern]) -> Tempo -> Int -> IO ()
- make :: (a -> Value) -> Shape -> String -> Pattern a -> ParamPattern
- make' :: ParamType a => (a -> Value) -> Param -> Pattern a -> ParamPattern
- makeP :: ParamType a => Param -> Pattern a -> ParamPattern
- makeS :: Shape -> String -> Pattern String -> ParamPattern
- makeF :: Shape -> String -> Pattern Double -> ParamPattern
- makeI :: Shape -> String -> Pattern Int -> ParamPattern
- param :: Shape -> String -> Param
- merge :: ParamPattern -> ParamPattern -> ParamPattern
- (|=|) :: ParamPattern -> ParamPattern -> ParamPattern
- (#) :: ParamPattern -> ParamPattern -> ParamPattern
- mergeWith :: (Ord k, Applicative f) => (k -> a -> a -> a) -> f (Map k a) -> f (Map k a) -> f (Map k a)
- mergeNumWith :: Applicative f => (Int -> Int -> Int) -> (Double -> Double -> Double) -> f (Map Param Value) -> f (Map Param Value) -> f (Map Param Value)
- mergePlus :: Applicative f => f (Map Param Value) -> f (Map Param Value) -> f (Map Param Value)
- (|*|) :: ParamPattern -> ParamPattern -> ParamPattern
- (|+|) :: ParamPattern -> ParamPattern -> ParamPattern
- (|-|) :: ParamPattern -> ParamPattern -> ParamPattern
- (|/|) :: ParamPattern -> ParamPattern -> ParamPattern
- (###) :: Foldable t => ParamPattern -> t ParamPattern -> ParamPattern
- (***) :: Foldable t => ParamPattern -> t ParamPattern -> ParamPattern
- (+++) :: Foldable t => ParamPattern -> t ParamPattern -> ParamPattern
- (///) :: Foldable t => ParamPattern -> t ParamPattern -> ParamPattern
- setter :: MVar (a, [a]) -> a -> IO ()
- copyParam :: Param -> Param -> ParamPattern -> ParamPattern
- get :: ParamType a => Param -> ParamPattern -> Pattern a
- getI :: Param -> ParamPattern -> Pattern Int
- getF :: Param -> ParamPattern -> Pattern Double
- getS :: Param -> ParamPattern -> Pattern String
- with :: ParamType a => Param -> (Pattern a -> Pattern a) -> ParamPattern -> ParamPattern
- withI :: Param -> (Pattern Int -> Pattern Int) -> ParamPattern -> ParamPattern
- withF :: Param -> (Pattern Double -> Pattern Double) -> ParamPattern -> ParamPattern
- withS :: Param -> (Pattern String -> Pattern String) -> ParamPattern -> ParamPattern
- follow :: ParamType a => Param -> Param -> (Pattern a -> Pattern a) -> ParamPattern -> ParamPattern
- follow' :: ParamType a => Param -> Param -> (Pattern a -> Pattern a) -> ParamPattern -> ParamPattern
- followI :: Param -> Param -> (Pattern Int -> Pattern Int) -> ParamPattern -> ParamPattern
- followF :: Param -> Param -> (Pattern Double -> Pattern Double) -> ParamPattern -> ParamPattern
- followS :: Param -> Param -> (Pattern String -> Pattern String) -> ParamPattern -> ParamPattern
- coerce :: Param -> ParamPattern -> ParamPattern
Documentation
type ParamPattern = Pattern ParamMap Source #
ticksPerCycle :: Num t => t Source #
defaultValue :: Param -> Value Source #
hasDefault :: Param -> Bool Source #
defaultMap :: Shape -> ParamMap Source #
state :: Backend a -> Shape -> IO (MVar (ParamPattern, [ParamPattern])) Source #
streamcallback :: (ParamPattern -> IO ()) -> Backend a -> Shape -> IO (ParamPattern -> IO ()) Source #
onTick' :: Backend a -> Shape -> MVar (ParamPattern, [ParamPattern]) -> Tempo -> Int -> IO () Source #
merge :: ParamPattern -> ParamPattern -> ParamPattern Source #
(|=|) :: ParamPattern -> ParamPattern -> ParamPattern infixl 1 Source #
(#) :: ParamPattern -> ParamPattern -> ParamPattern infixl 1 Source #
mergeWith :: (Ord k, Applicative f) => (k -> a -> a -> a) -> f (Map k a) -> f (Map k a) -> f (Map k a) Source #
mergeNumWith :: Applicative f => (Int -> Int -> Int) -> (Double -> Double -> Double) -> f (Map Param Value) -> f (Map Param Value) -> f (Map Param Value) Source #
mergePlus :: Applicative f => f (Map Param Value) -> f (Map Param Value) -> f (Map Param Value) Source #
(|*|) :: ParamPattern -> ParamPattern -> ParamPattern infixl 1 Source #
(|+|) :: ParamPattern -> ParamPattern -> ParamPattern infixl 1 Source #
(|-|) :: ParamPattern -> ParamPattern -> ParamPattern infixl 1 Source #
(|/|) :: ParamPattern -> ParamPattern -> ParamPattern infixl 1 Source #
(###) :: Foldable t => ParamPattern -> t ParamPattern -> ParamPattern Source #
These are shorthand for merging lists of patterns with #
, |*|
, |+|
,
or |/|
. Sometimes this saves a little typing and can improve readability
when passing things into other functions. As an example, instead of writing
d1 $ sometimes ((|*| speed "2") . (|*| cutoff "2") . (|*| shape "1.5")) $ sound "arpy*4" shape "0.3"
you can write
d1 $ sometimes (*** [speed "2", cutoff "2", shape "1.5"]) $ sound "arpy*4" ### [cutoff "350", shape "0.3"]
(***) :: Foldable t => ParamPattern -> t ParamPattern -> ParamPattern Source #
(+++) :: Foldable t => ParamPattern -> t ParamPattern -> ParamPattern Source #
(///) :: Foldable t => ParamPattern -> t ParamPattern -> ParamPattern Source #
copyParam :: Param -> Param -> ParamPattern -> ParamPattern Source #
Copies values from one parameter to another. Used by nToOrbit
in Sound.Tidal.Dirt
.
with :: ParamType a => Param -> (Pattern a -> Pattern a) -> ParamPattern -> ParamPattern Source #
withI :: Param -> (Pattern Int -> Pattern Int) -> ParamPattern -> ParamPattern Source #
withF :: Param -> (Pattern Double -> Pattern Double) -> ParamPattern -> ParamPattern Source #
withS :: Param -> (Pattern String -> Pattern String) -> ParamPattern -> ParamPattern Source #
follow :: ParamType a => Param -> Param -> (Pattern a -> Pattern a) -> ParamPattern -> ParamPattern Source #
follow' :: ParamType a => Param -> Param -> (Pattern a -> Pattern a) -> ParamPattern -> ParamPattern Source #
followF :: Param -> Param -> (Pattern Double -> Pattern Double) -> ParamPattern -> ParamPattern Source #
followS :: Param -> Param -> (Pattern String -> Pattern String) -> ParamPattern -> ParamPattern Source #
coerce :: Param -> ParamPattern -> ParamPattern Source #