Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- spin :: Pattern Int -> ControlPattern -> ControlPattern
- _spin :: Int -> ControlPattern -> ControlPattern
- chop :: Pattern Int -> ControlPattern -> ControlPattern
- chopArc :: Arc -> Int -> [Arc]
- _chop :: Int -> ControlPattern -> ControlPattern
- striate :: Pattern Int -> ControlPattern -> ControlPattern
- _striate :: Int -> ControlPattern -> ControlPattern
- mergePlayRange :: (Double, Double) -> ControlMap -> ControlMap
- striateBy :: Pattern Int -> Pattern Double -> ControlPattern -> ControlPattern
- striate' :: Pattern Int -> Pattern Double -> ControlPattern -> ControlPattern
- _striateBy :: Int -> Double -> ControlPattern -> ControlPattern
- gap :: Pattern Int -> ControlPattern -> ControlPattern
- _gap :: Int -> ControlPattern -> ControlPattern
- weave :: Time -> ControlPattern -> [ControlPattern] -> ControlPattern
- weaveWith :: Time -> Pattern a -> [Pattern a -> Pattern a] -> Pattern a
- weave' :: Time -> Pattern a -> [Pattern a -> Pattern a] -> Pattern a
- interlace :: ControlPattern -> ControlPattern -> ControlPattern
- slice :: Pattern Int -> Pattern Int -> ControlPattern -> ControlPattern
- _slice :: Int -> Int -> ControlPattern -> ControlPattern
- randslice :: Pattern Int -> ControlPattern -> ControlPattern
- loopAt :: Pattern Time -> ControlPattern -> ControlPattern
- hurry :: Pattern Rational -> ControlPattern -> ControlPattern
- smash :: Pattern Int -> [Pattern Time] -> ControlPattern -> Pattern ControlMap
- smash' :: Int -> [Pattern Time] -> ControlPattern -> Pattern ControlMap
- stut :: Pattern Integer -> Pattern Double -> Pattern Rational -> ControlPattern -> ControlPattern
- _stut :: Integer -> Double -> Rational -> ControlPattern -> ControlPattern
- stutWith :: Pattern Int -> Pattern Time -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a
- _stutWith :: (Num n, Ord n) => n -> Time -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a
- stut' :: Pattern Int -> Pattern Time -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a
- sec :: Fractional a => Pattern a -> Pattern a
- msec :: Fractional a => Pattern a -> Pattern a
- _trigger :: Show a => Bool -> a -> Pattern b -> Pattern b
- trigger :: Show a => a -> Pattern b -> Pattern b
- qtrigger :: Show a => a -> Pattern b -> Pattern b
- qt :: Show a => a -> Pattern b -> Pattern b
- reset :: Show a => a -> Pattern b -> Pattern b
- _getP_ :: (Value -> Maybe a) -> Pattern Value -> Pattern a
- _getP :: a -> (Value -> Maybe a) -> Pattern Value -> Pattern a
- _cX :: a -> (Value -> Maybe a) -> String -> Pattern a
- _cX_ :: (Value -> Maybe a) -> String -> Pattern a
- cF :: Double -> String -> Pattern Double
- cF_ :: String -> Pattern Double
- cF0 :: String -> Pattern Double
- cI :: Int -> String -> Pattern Int
- cI_ :: String -> Pattern Int
- cI0 :: String -> Pattern Int
- cB :: Bool -> String -> Pattern Bool
- cB_ :: String -> Pattern Bool
- cB0 :: String -> Pattern Bool
- cR :: Rational -> String -> Pattern Rational
- cR_ :: String -> Pattern Rational
- cR0 :: String -> Pattern Rational
- cT :: Time -> String -> Pattern Time
- cT0 :: String -> Pattern Time
- cT_ :: String -> Pattern Time
- cS :: String -> String -> Pattern String
- cS_ :: String -> Pattern String
- cS0 :: String -> Pattern String
- cP :: (Enumerable a, Parseable a) => String -> Pattern a
- in0 :: Pattern Double
- in1 :: Pattern Double
- in2 :: Pattern Double
- in3 :: Pattern Double
- in4 :: Pattern Double
- in5 :: Pattern Double
- in6 :: Pattern Double
- in7 :: Pattern Double
- in8 :: Pattern Double
- in9 :: Pattern Double
- in10 :: Pattern Double
- in11 :: Pattern Double
- in12 :: Pattern Double
- in13 :: Pattern Double
- in14 :: Pattern Double
- in15 :: Pattern Double
- in16 :: Pattern Double
- in17 :: Pattern Double
- in18 :: Pattern Double
- in19 :: Pattern Double
- in20 :: Pattern Double
- in21 :: Pattern Double
- in22 :: Pattern Double
- in23 :: Pattern Double
- in24 :: Pattern Double
- in25 :: Pattern Double
- in26 :: Pattern Double
- in27 :: Pattern Double
- in28 :: Pattern Double
- in29 :: Pattern Double
- in30 :: Pattern Double
- in31 :: Pattern Double
- in32 :: Pattern Double
- in33 :: Pattern Double
- in34 :: Pattern Double
- in35 :: Pattern Double
- in36 :: Pattern Double
- in37 :: Pattern Double
- in38 :: Pattern Double
- in39 :: Pattern Double
- in40 :: Pattern Double
- in41 :: Pattern Double
- in42 :: Pattern Double
- in43 :: Pattern Double
- in44 :: Pattern Double
- in45 :: Pattern Double
- in46 :: Pattern Double
- in47 :: Pattern Double
- in48 :: Pattern Double
- in49 :: Pattern Double
- in50 :: Pattern Double
- in51 :: Pattern Double
- in52 :: Pattern Double
- in53 :: Pattern Double
- in54 :: Pattern Double
- in55 :: Pattern Double
- in56 :: Pattern Double
- in57 :: Pattern Double
- in58 :: Pattern Double
- in59 :: Pattern Double
- in60 :: Pattern Double
- in61 :: Pattern Double
- in62 :: Pattern Double
- in63 :: Pattern Double
- in64 :: Pattern Double
- in65 :: Pattern Double
- in66 :: Pattern Double
- in67 :: Pattern Double
- in68 :: Pattern Double
- in69 :: Pattern Double
- in70 :: Pattern Double
- in71 :: Pattern Double
- in72 :: Pattern Double
- in73 :: Pattern Double
- in74 :: Pattern Double
- in75 :: Pattern Double
- in76 :: Pattern Double
- in77 :: Pattern Double
- in78 :: Pattern Double
- in79 :: Pattern Double
- in80 :: Pattern Double
- in81 :: Pattern Double
- in82 :: Pattern Double
- in83 :: Pattern Double
- in84 :: Pattern Double
- in85 :: Pattern Double
- in86 :: Pattern Double
- in87 :: Pattern Double
- in88 :: Pattern Double
- in89 :: Pattern Double
- in90 :: Pattern Double
- in91 :: Pattern Double
- in92 :: Pattern Double
- in93 :: Pattern Double
- in94 :: Pattern Double
- in95 :: Pattern Double
- in96 :: Pattern Double
- in97 :: Pattern Double
- in98 :: Pattern Double
- in99 :: Pattern Double
- in100 :: Pattern Double
- in101 :: Pattern Double
- in102 :: Pattern Double
- in103 :: Pattern Double
- in104 :: Pattern Double
- in105 :: Pattern Double
- in106 :: Pattern Double
- in107 :: Pattern Double
- in108 :: Pattern Double
- in109 :: Pattern Double
- in110 :: Pattern Double
- in111 :: Pattern Double
- in112 :: Pattern Double
- in113 :: Pattern Double
- in114 :: Pattern Double
- in115 :: Pattern Double
- in116 :: Pattern Double
- in117 :: Pattern Double
- in118 :: Pattern Double
- in119 :: Pattern Double
- in120 :: Pattern Double
- in121 :: Pattern Double
- in122 :: Pattern Double
- in123 :: Pattern Double
- in124 :: Pattern Double
- in125 :: Pattern Double
- in126 :: Pattern Double
- in127 :: Pattern Double
- splice :: Int -> Pattern Int -> ControlPattern -> Pattern (Map String Value)
Documentation
spin :: Pattern Int -> ControlPattern -> ControlPattern Source #
spin
will "spin" a layer up a pattern the given number of times,
with each successive layer offset in time by an additional `1/n` of a
cycle, and panned by an additional `1/n`. The result is a pattern that
seems to spin around. This function works best on multichannel
systems.
d1 $ slow 3 $ spin 4 $ sound "drum*3 tabla:4 [arpy:2 ~ arpy] [can:2 can:3]"
_spin :: Int -> ControlPattern -> ControlPattern Source #
chop :: Pattern Int -> ControlPattern -> ControlPattern Source #
chop
granualizes every sample in place as it is played, turning a pattern of samples into a pattern of sample parts. Use an integer value to specify how many granules each sample is chopped into:
d1 $ chop 16 $ sound "arpy arp feel*4 arpy*4"
Different values of chop
can yield very different results, depending
on the samples used:
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]"
_chop :: Int -> ControlPattern -> ControlPattern Source #
striate :: Pattern Int -> ControlPattern -> ControlPattern Source #
Striate is a kind of granulator, for example:
d1 $ striate 3 $ sound "ho ho:2 ho:3 hc"
This plays the loop the given number of times, but triggering progressive portions of each sample. So in this case it plays the loop three times, the first time playing the first third of each sample, then the second time playing the second third of each sample, etc.. With the highhat samples in the above example it sounds a bit like reverb, but it isn't really.
You can also use striate with very long samples, to cut it into short chunks and pattern those chunks. This is where things get towards granular synthesis. The following cuts a sample into 128 parts, plays it over 8 cycles and manipulates those parts by reversing and rotating the loops.
d1 $ slow 8 $ striate 128 $ sound "bev"
_striate :: Int -> ControlPattern -> ControlPattern Source #
mergePlayRange :: (Double, Double) -> ControlMap -> ControlMap Source #
striateBy :: Pattern Int -> Pattern Double -> ControlPattern -> ControlPattern Source #
The striateBy
function is a variant of striate
with an extra
parameter, which specifies the length of each part. The striateBy
function still scans across the sample over a single cycle, but if
each bit is longer, it creates a sort of stuttering effect. For
example the following will cut the bev sample into 32 parts, but each
will be 1/16th of a sample long:
d1 $ slow 32 $ striateBy 32 (1/16) $ sound "bev"
Note that striate
uses the begin
and end
parameters
internally. This means that if you're using striate
(or striateBy
)
you probably shouldn't also specify begin
or end
.
striate' :: Pattern Int -> Pattern Double -> ControlPattern -> ControlPattern Source #
_striateBy :: Int -> Double -> ControlPattern -> ControlPattern Source #
gap :: Pattern Int -> ControlPattern -> ControlPattern Source #
_gap :: Int -> ControlPattern -> ControlPattern Source #
weave :: Time -> ControlPattern -> [ControlPattern] -> ControlPattern Source #
weave
applies a function smoothly over an array of different patterns. It uses an OscPattern
to
apply the function at different levels to each pattern, creating a weaving effect.
d1 $ weave 3 (shape $ sine1) [sound "bd [sn drum:2*2] bd*2 [sn drum:1]", sound "arpy*8 ~"]
weaveWith :: Time -> Pattern a -> [Pattern a -> Pattern a] -> Pattern a Source #
weaveWith
is similar in that it blends functions at the same time at different amounts over a pattern:
d1 $ weaveWith 3 (sound "bd [sn drum:2*2] bd*2 [sn drum:1]") [density 2, (# speed "0.5"), chop 16]
interlace :: ControlPattern -> ControlPattern -> ControlPattern Source #
(A function that takes two ControlPatterns, and blends them together into a new ControlPattern. An ControlPattern is basically a pattern of messages to a synthesiser.)
Shifts between the two given patterns, using distortion.
Example:
d1 $ interlace (sound "bd sn kurt") (every 3 rev $ sound "bd sn:2")
slice :: Pattern Int -> Pattern Int -> ControlPattern -> ControlPattern Source #
_slice :: Int -> Int -> ControlPattern -> ControlPattern Source #
randslice :: Pattern Int -> ControlPattern -> ControlPattern Source #
loopAt :: Pattern Time -> ControlPattern -> ControlPattern Source #
loopAt
makes a sample fit the given number of cycles. Internally, it
works by setting the unit
parameter to "c", changing the playback
speed of the sample with the speed
parameter, and setting setting
the density
of the pattern to match.
d1 $ loopAt 4 $ sound "breaks125" d1 $ juxBy 0.6 (|* speed "2") $ slowspread (loopAt) [4,6,2,3] $ chop 12 $ sound "fm:14"
hurry :: Pattern Rational -> ControlPattern -> ControlPattern Source #
smash :: Pattern Int -> [Pattern Time] -> ControlPattern -> Pattern ControlMap Source #
Smash is a combination of spread
and striate
- it cuts the samples
into the given number of bits, and then cuts between playing the loop
at different speeds according to the values in the list.
So this:
d1 $ smash 3 [2,3,4] $ sound "ho ho:2 ho:3 hc"
Is a bit like this:
d1 $ spread (slow) [2,3,4] $ striate 3 $ sound "ho ho:2 ho:3 hc"
This is quite dancehall:
d1 $ (spread' slow "1%4 2 1 3" $ spread (striate) [2,3,4,1] $ sound "sn:2 sid:3 cp sid:4") # speed "[1 2 1 1]/2"
smash' :: Int -> [Pattern Time] -> ControlPattern -> Pattern ControlMap Source #
stut :: Pattern Integer -> Pattern Double -> Pattern Rational -> ControlPattern -> ControlPattern Source #
Stut applies a type of delay to a pattern. It has three parameters, which could be called depth, feedback and time. Depth is an integer and the others floating point. This adds a bit of echo:
d1 $ stut 4 0.5 0.2 $ sound "bd sn"
The above results in 4 echos, each one 50% quieter than the last, with 1/5th of a cycle between them. It is possible to reverse the echo:
d1 $ stut 4 0.5 (-0.2) $ sound "bd sn"
_stut :: Integer -> Double -> Rational -> ControlPattern -> ControlPattern Source #
stutWith :: Pattern Int -> Pattern Time -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a Source #
Instead of just decreasing volume to produce echoes, stut'
allows to apply a function for each step and overlays the result delayed by the given time.
d1 $ stut' 2 (1%3) (# vowel "{a e i o u}%2") $ sound "bd sn"
In this case there are two _overlays_ delayed by 1/3 of a cycle, where each has the vowel
filter applied.
_stutWith :: (Num n, Ord n) => n -> Time -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a Source #
stut' :: Pattern Int -> Pattern Time -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a Source #
The old name for stutWith
sec :: Fractional a => Pattern a -> Pattern a Source #
Turns a pattern of seconds into a pattern of (rational) cycle durations