tidal-0.9.9: Pattern language for improvised music

Safe HaskellNone
LanguageHaskell2010

Sound.Tidal.Stream

Synopsis

Documentation

type ToMessageFunc = Shape -> Tempo -> Int -> (Double, Double, ParamMap) -> Maybe (IO ()) #

data Backend a #

Constructors

Backend 

Fields

data Param #

Constructors

S 
F 
I 

Fields

Instances

Eq Param # 

Methods

(==) :: Param -> Param -> Bool #

(/=) :: Param -> Param -> Bool #

Ord Param # 

Methods

compare :: Param -> Param -> Ordering #

(<) :: Param -> Param -> Bool #

(<=) :: Param -> Param -> Bool #

(>) :: Param -> Param -> Bool #

(>=) :: Param -> Param -> Bool #

max :: Param -> Param -> Param #

min :: Param -> Param -> Param #

Show Param # 

Methods

showsPrec :: Int -> Param -> ShowS #

show :: Param -> String #

showList :: [Param] -> ShowS #

data Shape #

Constructors

Shape 

Fields

data Value #

Constructors

VS 

Fields

VF 

Fields

VI 

Fields

Instances

Eq Value # 

Methods

(==) :: Value -> Value -> Bool #

(/=) :: Value -> Value -> Bool #

Ord Value # 

Methods

compare :: Value -> Value -> Ordering #

(<) :: Value -> Value -> Bool #

(<=) :: Value -> Value -> Bool #

(>) :: Value -> Value -> Bool #

(>=) :: Value -> Value -> Bool #

max :: Value -> Value -> Value #

min :: Value -> Value -> Value #

Show Value # 

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

class ParamType a where #

Minimal complete definition

fromV, toV

Methods

fromV :: Value -> Maybe a #

toV :: a -> Value #

Instances

ticksPerCycle :: Num p => p #

isSubset :: Eq a => [a] -> [a] -> Bool #

doAt :: RealFrac a => a -> IO () -> IO () #

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 () #

make :: (a -> Value) -> Shape -> String -> Pattern a -> ParamPattern #

make' :: ParamType a => (a -> Value) -> Param -> Pattern a -> 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) #

(###) :: Foldable t => ParamPattern -> t ParamPattern -> ParamPattern #

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"]

setter :: MVar (a, [a]) -> a -> IO () #

copyParam :: Param -> Param -> ParamPattern -> ParamPattern #

Copies values from one parameter to another. Used by nToOrbit in Sound.Tidal.Dirt.