-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2019-05-19-breakbeat-study-progzoom.tidal
126 lines (97 loc) · 3.4 KB
/
2019-05-19-breakbeat-study-progzoom.tidal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
hush
trigger :: Show a => a -> Pattern b -> Pattern b
trigger k pat = pat {query = q}
where q st = query ((offset st) ~> pat) st
offset st = fromMaybe (pure 0) $ do {pat <- Map.lookup ctrl (controls st);
return $ ((fromMaybe 0 . getR) <$> pat);}
ctrl = "_t_" ++ show k
referenceP :: Show a => a -> Pattern b -> Pattern b
referenceP k pat = pat {query = q}
where q st = query (getOtherPatternEvents st)
getOtherPatternEvents st = fromMaybe (pure []) $ do ret <- Map.lookup ctrl (controls st) $ return ret
ctrl = "_t_" ++ show k
import qualified Data.Map.Strict as Map
import Data.Maybe (listToMaybe, fromMaybe, fromJust, isJust, catMaybes)
:t Map.lookup
hush
d1 $ fix (stutWith 3 (choose [0.3333, 0.666]) (|* gain 0.75).(# n (irand 4))) (s "909") $ s "{909*<3 2>? cp, hh*2}"
d1 $ stack [
(stutWith 3 (choose [0.3333, 0.666]) (|* gain 0.75).(# n (irand 4)))
$ s "909*<3 2>? ~"
,
within (0,0.5) (# speed "-1") $ s "<cp ~>? cp"
,
(stutWith 3 (choose [0.25, 0.333]) (|* gain 0.88))
$ s "hh*2"
-- ,
-- note ("<[7 5] 2>")#s "bass"
-- ,
-- s "gabba"
]
hush
d1 $ s "{{[bd*2, [~ hh] ~] . [sd, hh] [bd, hh] } {[rm sd, ~ hh] [bd, ~ hh] . [sd, ~ hh]}}%2"
hush
patToBool p = pat {query = q}
where q st = query ((offset st) ~> pat) st
offset st = fromMaybe (pure 0) $
let breakp = "{{[bd*2] . sd bd } {[sn:4 sd] bd . sd}}%2" :: Pattern String
in
d2 $ stack [
s breakp
,
struct ( (fmap (== "bd") breakp)) $ s "hh"
]
d2 $ note (scale "hexPhrygian"
$ bmap (== (-2)) (superimpose (((0.125*((12342 ~>) $ irand 3)) ~>).(sometimes (|* "-1")).(|+ ( (4523 ~>) $ irand 3))) )
$ bmap (== 0) (superimpose (((0.125*((234523 ~>) $ irand 8)) ~>).(sometimes (|* "-1")).(|+ ( (324234 ~>) $ irand 3))))
$ "0") # s "chBand01"
bmap cond fx p = condFx (fmap cond p) fx p
boolify cond = fmap cond
:t condFx
hush
setcps (160/120/2)
:t xfade
let pat = "1(<3 5 9 7>,16,<0 2 4>)"
z = tParam2 zoom'
where zoom' s e = zoom (s,e)
in
d1
$ fix (# speed (range 0.99 1.11 $ rand)) (s "909")
$ every 16 (const $ s "909*16" # gain saw)
$ every 4 (bite 16 "{0 5 1}%16")
$ foldEvery [12,8,14] ((linger "<0.75 0.25 0.5>").(|* speed 0.88))
$ foldEvery [3,4,7] (0.25 ~>)
$ whenmod 6 4 rev
$ whenmod 32 16 (ghost.slow 2.bite 8 "{0 2 5 <1 3 5 7>}%4") --next
$ every 8 ( within (0,0.5) ((# gain (fast 2 $ saw)).palindrome. striate "[32@3 [16 8]]*2".(#speed "-0.5").(#comb 440).(#pan ( fast 2 $ isaw))))
$ stack [
rarely ((# speed "-1").slow 3.sometimes ghost)
$ sometimes one $ struct pat
$ s "909 p6" # n "[0 5] 6 6 0 5 6 [0 5] 0" # shape 0.5 # lpf 1000
,
ghost
$ sometimes one
$ every 4 (0.25 ~>)
$ s "<fm02*8? fm02*2?>"
# octave (fast 8 $ choose [3,4]) #note ("<0 2 7 0 -2 -4 2 7>") #cut 2 #gain 1.1
,
whenmod 16 8 (const $ silence)
$ note ("[0,-7,5,14]"+"<0 2 7 0 -2 -4 2 7>")
#s "fm02"
,
sometimes ghost
$ every 3 (sometimes ((stutWith 3 (0.125*3) (|* speed "-0.75").slow 2)))
$ mask ("1(<5 3 2>,16,<8 9>)")
$ struct (foldEvery [2,3,9] inv $ pat) $ s "sn"
# n "<4 [4 5 4]>"
,
ghost
$ mask ("1(<4 8 6 12>,16,<1 3 5 7 9>)")
$ sometimes one $ struct (foldEvery [2,3,5,11] inv $ pat)
$ s "p6" #n "2 2 7 2 2 7 2"
# gain (range 0.88 1 $ saw) # cut 1
] # cps (160/120/2)
-- slow 4 $ note ("<[-12, 0, 5, 9] ~ >") #s "chBand01" #octave 3 --next
--transition to next part
-- d1 $ s "909(<5 6 7 2>,16,<0 2 3>)" #cps 1
hush