forked from frantic0/tidal-workshop
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmusichackspace2.tidal
523 lines (342 loc) · 13.5 KB
/
musichackspace2.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
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
https://docs.google.com/presentation/d/1Emu5NB_0gUaQhk317B5MkgsfBLgTI_mDvJNRJ8aiaeU/edit?usp=sharing
https://github.com/yaxu/spicule/tree/master/extra-samples
-- Potential topics
-- Syntax - $ and #, etc
-- Sequencing (polymeter, euclidean rhythms, ..)
-- stack
-- Effects
-- Granulation (chop, striate, gap etc)
-- Chords and scales <- dev version of tidal
-- Transforming pattern (iter, off, rev, weave, fast/slow, ..)
-- Higher order transformation (every, jux)
-- Randomisation
-- Superdirt hacks
-- orbit
-- History of tidal / algorave etc
-- How to make an algorave
-- Find this file (musichackspace2.tidal)
https://github.com/yaxu/tidal-workshop
-- install the development version of tidal
cabal install https://hackage.haskell.org/package/tidal-0.9.5/candidate/tidal-0.9.5.tar.gz
-- if you use midi you'll probably need to update that too
cabal install https://hackage.haskell.org/package/tidal-midi-0.9.4/candidate/tidal-midi-0.9.4.tar.gz
-- Sequencing
d1 $ sound "bd sd cp sd"
-- Silencing
d1 $ silence
hush
-- The longer the sequence, the faster it runs
d1 $ sound "bd(7,16)"
d1 $ sound "bd ~ ~ bd ~ bd ~ ~"
d1 $ sound "bd*3 bd bd*8 bd"
d1 $ sound "bd bd? sd*2 bd(3,8)"
-- Euclidean rhythms
d1 $ sound "[bd sn, arpy arpy:3 arpy:5]"
d1 $ sound "bd(5,9)"
d2 $ sound "cp(3,4)"
d1 $ sound "bd sn:2"
# vowel "a"
d2 $ vowel "a i u" # sound "feel"
d3 $ off 0.25 (|-| n 12) $ jux rev $
n (off 0.25 (+12) $ off 0.125 (+7)
"<c(3,8) <e5 g6>(3,8) f*2 g5(3,8)>")
# sound "superpiano"
d4 $ iter 4 $ loopAt 4 $ chop 8 $ sound "paper"
# gain 1.1
d1 $ every 3 (0.25 <~) $ rev $ loopAt 2 $ chop 8 $ sound "arc"
# gain 1.3
d1 $ struct "x ~ x [~ x]" $ (loopAt 2 $ chop 16 $ sound "arc")
# vowel "a e i"
d1 $ struct "x ~ x x*2" $ sound "bd"
d1 $ sound "arc"
# begin "0.75"
# end "0.8"
d1 $ rev $ loopAt "<16 8>" $ chop "32 64" $ sound "bev"
d1 $ sound "arpy" # speed "-1"
d2 $ sound "gabba(3,8)"
# speed 2
hush
x - x - - x - -
d1 $ slow 2 $ sound "bd(5,12)"
(2,5) : A thirteenth century Persian rhythm called Khafif-e-ramal.
(3,4) : The archetypal pattern of the Cumbia from Colombia, as well as a Calypso rhythm from Trinidad.
(3,5,2) : Another thirteenth century Persian rhythm by the name of Khafif-e-ramal, as well as a Rumanian folk-dance rhythm.
(3,7) : A Ruchenitza rhythm used in a Bulgarian folk-dance.
(3,8) : The Cuban tresillo pattern.
(4,7) : Another Ruchenitza Bulgarian folk-dance rhythm.
(4,9) : The Aksak rhythm of Turkey.
(4,11) : The metric pattern used by Frank Zappa in his piece titled Outside Now.
(5,6) : Yields the York-Samai pattern, a popular Arab rhythm.
(5,7) : The Nawakhat pattern, another popular Arab rhythm.
(5,8) : The Cuban cinquillo pattern.
(5,9) : A popular Arab rhythm called Agsag-Samai.
(5,11) : The metric pattern used by Moussorgsky in Pictures at an Exhibition.
(5,12) : The Venda clapping pattern of a South African children’s song.
(5,16) : The Bossa-Nova rhythm necklace of Brazil.
(7,8) : A typical rhythm played on the Bendir (frame drum).
(7,12) : A common West African bell pattern.
(7,16,14) : A Samba rhythm necklace from Brazil.
(9,16) : A rhythm necklace used in the Central African Republic.
(11,24,14) : A rhythm necklace of the Aka Pygmies of Central Africa.
(13,24,5) : Another rhythm necklace of the Aka Pygmies of the upper Sangha.
-- Add gaps
d1 $ sound "bd ~ hh bd sd ~ hh bd"
-- Pick from a sampleset
d1 $ sound "arpy arpy:4 arpy:5"
-- Where do these sounds come from?
-- In the menus in SuperCollider (not atom):
-- - File > Open user support directory > downloaded-quarks > Dirt-Samples
-- How do I add more sounds? Here's some..
http://slab.org/tmp/extra-samples.zip
-- Change the superdirt startup, instructions here:
https://github.com/musikinformatik/SuperDirt
-- Composing effects
d1 $ sound "bd sd cp sd"
# vowel "a e"
-- All the effects:
https://tidalcycles.org/functions.html#synth_parameters
-- Types
:t (+)
:t slow
:t fast
:t sound
:t (#)
:t ($)
-- Lets look at slow
slow :: Pattern Time -> Pattern a -> Pattern a
-- Slow takes a pattern of time, a pattern (of something) and results in a pattern (of that something)
d1 $ slow 2 (sound "arpy arpy:2")
-- We have to wrap that last pattern in brackets so that it gets passed as the second parameter of `slow`.
-- Instead we can do this:
d1 $ slow 2 $ sound "arpy arpy:2"
-- The $ means 'pass everything on the right, to the function on the
-- left'. It saves having to remember to put the closing bracket in.
-- `d1` is a function as well, which takes exactly one pattern, which
-- it sends to the synthesiser. We could do this instead:
d1 (slow 2 (sound "arpy arpy:2"))
-- .. but we'd quickly end up with a lot of closing brackets to keep
-- track of.
-- Earlier we noticed that the first parameter was a *pattern* of
-- time. This means we can pattern it:
d1 $ slow "2 0.5" $ sound "arpy arpy:2"
-- There are a lot of patterns in the above! Lets look at the bits.
-- This is a pattern of words (also known as 'strings'):
"arpy arpy:2"
-- This is a pattern of names of sounds:
sound "arpy arpy:2"
-- This is a pattern of whole numbers (also known as 'integers'):
"2 4"
-- This isn't actually a pattern, but a function that takes a pattern as input, and returns a slowed down pattern
slow "2 4"
-- This isn't a pattern either, but a strange little function that
-- takes everything on the right and gives it to the function on the
-- left:
$
-- But it together and you get a pattern again, a pattern of sounds
slow "2 4" $ sound "arpy arpy:2"
-- This is also a function, that takes a pattern as input and starts
-- sending it off to the synthesiser to be turned into sound.
d1
-- There's another one of these dollars to take everything on the right and pass it to d1
$
-- And the whole thing, which is an action to change what is being sent to the synthesiser
d1 $ slow "2 4" $ sound "arpy arpy:2"
-- Functions like "slow" will work on any pattern. We could have
-- slowed down the pattern of words rather than the pattern of sounds:
d2 $ off 0.25 (# speed 2) $ sound (slow "2 4" "arpy(3,8) arpy:2")
# crush 3
d1 $ off 0.25 (# crush 3) $
-- Playing long samples
-- legato
-- loopAt
-- Granular Synthesis
-- every
-- off
-- sometimes
-- hurry
-- vis
brew install cairo
brew install pkg-config
git clone https://github.com/tidalcycles/tidal-vis.git
cd tidal-vis
cabal install
import Sound.Tidal.Vis
import Sound.Tidal.VisCycle
import qualified Graphics.Rendering.Cairo as C
let vis name pat = vLines (C.withSVGSurface) (name ++ ".svg") (600,50) pat 1 1
vis "test" $ "red blue green orange"
visCycle "testcycle" "" "red blue green orange"
-- Superdirt
https://github.com/musikinformatik/SuperDirt
https://github.com/musikinformatik/SuperDirt/tree/master/hacks
-- Global effects + orbits
-- Normally if you set a global effect like reverb on one pattern,
-- it'll mess up other patterns.. Unless you put them in different
-- 'orbits'
d1 $ sound "bd"
# room 0.9
# size 0.9
# orbit 1
-- quadrophonic, five orbits
(
// configure the sound server: here you could add hardware specific options
// see http://doc.sccode.org/Classes/ServerOptions.html
s.options.numBuffers = 1024 * 16; // increase this if you need to load more samples
s.options.memSize = 8192 * 16; // increase this if you get "alloc failed" messages
s.options.maxNodes = 1024 * 32; // increase this if you are getting drop outs and the message "too many nodes"
s.options.numOutputBusChannels = 4; // set this to your hardware output channel size, if necessary
s.options.numInputBusChannels = 2; // set this to your hardware input channel size, if necessary
// boot the server and start SuperDirt
s.waitForBoot {
~dirt = SuperDirt(4, s); // two output channels, increase if you want to pan across more channels
~dirt.loadSoundFiles; // load samples (path containing a wildcard can be passed in)
~dirt.loadSoundFiles("/home/alex/extra-samples/*");
s.sync; // wait for samples to be read
~dirt.start(57120, [0, 0, 0, 0, 0]); // start listening on port 57120, create two orbits, each sending audio to channel 0. You can direct sounds to the orbits from tidal e.g. by: `# orbit "0 1 1"
}
)
-- eight stereo channels, going to eight tracks on a DAW (via soundflower or something)
(
// configure the sound server: here you could add hardware specific options
// see http://doc.sccode.org/Classes/ServerOptions.html
s.options.numBuffers = 1024 * 16; // increase this if you need to load more samples
s.options.memSize = 8192 * 16; // increase this if you get "alloc failed" messages
s.options.maxNodes = 1024 * 32; // increase this if you are getting drop outs and the message "too many nodes"
s.options.numOutputBusChannels = 16; // set this to your hardware output channel size, if necessary
s.options.numInputBusChannels = 2; // set this to your hardware input channel size, if necessary
// boot the server and start SuperDirt
s.waitForBoot {
~dirt = SuperDirt(2, s); // two output channels, increase if you want to pan across more channels
~dirt.loadSoundFiles; // load samples (path containing a wildcard can be passed in)
~dirt.loadSoundFiles("/home/alex/extra-samples/*");
s.sync; // wait for samples to be read
~dirt.start(57120, [0, 2, 4, 6, 8, 10, 12, 14]); // start listening on port 57120, create two orbits, each sending audio to channel 0. You can direct sounds to the orbits from tidal e.g. by: `# orbit "0 1 1"
}
)
-- stereo, six orbits
(
// configure the sound server: here you could add hardware specific options
// see http://doc.sccode.org/Classes/ServerOptions.html
s.options.numBuffers = 1024 * 16; // increase this if you need to load more samples
s.options.memSize = 8192 * 16; // increase this if you get "alloc failed" messages
s.options.maxNodes = 1024 * 32; // increase this if you are getting drop outs and the message "too many nodes"
s.options.numOutputBusChannels = 2; // set this to your hardware output channel size, if necessary
s.options.numInputBusChannels = 2; // set this to your hardware input channel size, if necessary
// boot the server and start SuperDirt
s.waitForBoot {
~dirt = SuperDirt(2, s); // two output channels, increase if you want to pan across more channels
~dirt.loadSoundFiles; // load samples (path containing a wildcard can be passed in)
~dirt.loadSoundFiles("/home/alex/extra-samples/*");
s.sync; // wait for samples to be read
~dirt.start(57120, [0,0,0,0,0,0]); // start listening on port 57120, create two orbits, each sending audio to channel 0. You can direct sounds to the orbits from tidal e.g. by: `# orbit "0 1 1"
}
)
-- install TidaLink
mkdir src
cd src
git clone https://github.com/tidalcycles/TidaLink.git
cd TidaLink
-- You might need to do:
brew install cmake
/bin/bash compile.sh
-- to run TidaLink
cd build
./TidaLink
d1 $ fast 2 $ whenmod 8 6 (fast 4) $ sound "odx"
# pan 0.25
d2 $ slow 2 $ sound "blue"
# pan 0.25
d1 $ every 4 (fast 4) $ sound "bd sn"
every :: Pattern Int -> (Pattern a -> Pattern a)
-> Pattern a -> Pattern a
d1 $ every 4 rev (sound "bd sn:2 ht:4 ht:5*2")
d1 $ jux rev $ sound "bd sn:2 ht:4 ht:5*2"
rev :: Pattern a -> Pattern a
hush
(10 + 4) * 2
d1 $ every 4 (fast 2) $ n (every 4 (+24) "{0 5 7 12, 0 12 [2 5]}")
# sound "superpiano"
# vowel "<a i e>"
d1 $ n "0 7 12 7"
# sound "superpiano"
d2 $ sound "superpiano supermandolin superpiano superzow"
# n "c af6"
d1 $ n ("c7 a7 f6*2 e7" + 7) # sound "rash"
d1 $ sound "sd(3,8)"
# room 0.9
# size 0.9
# orbit 1
d2 $ n "0 .. 7" # sound "sn:3"
# delay 0.9
# delaytime (0.06)
# delayfb 0.9
# orbit 0
# room 0
d1 $ sound "bd*8"
# pan saw
d1 $ iter 4 $ n "0 .. 7" # sound "arpy"
d1 $ iter' 4 $ loopAt 4 $ chop 16 $ sound "paper"
d1 $ n "f a c e" # sound "supermandolin"
# shape 0.3
d1 $ sound "bd sn"
hush
d1 $ sound "bd sn"
let thingie = sound "bd sn(3,8)"
foo = vowel "e"
in
d1 $ thingie # shape 0.4 # foo
d1 $ n "f a c e" # sound "supermandolin"
# shape 0.3
d1 $ every 2 (crush "2 4 6" #) $ sound "bd sn"
d2 $ every 2 (fast 4) $ sound "bd sn"
d1 $ n ("c" + chord "<major>") # sound "superpiano"
d1 $ jux rev $ n (off 0.25 (+ chord "minor") $ "<c a f e>(3,8)")
# sound "supermandolin"
# legato 4
d2 $ n (iter 4 $ scaleP "majPent" "0 .. 7")
# sound "superpiano"
# gain 0.8
d1 $ jux rev $ (chop 128 $ n "0 ~ [~ 5] 3" # sound "drum")
# nudge (slow 4 sine)
d2 $ degradeBy 0.8 $ chunk 4 (hurry 2) $ off 0.25 (# (crush 3 # speed 4)) $ up "~ 7 ~ 0*2" # sound "jvbass"
# lpf (scale 1000 4000 rand)
# lpq (slow 4 $ scale 0.2 0.3 sine)
d3 $ degrade $ iter 4 $ jux (rev . (# speed 4)) $ n "0 6 [~ 5] 4"
# sound "feel"
|*| speed 2
d4 $ degrade $ jux rev $ foldEvery [4,5] (0.25 <~) $ n "0 .. 7" # sound "funky"
# shape 0.3
# speed 4
d1 $ n ("c a" + chord "major major") # sound "superpiano"
d1 $ slow 1 $ n (off 0.25 (+ chord "major major major minor")
"<0(3,8) 3(3,8) 5(3,8,2) 4(3,8)>")
# sound "superpiano"
# legato 2
d2 $ n (scaleP "majPent" "0 .. 7") # sound "superpiano"
d2 $ jux rev $
weave 16 (n (scaleP "majPent" "0 .. 7") # sound "superpiano")
[vowel "a e i",
vowel "o ~ [u e] e",
crush "12 4",
crush "12 [4 2]"
]
d1 $ weave 16 (pan saw)
[sound "bd(3,8)",
sound "cp(5,8)",
sound "arpy*2",
sound "~ kurt"
]
d2 $ n ("0 .. 7") # sound "superpiano"
http://10.2.34.60:8000/index16.html
t1 (xfadeIn 8) $ sound "arpy:4(3,8)"
t1 (histpan 4) $ sound "kurt:6*3"
d1 $ randcat [sound "bd(3,8)]" # vowel "a",
sound "can(5,8)"
] # speed "4"
d3 $ sound "cp"
do d1 $ sound "bd"
d2 $ sound "can"
d3 silence
nudger 0.1
d1 $ slow 1 $ n "0*8" # sound "superpiano"
# legato "0.125 0.5"