forked from frantic0/tidal-workshop
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsonada.tidal
365 lines (231 loc) · 8.41 KB
/
sonada.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
stream signup:
https://docs.google.com/spreadsheets/d/1vtqxi98Z4JzO8Csm5omI_y0acJu4QA5E9GXaSduqgpU/edit#gid=0
-- Presentation:
https://docs.google.com/presentation/d/1Emu5NB_0gUaQhk317B5MkgsfBLgTI_mDvJNRJ8aiaeU/edit?usp=sharing
-- Some extra samples:
https://github.com/yaxu/spicule/tree/master/extra-samples
d1 $ sound "bd sn:2 [~ bd] sn:3"
d2 $ up "0 [~ 7] 5 2" # sound "arpy" # lpf 3000 # lpq 0.1
d2 $ up "<[0 [~ 7] 5 2] ~>" # sound "arpy" # lpf 3000 # lpq 0.1
d2 $ every 2 (const silence) $ up "0 [~ 7] 5 2" # sound "arpy" # lpf 3000 # lpq 0.1
d1 $ every 8 (0.25 <~) $ loopAt 2 $ chop 8 $ sound "arc"
d1 $ sound "{bd sn:2 mt lt, feel feel:2 feel:3}"
d1 $ n "0 .. 7" # sound "arpy"
d1 $ sound "arpy:2"
d1 $ weave 16 (n "0 .. 7" # sound "arpy")
[vowel "a e i",
vowel "e i u i",
speed "2 1 0.5"
]
-- glitch
d1 $ degrade $ n "0 .. 3" # sound "arpy"
d1 $ sometimes (fast 2) $ n "0 .. 3" # sound "arpy"
d2 $ sound "gabba(3,8)"
d1 $ up "{0 7 12 2, -12 -24*2}" # sound "arpy"
d2 $ sound "gabba" # speed (-2)
d1 $ speed "1 2 3 4" # sound "drum"
d1 $ iter 4 $ fast "2 [4 16] 3 8" $ sound "drum drum:2"
d1 $ sound "bd feel:2? bd? bd?"
d1 $ fast 4 $ sound "feel feel:3" # speed (scale 1 2 rand)
d1 $ sound "drum*8" # n (irand 16)
d1 $ randcat [sound "bd sn",
sound "arpy",
chop 8 $ sound "arc"
]
d1 $ sometimes (# speed 2) $ sound "bd(3,8)"
d1 $ someCycles (fast 2) $ sound "bd(3,8)"
d1 $ sound "arpy*4"
# speed (fast 2 rand)
# crush (scale 5 8 rand)
d1 $ loopAt 2 $ chop 16 $ sound "arc"
d1 $ loopAt 2 $ rev $ chop 8 $ sound "arc"
d1 $ (chop 128 $ sound "bd cp sn:2 bd*2")
# nudge (slow 4 sine)
d1 $ iter 4 $ loopAt 16 $ chop 64 $ sound "bev"
# gain 1.1
d2 silence
hush
cps 0.9
d1 $ n (off 0.125 (+12) $ off 0.25 (+7) "<c(3,8) a(3,8) g*2 e(3,8)>" )
# sound "supermandolin"
# legato 8
d1 $ n "0" # sound "supermandolin"
# legato 4
d1 $ someCycles (hurry 0.5)
$ jux rev $ iter 4 $ loopAt 1 $ chop 8 $ sound "breaks125"
d1 $ sound "bd*4"
d1 silence
-- swing
d2 $ sound "[hh*8, micron micron:4]"
# gain 1.1
# nudge "[0 0.04]*4"
hu
d1 $ sound "superpiano"
d1 $ n "0 .. 8" # sound "amencutup"
d1 $ up ("0 5 7 12" + "<0 12>") # sound "arpy"
d1 $ up (every 2 (+7) $ "0 5 7 12") # sound "arpy"
d1 $ jux rev $ up (off 0.25 (subtract 12) $
off 0.125 (+7) $ "<0(3,8) 5(3,8) 7*2 12(3,8)>") # sound "arpy"
d1 $ sound "drum(5,8)"
0 5 7 12
7 12 14 19
d1 silence
d2 silence
-- Potential topics
-- pitching up samples
-- Syntax - $ and #, etc
-- Sequencing (polymeter, euclidean rhythms, ..)
-- Effects
-- Granulation (chop, striate, gap etc)
-- Chords and scales
-- Transforming pattern (iter, off, rev, weave, fast/slow, ..)
-- Higher order transformation (every, jux, chunk, ...)
-- Randomisation
-- Superdirt
-- adding samples
-- recording
-- orbits
-- hacks
-- midinote ?
-- History of tidal / algorave etc
-- How to make an algorave
-- Find this file (sonada.tidal)
https://github.com/yaxu/tidal-workshop
-- Keep it open in your web-browser, it'll update!
-- Sequencing
d1 $ sound "bd [sd bd] cp sd"
d1 $ slow 4 $ sound "numbers:0 {arpy:4 arpy:5, bd sn:2 cp} numbers:4"
d1 (sound "speakspell speakspell:3"
# vowel "a e")
hush
d1 $ silence
-- The longer the sequence, the faster it runs
d1 $ sound "bd sd cp sd cp cp"
-- Euclidean rhythms
(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:
-- Playing long samples
-- legato
-- loopAt
-- Granular Synthesis
-- every
-- off
-- sometimes
-- hurry
-- vis
-- installing tidal-vis on a mac:
-- make sure you have homebrew https://brew.sh/
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
./run-client.py --mode tidalcycles
192.168.1.70
24BCA04721
d1 $ chunk 4 (fast 2) $ n "0(3,8,<0 2>)" # sound "osd1"
# size (slow 8 saw)
# room (slow 8 saw)
# legato 1
# lpf (slow 4 $ scale 1000 2000 sine)
# lpq 0.2
# orbit 1
# speed (scale 1 2 saw)
d3 $ chunk 4 (hurry 2) $ iter 4 $ loopAt 2 $ chop 8 $ sound "arc"
# gain 1.3
d2 $ jux (fast 2) $ iter 4 $ n "0 .. 3" # sound "micron"
# lpf 3000
# lpq 0.2
hush