forked from frantic0/tidal-workshop
-
Notifications
You must be signed in to change notification settings - Fork 6
/
musichackspace.tidal
359 lines (219 loc) · 7.79 KB
/
musichackspace.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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
Wifi: Somerset Studios (2g or 5g), pass: MadeHere
Worksheet: https://github.com/yaxu/tidal-workshop
and click on musichackspace.tidal
-- repetition
-- symmetry
-- interefence
-- glitch / randomness
d1 $ jux rev $ sound "bd*2 feel:1 sn:2 arpy"
d1 $ jux rev $ weave 16 (n "0 .. 8" # sound "arpy")
[vowel "a e i",
vowel "e o [i e] e",
speed "1 2 1",
vowel "o i u e"
]
d1 $ someCycles (fast 2) $ sound "amencutup*8" # n (irand 16)
-- Play a drum sound
d1 $ sound "drum"
-- Replace that sound with silence
d1 $ silence
hush
-- Pick a different drum sound with :
d1 $ sound "drum:4"
-- (you can find these samples and add to them in your Dirt-Samples
-- folder. In supercollider, File > Open user support directory >
-- downloaded-quarks will get you there)
-- Sequences
d1 $ sound "bd sn:1"
-- Longer sequences. It goes faster! Shows that Tidal has a 'flexible'
-- idea of what a beat is.
d1 $ sound "bd sn:1 ht:4"
d1 $ sound "bd sn:1 ht:4 bd sn"
d1 $ sound "bd sn:1 ht:4 bd sn sn:2 sn:5"
d2 $ sound "bd"
# room 0.9
# size 0.9
# orbit 1 -- separating global effects / channels
d1 $ sound "arpy:2*4"
-- Use ~ for a rest/gap
d1 $ sound "bd sn:1 ~ ~ ~ bd sn:1 bd"
-- Subsequences with []
d1 $ sound "drum:6"
d1 $ sound "bd [sn:1 sn:3] ht:4"
d1 $ sound "bd [sn:1 sn:3] ht:4"
d1 $ slow 0.25 $ sound "[bd sn arpy] [bd sn:2]"
-- Play two sequences at the same time with [,]
d1 $ sound "[bd sn:1 ht:4, arpy arpy:2]"
-- They don't have to be the same length, Tidal works it out for you
d1 $ sound "[bd sn:1 ht:4, arpy arpy:2]"
-- Use {} rather than [] to align the steps rather than the cycles:
d1 $ sound "{bd sn:1 ht:4, arpy arpy:2}"
d1 $ sound "{bd sn:1 ht:4, arpy [arpy:2 arpy:3]}"
d1 $ sound "breaks125*8 breaks125*2"
# legato 1
d1 $ fast 400 $ sound "bd sn"
d2 $ sound "{~ ~ ~, cp}"
-- You can use [] to specify 'subsequences', each will take up the
-- space of a step:
d1 $ sound "[bd sn:5] [ht sn:2 cp]"
-- Chopping into bits
d1 $ sound "co"
d1 $ rev $ chop 32 (sound "co")
-- Chop makes a pattern of bits of sound, that you can transform again
d1 $ loopAt 1 $ jux rev $ chop 8 (sound "arpy arpy:2")
cps 1
-- Compare chop and striate:
d1 $ chop 4 (sound "arpy arpy:1")
d1 $ striate 4 (sound "arpy arpy:1")
d1 $ chop 4 $ sound "arpy:1 arpy:2"
d1 $ striate 4 $ sound "arpy:1 arpy:2"
d1 $ jux (# speed 2) $ striate "<32 64 8 2>" $ sound "alphabet:1"
-- Many function parameters can be given as patterns
d1 $ chop "<4 8 2>" (sound "arpy arpy:1")
d1 $ sound "feel drum ~ feel:2"
d1 $ fast 2 $ sound "feel drum ~ feel:2"
d1 $ fast "2 1.5" $ sound "feel drum ~ feel:2"
d1 $ fast "<2 1.5>" $ sound "feel drum ~ feel:2"
-- Use * to speed up, and / to slow down steps
d1 $ sound "[bd sn]*2 bd*2"
d1 $ sound "bd [alphabet alphabet:1 alphabet:2]/2 sn sn"
d1 $ sound "bd [sn:2 cp]/2"
-- Use <> to play one substep per cycle
d1 $ sound "bd mt*2 bd <arpy:1 arpy:2 arpy:3*2 arpy:4>"
-- You can pattern effects as well
d1 $ sound "bd*8"
# pan "0 1"
d1 $ sound "bd*8"
# room "0 0.6 0.9"
# size "0 0.2 0.9"
d1 $ sound "bd*8"
# vowel "a e i"
d1 $ sound "bd*8"
# speed "1 -1 2 -4"
-- There's quite a lot of effects available
d1 $ slow 2 $ sound "bd*16"
# speed "-1 1 2"
# room 0.4
# size 0.6
# crush 3
# vowel "e i o"
-- careful with filters, high numbers can make very loud noise! Keep
-- your system volume low when experimenting
d1 $ sound "bd*8"
# lpf 2000
# lpq 0.1
-- continuous patterns!
d1 $ fast (toRational <$> (slow 8 $ scale 1 4 sine)) $ sound "bd*32"
# hpf (scale 500 5000 sine)
# hpq 0.2
d1 $ sound "bd*32"
# lpf (slow "4 2" $ scale 500 5000 rand)
# lpq 0.2
d1 $ sound "bd*8"
# lpf (scale 500 5000 tri)
# lpq 0.2
d1 $ sound "bd*8"
# lpf (scale 500 5000 saw)
# lpq 0.2
# pan sine
-- Put the effect in front of the sound if you want it to control the
-- 'structure' of the pattern
d1 $ vowel "x e [i o] u" # sound "bd"
-- For patterns of single numbers, you can miss off the quotes
d1 $ sound "bd bd"
# pan 1
-- Instead of using : to pick a sample, you can use a separate synth
-- parameter called 'n'
d1 $ n "0 [~ 2] 1 2" # sound "arpy"
d1 $ sound "arpy:0 [~ arpy:2] arpy:1 arpy:2" -- easier than this
-- The heart of all live coding rigged demos.. The Amen Break
d1 $ n "0 1 2 3" # sound "amencutup"
-- Shorthand for a run of integers is ..:
d1 $ n "0 .. 3" # sound "amencutup"
d1 $ iter 4 $ slow 2 $ n "0 .. 15" # sound "amencutup"
d1 $ every 4 (slow 2 . (|*| speed (-0.5))) $ jux rev $ iter 4 $ slow 2 $ n "0 .. 15" # sound "amencutup"
-- Wait, what is that iter doing? Shifting the pattern every cycle
d1 $ slow 2 $ n "0 .. 3" # sound "alphabet"
d1 $ slow 2 $ iter 4 $ n "0 .. 3" # sound "alphabet"
1: a b c d
2: b c d a
3: c d a b
4: d a b c
5: a b c d
6: ...
-- And the jux? Runs a function (in this case rev) only in one speaker!
d1 $ slow 4 $ n "0 .. 3" # sound "numbers"
d1 $ slow 4 $ jux rev $ n "0 .. 3" # sound "numbers"
-- Many p
-- Apply a function every x cycles
d1 $ every 4 rev $ n "0 .. 3" # sound "alphabet"
# speed 2
d1 $ every 4 (0.25 <~) $ n "0 .. 3" # sound "alphabet"
# speed 2
-- Different ways of randomising
d1 $ sound "feel ~ feel*2"
# n (irand 8)
d1 $ sound "feel ~ feel:2*2"
# speed (scale 1 4 rand)
# pan rand
d1 $ sound "feel ~ feel? [feel feel:2?]"
d1 $ someCycles (0.25 <~) $ n "0 .. 7" # sound "feel"
d1 $ someCycles (# crush 3) $ n "0 .. 7" # sound "feel"
# speed 2
d1 $ sometimes (# crush 3) $ n "0 .. 7" # sound "feel"
# speed 2
-- With (x,y), evenly distribute x events over y steps
-- ( see https://tidalcycles.org/patterns.html#bjorklund )
d1 $ sound "feel(3,8)"
d1 $ slow 3 $ sound "feel(3,8) feel:2(5,8) [feel(3,8), feel:2(5,8)]"
-- Synthesis! You can use note names instead of numbers
d1 $ slow 4 $ n "f(3,8) e c a" # sound "superpiano"
d1 $ slow 4 $ n "f(3,8) e c a" # sound "superpiano"
# legato 3
-- Arpeggios! Offset a transformation and put it on top of the original
d1 $ slow 4 $ n "f(3,8) e c a" # sound "supermandolin"
# legato 3
d1 $ slow 4 $ n (off 0.25 (+7) $ slow 2 "f(3,8) e c a") # sound "supermandolin"
# legato 3
d1 $ slow 4 $ n (off 0.125 (+12) $
off 0.25 (+7) $
slow 2 "f(3,8) e(3,8,2) c*2 a(3,8)") # sound "supermandolin"
# legato 3
d1 $ jux rev $ slow 4 $ n (off 0.125 (+12) $
off 0.25 (+7) $
slow 2 "f(3,8) a(3,8,2) c*2 e(3,8)") # sound "superzow"
# legato 2
# hpf (slow 4 $ scale 200 2000 sine)
# hpq 0.2
# room 0.6
# size 0.4
|+| n "<0 0 -12 -24>"
# gain 0.6
d1 $ off 0.125 (# (sound "supersaw" # crush 3))
$ jux rev $ slow 4 $ n (off 0.125 (+12) $
off 0.25 (+7) $
slow 2 "f(3,8) a(3,8,2) c*2 e(3,8)") # sound "superzow"
# hpf (slow 4 $ scale 200 2000 sine)
# hpq 0.2
# room 0.6
# size 0.4
|+| n "<0 0 -12 -24>"
# gain 0.6
-- NOTES ON SYNTAX
$ - takes the code on the right, turns it into a pattern (or something), and pass it to the function on the left
-- this *doesn't work*, because 'every' will try to apply 'rev' to
-- 'sound', and get confused.
d1 $ every 3 rev sound "bd sn:1"
-- this will work, because tidal will turn (sound "bd sn:1") into a
-- pattern before giving it to every. This works the same way as
-- parenthesis in arithmetic
d1 $ every 3 rev (sound "bd sn:1")
-- this does the same thing, but using $. Handy because you don't have
-- to keep track of opening and closing brackets.
d1 $ every 3 rev $ sound "bd sn:1"
# - takes a sound or effect pattern on the right, and combines it with the pattern on the left
d1 $ pan "0 1" # sound "bd"
|+| - the same as #, but if the same numerical pattern is on both the right and the left, they get added together
|*| - same as |+|, but instead of adding, values get multiplied
-- long samples
-- maybe type in sample as a name