Hoogle Search
Within LTS Haskell 24.52 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
slowspread :: (a -> t -> Pattern b) -> [a] -> t -> Pattern btidal Sound.Tidal.Boot An alias for spread consistent with fastspread.
spread :: (a -> t -> Pattern b) -> [a] -> t -> Pattern btidal Sound.Tidal.Boot The spread function allows you to take a pattern transformation which takes a parameter, such as slow, and provide several parameters which are switched between. In other words it "spreads" a function across several values. Taking a simple high hat loop as an example:
d1 $ sound "ho ho:2 ho:3 hc"
We can slow it down by different amounts, such as by a half:d1 $ slow 2 $ sound "ho ho:2 ho:3 hc"
Or by four thirds (i.e. speeding it up by a third; 4%3 means four over three):d1 $ slow (4%3) $ sound "ho ho:2 ho:3 hc"
But if we use spread, we can make a pattern which alternates between the two speeds:d1 $ spread slow [2,4%3] $ sound "ho ho:2 ho:3 hc"
Note that if you pass ($) as the function to spread values over, you can put functions as the list of values. (spreadf is an alias for spread ($).) For example:d1 $ spread ($) [density 2, rev, slow 2, striate 3, (# speed "0.8")] $ sound "[bd*2 [~ bd]] [sn future]*2 cp jvbass*4"
Above, the pattern will have these transforms applied to it, one at a time, per cycle:- cycle 1: density 2 - pattern will increase in speed
- cycle 2: rev - pattern will be reversed
- cycle 3: slow 2 - pattern will decrease in speed
- cycle 4: striate 3 - pattern will be granualized
- cycle 5: (# speed "0.8") - pattern samples will be played back more slowly
spread' :: Monad m => (a -> b -> m c) -> m a -> b -> m ctidal Sound.Tidal.Boot There's a version of this function, spread' (pronounced "spread prime"), which takes a pattern of parameters, instead of a list:
d1 $ spread' slow "2 4%3" $ sound "ho ho:2 ho:3 hc"
This is quite a messy area of Tidal—due to a slight difference of implementation this sounds completely different! One advantage of using spread' though is that you can provide polyphonic parameters, e.g.:d1 $ spread' slow "[2 4%3, 3]" $ sound "ho ho:2 ho:3 hc"
spreadChoose :: (t -> t1 -> Pattern b) -> [t] -> t1 -> Pattern btidal Sound.Tidal.Boot spreadChoose f xs p is similar to slowspread but picks values from xs at random, rather than cycling through them in order.
d1 $ spreadChoose ($) [gap 4, striate 4] $ sound "ho ho:2 ho:3 hc"
spreadf :: [a -> Pattern b] -> a -> Pattern btidal Sound.Tidal.Boot No documentation available.
spreadr :: (t -> t1 -> Pattern b) -> [t] -> t1 -> Pattern btidal Sound.Tidal.Boot A shorter alias for spreadChoose.
-
Alternative parser for TOML values produced by the toml-reader package. Package defines a set of parser combinators that allows analyzing arbitrary TOML structures. Includes formatted errors that keep track of where in the original TOML file a value came from.
_Read :: (Show a, Read a) => TomlBiMap a AnyValuetomland Toml.Codec.BiMap.Conversion BiMap for AnyValue and values with a Read and Show instances. Usually used as the read combinator.
_ReadString :: (Show a, Read a) => TomlBiMap a Stringtomland Toml.Codec.BiMap.Conversion Helper BiMap for String and types with Read and Show instances.
codecRead :: Codec i o -> TomlEnv otomland Toml.Codec.Types Extract value of type o from monadic context TomlEnv.