forked from frantic0/tidal-workshop
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtokyo.tidal
184 lines (117 loc) · 4.55 KB
/
tokyo.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
-- Hello!
d1 $ sound "drum"
d2 $ sound "cp"
d1 silence
-- ~ is a rest
d1 $ sound "bd bd hh ~ sn ~ hh bd"
d1 $ sound "bd sn:2"
-- ? = play randomly
d1 $ sound "bd sn:2? bd cp?"
d1 $ sound "bd [sn:2 cp]"
d1 $ sound "bd*2 sn:2"
d1 $ sound "[bd arpy] [sn:2 [bd bd [bd bd bd bd bd bd] cp] arpy]"
d1 $ sound "[bd sn:2, arpy arpy:2 arpy:4]"
d1 $ sound "{bd sn:2, arpy arpy:2 arpy:4}"
hush
-- on the raspberry pis it's different!
-- no d1
d1 $ sound "drum:0 drum:1 drum:2"
-- run all patterns with alt-enter
-- start/stop individual patterns with alt-1, alt-2, etc
-- stop all with alt-h
-- My slides
-- https://docs.google.com/presentation/d/1Emu5NB_0gUaQhk317B5MkgsfBLgTI_mDvJNRJ8aiaeU/edit#slide=id.g24d24bd416_0_37
Advanced examples:
-- pattern parameters
d3 $ fast "<1 0.5>" $ sound "cp sn:2" # speed 1.5 # crush 3
-- compress different patterns into different parts of cycle
-- compress into the first half - from the start (0) to halfway (1/2):
d1 $ compress (0,1/2) $ sound "bd*8"
-- compress into the last quarter
d2 $ compress (3/4,1) $ sound "bd*8"
d2 $ compress (0,1/3) $ iter 4 $ n "0 .. 3" # sound "sn:3" # legato 1 # speed 1
d3 $ compress (1/3,1) $ fast "<1 0.5>" $ sound "cp:4(3,8) cp:2*2" # speed 1.5 # crush 3
-- repeat random values
d4 $ repeatCycles 4 $ struct "x*8?" $ sound "kicklinn"
-- scan!
d1 $ jux (rev . (0.25 <~)) $ n (scan 8) # sound "sn" # speed 2
-- fit
d1 $ n (fit 3 [0,2,7,24] "0 [1 0] [~ 3] 1" )
# s "supermandolin" # legato 2 |-| n 12
# lpf (sine * 5000 + 800)
# lpq 0.2
-- fit has three parameters
-- a number - how far to move through the list per cycle
-- a list of values
-- a pattern of numbers
d1 $ n (fit 3 [0,1,2,3,4,5] "0 [1 3]") # sound "drum"
d2 $ n (fit 3 [0,3,4,5,6] "0 ~ 2 3") # sound "arpy"
d1 $ jux ((|+ n 12) . rev) $ off 0.25 ((# s "superpiano") . arpg . struct "x(3,8)")
$ n (off (1/16) (+12) $ off 0.125 (+7) $ fit 3 [0,5,7,24] "0 [1 0] [~ 3] 1" )
# s "supermandolin" # legato 1 |- n 12
d1 $ degrade $ off 0.25 ((|+ n 24) .(# (s "supermandolin" # gain 0.9 # legato 0.5))) $ jux rev $ n (off 0.125 (+12) $ off 0.25 (+7) $ palindrome $ fit 3 [0,2,7,12] "0 [~ 1] 1 [~ 3]") # s "supermandolin"
# lpf (sine * 3000 + 3000)
# lpq 0.2
# legato 2
|*| speed 1.5
d2 $ iter 4 $ jux rev $ sound "kicklinn(3,8,<0 2 4 2>)" # speed 2
# gain 1.2
# room 0.1 # sz 0.9 # orbit 1
d3 $ jux rev $ loopAt 2 $ slice "0 <3 4*4> 2 4*8 5 2*4 4 7*2" 8 $ sound "arc" # gain 1.3
# legato 1
d4 $ jux rev $ n (off 0.25 (+12) $ off 0.125 (+7) $ "<c(3,8) e*2 f(3,8,2) g(3,8,4)>") # sound "rash" |+ n "36"
# cps ("0.8")
# lpf (slow 4 $ scale 3000 500 sine)
# lpq 0.1
-- slice
d1 $ loopAt 2 $ slice ("[0 1?] <2*3 3*2> <4*2> 7") 8 $ sound "arc"
# legato 1
-- cps fun
-- linger
d1 $ every 4 (linger (1/2)) $ iter 4 $ n "0 .. 7" # sound "sn"
# legato 1
# speed 1
-- off
-- ply
d1 $ every 4 (ply 2) $ slow 2 $ n "0 .. 7" # sound "drum"
# legato 1
# speed 0.5
-- ply repeats each event
d1 $ 2 $ sound "bd ~ sn:2" # speed 2
d1 $ ply "<2 3 4>" $ sound "bd ~ sn:2" # speed 2
d1 $ every 2 (ply "<2 3 4>") $ sound "bd ~ sn:2" # speed 2
-- sew
-- sew takes a pattern of true/false values, and two sound patterns, e.g.:
d1 $ sew "t f" (sound "bd*8") (sound "cp*8")
-- t == take events from the first pattern
-- f == take events from the second pattern
d1 $ sew "t f" (sound "bd*8") (sound "cp*8" # speed (slow 4 $ sine + 1))
d1 $ sew (slow 2 "[t f] f")
(sound "bd*8")
(sound "cp*8" # speed (slow 4 $ sine + 1))
d1 $ iter 4 $ sew (iter 4 "[t f] <f [t f]>")
(sound "bd:4*8")
(sound "snare:4(3,8)" # speed 1.5)
-- spaceOut
d1 $ spaceOut [1,2,0.5] $ sound "bd*2 hc:3"
-- stripe
d1 $ jux rev $ superimpose (stripe 2) $ sound "bd mt lt ~" # speed 2
-- superimpose
d1 $ someCycles (jux rev . (# speed 2))
$ every 2 (superimpose (hurry 4 . rev)) $ sound "bd [sn:2 cp:4]"
-- within
-- applies a function within part of each cycl
d1 $ within (0,0.5) (# crush 4) $ sound "bd*4"
d1 $ within (0,0.5) (hurry 2) $ sound "bd sd:2 cp sn:3"
-- .
-- . is useful for joining together multiple functions:
d1 $ every 2 (fast 2 . rev) $ sound "bd sn:2"
-- superimpose is like jux but without panning
d1 $ within (0,0.5) (# crush 4) $ someCycles (jux rev . (# speed 2))
$ every 2 (superimpose (hurry 4 . rev)) $ sound "bd [sn:2 cp:4]"
d1 $ slow 2 $ n "0 1 " # sound "numbers" # pan "0 1"
d1 $ smash 4 [1,2] $ within (0,0.5) (# crush 4) $ someCycles (jux rev . (# speed 2))
$ every 2 (superimpose (hurry 4 . rev)) $ sound "bd [sn:2 cp:4]"
-- stut
d1 $ jux rev $ iter 4 $ stut 16 0.5 (toRational <$> sine * 0.4 + 0.04) $ sound "bd cp:4 bd(3,8) cp:4"
# legato 1