tidal 0.4.13 → 0.4.14
raw patch · 4 files changed
+111/−2 lines, 4 files
Files
- Sound/Tidal/Dirt.hs +15/−1
- Sound/Tidal/Strategies.hs +3/−0
- doc/tidal.md +92/−0
- tidal.cabal +1/−1
Sound/Tidal/Dirt.hs view
@@ -37,7 +37,13 @@ I "cut" (Just (0)), F "delay" (Just (0)), F "delaytime" (Just (-1)),- F "delayfeedback" (Just (-1))+ F "delayfeedback" (Just (-1)),+ F "crush" (Just 0),+ I "coarse" (Just 0),+ F "hcutoff" (Just 0),+ F "hresonance" (Just 0),+ F "bandf" (Just 0),+ F "bandq" (Just 0) ], timestamp = True }@@ -114,6 +120,14 @@ delay = makeF dirt "delay" delaytime = makeF dirt "delaytime" delayfeedback = makeF dirt "delayfeedback"+crush = makeF dirt "crush"++coarse :: Pattern Int -> OscPattern+coarse = makeI dirt "coarse"+hcutoff = makeF dirt "hcutoff"+hresonance = makeF dirt "hresonance"+bandf = makeF dirt "bandf"+bandq = makeF dirt "bandq" cut :: Pattern Int -> OscPattern
Sound/Tidal/Strategies.hs view
@@ -34,6 +34,9 @@ smash n xs p = slowcat $ map (\n -> slow n p') xs where p' = striate n p +smash' n xs p = slowcat $ map (\n -> slow n p') xs+ where p' = chop n p+ -- samples "jvbass [~ latibro] [jvbass [latibro jvbass]]" ((1%2) <~ slow 6 "[1 6 8 7 3]") samples :: Applicative f => f String -> f Int -> f String
doc/tidal.md view
@@ -320,7 +320,11 @@ synthesis parameters you can use: * `accelerate` - a pattern of numbers that speed up (or slow down) samples while they play.+* `bandf` - a pattern of numbers from 0 to 1. Sets the center frequency of the band-pass filter.+* `bandq` - a pattern of numbers from 0 to 1. Sets the q-factor of the band-pass filter. * `begin` - a pattern of numbers from 0 to 1. Skips the beginning of each sample, e.g. `0.25` to cut off the first quarter from each sample.+* `crush` - bit crushing, a pattern of numbers from 1 for drastic reduction in bit-depth to 16 for barely no reduction.+* `coarse` - fake-resampling, a pattern of numbers for lowering the sample rate, i.e. 1 for original 2 for half, 3 for a third and so on. * `cutoff` - a pattern of numbers from 0 to 1. Applies the cutoff frequency of the low-pass filter. * `delay` - a pattern of numbers from 0 to 1. Sets the level of the delay signal. * `delayfeedback` - a pattern of numbers from 0 to 1. Sets the amount of delay feedback.@@ -328,6 +332,8 @@ * `end` - the same as `begin`, but cuts the end off samples, shortening them; e.g. `0.75` to cut off the last quarter of each sample. * `gain` - a pattern of numbers that specify volume. Values less than 1 make the sound quieter. Values greater than 1 make the sound louder.+* `hcutoff` - a pattern of numbers from 0 to 1. Applies the cutoff frequency of the high-pass filter. +* `hresonance` - a pattern of numbers from 0 to 1. Applies the resonance of the high-pass filter. * `pan` - a pattern of numbers between 0 and 1, from left to right (assuming stereo) * `resonance` - a pattern of numbers from 0 to 1. Applies the resonance of the low-pass filter. * `shape` - wave shaping distortion, a pattern of numbers from 0 for no distortion up to 1 for loads of distortion@@ -384,6 +390,29 @@ d1 $ sound (brak "bd sn kurt") ~~~~ ++## chop++~~~~ {.haskell}+chop :: Int -> OscPattern -> OscPattern+~~~~++`chop` granualizes every sample in place as it is played. Use an integer+value to specify how manu granules each sample is chopped into:++~~~~ {.haskell}+d1 $ chop 16 $ sound "arpy arp feel*4 arpy*4"+~~~~++Different values of `chop` can yield very different results, depending+on the samples used:++~~~~ {.haskell}+d1 $ chop 16 $ sound (samples "arpy*8" (run 16))+d1 $ chop 32 $ sound (samples "arpy*8" (run 16))+d1 $ chop 256 $ sound "bd*4 [sn cp] [hh future]*2 [cp feel]"+~~~~+ ## degrade and degradeBy ~~~~ {.haskell}@@ -597,6 +626,32 @@ |+| speed "[1 2 1 1]/2" ~~~~ +## sometimesBy++~~~~ {.haskell}+sometimesBy :: Double -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a+~~~~++Use `sometimesBy` to apply a given function "sometimes". For example, the +following code results in `density 2` being applied about 25% of the time:++~~~~ {.haskell}+d1 $ sometimesBy 0.25 (density 2) $ sound "bd*8"+~~~~++There are some aliases as well:++~~~~ {.haskell}+sometimes = sometimesBy 0.5+often = sometimesBy 0.75+rarely = sometimesBy 0.25+almostNever = sometimesBy 0.1+almostAlways = sometimesBy 0.9+~~~~++++ ## spread ~~~~ {.haskell}@@ -762,6 +817,27 @@ d1 $ whenmod 8 4 (density 2) (sound "bd sn kurt") ~~~~ ++## within++~~~~{.haskell}+within :: Arc -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a+~~~~++Use `within` to apply a function to only a part of a pattern. For example, to+apply `density 2` to only the first half of a pattern:++~~~~{.haskell}+d1 $ within (0, 0.5) (density 2) $ sound "bd*2 sn lt mt hh hh hh hh"+~~~~++Or, to apply `(|+| speed "0.5") to only the last quarter of a pattern:++~~~~{.haskell}+d1 $ within (0.75, 1) (|+| speed "0.5") $ sound "bd*2 sn lt mt hh hh hh hh"+~~~~++ # Combining patterns Because Tidal patterns are defined as something called an "applicative@@ -823,6 +899,22 @@ sound (samples "arpy*8", (run 16)) ] |+| speed "[[1 0.8], [1.5 2]*2]/3" ~~~~++There is a similar function named `seqP` which allows you to define when+a sound within a list starts and ends. The code below contains three+separate patterns in a "stack", but each has different start times +(zero cycles, eight cycles, and sixteen cycles, respectively). All+patterns stop after 128 cycles:++~~~~ {.haskell}+d1 $ seqP [ + (0, 128, sound "bd bd*2"), + (8, 128, sound "hh*2 [sn cp] cp future*4"), + (16, 128, sound (samples "arpy*8", (run 16)))+]+~~~~++ # Juxtapositions
tidal.cabal view
@@ -1,5 +1,5 @@ name: tidal-version: 0.4.13+version: 0.4.14 synopsis: Pattern language for improvised music -- description: homepage: http://yaxu.org/tidal/