forked from kindohm/vscode-tidalcycles
-
Notifications
You must be signed in to change notification settings - Fork 11
/
commands.yaml
679 lines (657 loc) · 25.2 KB
/
commands.yaml
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
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
slow:
cmd:
- slow times cpattern
- fast times cpattern
help: |-
Slows down or speeds up a pattern. This effectively changes the number of cycles it takes
for the pattern to repeat.
params:
times: The amount to slow down or speed up the pattern by. Can be a pattern
itself.
returns: A slowed down version of the pattern
links:
- url: https://tidalcycles.org/index.php/slow
title: Slow - Tidal Documentation
- url: https://tidalcycles.org/index.php/fast
title: Fast - Tidal Documentation
examples:
- 'd1 $ slow 4 $ s "hh!32"'
- 'd1 $ fast 4 $ s "hh!2"'
- 'd1 $ s "hh!8" # speed (slow 2 $ range 0.5 (3/2) square)'
- 'd1 $ s "hh!8" # speed (fast 2 $ range (1/2) 1.5 square)'
fast:
alias: slow
stut:
cmd: stut repeat decay time cpattern
help: |-
Similar to a delay, this causes `repeat` versions of the pattern to play
with an offset of `time` each. Every time the pattern is repeated, the gain
is multiplied with the `decay` values.
params:
repeat: An integer pattern that defines the number of times to repeat the
control pattern.
decay: |-
A fractional pattern that defines amount to multiply the gain by on each
repeat. Values `< 1` will make the repeats more silent each time, values
`> 1` will make their volume increase with every repeat.
time: A fractional that defines the delay between the repeated patterns.
examples:
- 'd1 $ slow 2 $ stut 3 0.6 (1/12) $ s "sd!4"'
- 'd1 $ every 2 (stut 3 1.3 (1/16)) $ s "sd!4"'
- 'd1 $ slow 2 $ stut "<3 6>" "<1.2 0.6>" (1/16) $ s "sd!4"'
setcps:
cmd: setcps numcycles
help: Set the cycles per second that Tidal should evaluate.
params:
numcycles: The number of cycles per second. One cycle is usually interpreted as one bar.
examples:
- |+
setcps (120/60/4)
d1 $ s "bd!4"
- |+
setcps (165/60/4)
d1 $ s "bd!4"
links:
- https://tidalcycles.org/index.php/Tutorial
sound:
cmd:
- sound cpattern
- s cpattern
help: |-
Define a sound pattern. The command can be abbreviated as `s`. The pattern
for sounds is `soundname:number`. If `:number` is omitted a default of `0`
is assumed if this pattern is the structure generating pattern.
The sound can be either a sample or a SuperCollider synthesizer name. If
it's a sample then `soundname` specifies the folder the sample is located
in and `number` is the, alphabetically ordered, position of the sample in
that folder. If `soundname` is a synthesizer then `number` is the note
number.
Structure can either come form the pattern itself or for example from a
separate `note` instruction, which, depending on the position, can also
override the `number` parameter.
examples:
- 'd1 $ sound "bd"'
- 'd1 $ s "bd:18*2 sd:1 bd:10 sd"'
- 'd1 $ note "18*2 1 10 [0 0]" # s "bd sd bd sd" -- note the slightly different ending'
links:
- https://tidalcycles.org/index.php/sound
s:
alias: sound
n:
cmd: note cpattern
help: |-
Sets the `n` value in a pattern. If you're using the pattern with a sample
the `n` value selects the sample in the folder. If you're using the pattern
with a synth sound n
**Note**: `n` is not an abbreviation for `note`. They both change different
parameters of the control patterns.
examples:
- 'd1 $ n "1 2 3 4" # sound "numbers" # speed 1.5'
- 'd1 $ n "0 1 0 3" # sound "bd sn bd sn"'
- 'd1 $ n "0 1 2 3" # sound "supersaw"'
- 'd1 $ sound "alphabet!4 ~!2" # n "0 2 3 2 ~!" # cut 1'
note:
cmd:
- note cpattern
- up cpattern
help: |-
Set the note pitch. For samples this changes the playback speed.
You can set the note pitch in the pattern by either using numbers or note
names, where `0` and `c5` are the original sample pitch. See the
description in the [Tutorial](https://tidalcycles.org/index.php/Tutorial)
for more information.
examples:
- 'd1 $ note "0 1 2 <3 -12>" # sound "hh:9"'
- 'd1 $ up "0 1 2 <3 -12>" # sound "hh:9"'
- 'd1 $ note "0 c5 f5 [c5 ds5 f4]" # sound "hh:9"'
- |-
d1 $ note "[0, -12, 12] [c6, ds6, g5]*2 c5 [c6, ds6, g5]"
|-| note 12 # sound "supersaw"
- |-
-- combining note and n can be useful for samples, but has no effect on synths
d1 $ note "[0, -12, 12] [c6, ds6, g5]*2 c5 [c6, ds6, g5]"
|-| note 12 # (slow 4 $ n "0!2 2 3" # sound "arpy")
links:
- https://tidalcycles.org/index.php/Tutorial
up:
alias: note
hush:
cmd: hush
help: |-
Stop all running streams. Is actually a common alias defined in the
`TidalBoot.hs` file, so if `hush` does not work for you, check if and which
tidal bootup file is being sourced.
examples:
- 'hush'
silence:
cmd: silence
help: |-
Silence generates an empty control pattern, effectively muting the stream.
examples:
- |-
d1 $ s "db!4"
xfadeIn 1 2 $ silence
links:
- https://tidalcycles.org/index.php/silence
solo:
cmd:
- solo streamno
- unsolo streamno
help: |-
Set or unset the `solo` flag on a stream. If at least one stream has `solo`
set only streams with `solo` enabled are audible.
Stacks with `mute`. Only streams that are not `mute`d are audible, even if
they have `solo` enabled.
Use [list](command:tidal.help?cmd=list) to view the current state of solo
and mute for each stream.
params:
streamno: The number of the stream to solo/unsolo. Note that it has to be a
number like `1` and can't be a stream alias like `d1`.
examples:
- |-
d1 $ fast 2 $ s "bd ~"
d2 $ fast 2 $ s "~ sn:1"
d3 $ s "hh!15 hh*3" # (fast 3 $ gain "1 <0.8 0.9 0.85>!3")
solo 3 -- only play hi-hats
- solo 2 -- add the snare back
- unsolo 3 -- remove the hi-hats
- list -- check tidal cycles output
- unsolo 2 -- play all streams again
unsolo:
alias: solo
mute:
cmd:
- mute streamno
- unmute streamno
help: |-
Mutes or unmutes a stream. This takes precedence over `solo` in that a muted
stream still does not play, even if it's `solo`ed.
Use [list](command:tidal.help?cmd=list) to view the current state of solo
and mute for each stream.
params:
streamno: The number of the stream to mute/unmute. Note that it has to be a
number like `1` and can't be a stream alias like `d1`.
examples:
- |-
d1 $ fast 2 $ s "bd ~"
d2 $ fast 2 $ s "~ sd"
mute 1 -- mute the bass drum
- 'mute 2 -- mute the snare as well'
- 'unmute 1 -- unmute the bass drum'
- 'list -- check tidal cycles output'
unmute:
alias: mute
rev:
cmd: rev cpattern
help: |-
Reverse a control pattern.
examples:
- 'd1 $ rev $ s "bd hh hh lt"'
- 'd1 $ every 2 (rev) $ s "bd hh hh lt"'
every:
cmd: every numcycles function cpattern
help: |-
Apply a `function` to a pattern every `numcycles` cycles, effectively
replacing the original pattern with the modified one in that cycle.
examples:
- 'd1 $ every 2 (fast 4) $ s "hh!4"'
- 'd1 $ s "hh!8" # pan (every 2 (|+| 1) 0)'
crush:
cmd: 'cpattern # crush strength'
help:
Apply a bit crushing effect to the stream.
parms:
strength: A fractional pattern that controls the strength of the bit
crushing effect. The numbers should be `>0` with lower numbers causing
the effect to be stronger.
examples:
- 'd1 $ slow 2 $ s "bd!8" # crush 4'
- 'd1 $ slow 2 $ s "bd!8" # crush (run 8 |+| 1)'
gain:
cmd: gain number cpattern
help: Apply a gain value to a control pattern.
params:
number: A fractional pattern that controls the gain.
examples:
- 'd1 $ s "hh!8" # gain 0.8'
- 'd1 $ s "hh!8" # gain (fast 2 "1 0.8")'
pan:
cmd: 'cpattern # pan number'
help: Pan the output of a pattern between left (`0`) and right (`1`).
params:
number: A fractional pattern that defines how to pan the output.
examples:
- 'd1 $ s "hh!8" # pan (fast 2 "0 1")'
- 'd1 $ s "hh!16" # pan (fast 2 $ range 0 1 saw)'
shape:
cmd: 'cpattern # shape number'
help:
Apply transient shaping to a pattern.
params:
number: An fractional pattern
examples:
- 'd1 $ s "bd!4" # shape 0.9'
- 'd1 $ s "bd!4" # shape (slow 2 $ range 0 1 saw)'
vowel:
cmd: 'cpattern # vowel pattern'
help: |-
Shapes a sound to a vowel. Works best with sounds with a low of noise or
distortion.
params:
pattern: A string pattern of vowels to use in the shaping.
examples:
- 'd1 $ s "bass2:0!4" # vowel "a e i u"'
- 'd1 $ s "sn:6!4" # vowel "a e i u"'
chop:
cmd: chop number cpattern
help: |-
Cut up a sample event into multiple new events, playing back that portion of
the sample at that interval of the cycle. If the sample is longer than a
cycle this compresses the sample and if it's shorter than a cycle it spreads
it (though the gaps are not filled). Both is without pitch shifting.
* `chop 1` plays the whole sample at the beginning of the cycle
* `chop 2` plays the first half of the sample at the beginning of the
cycle and the second half of the sample at half of the cycle
* `chop 3` plays the first third of the sample at the beginning of the
cycle, the second after the first third of the cycle and the third
third of the sample at two thirds into the cycle.
Note that `chop` affects `begin` and `end` of the sample.
See also [striate](command:tidal.help?cmd=striate) for another way to chop up a sample.
examples:
- 'd1 $ chop 2 $ s "xmas" # speed 2 -- notice the two distinct sample parts being played'
- 'd1 $ chop 16 $ s "xmas" # speed 2 -- sounds still choppy, but smoother'
- 'd1 $ chop 64 $ s "xmas" # speed 2 -- sounds quite robotic, but somewhat recognizable 1/2 cycle in length'
- 'd1 $ s "xmas" # speed 0.5 # cut 1 -- sample longer than 1 cycle, cut off'
- 'd1 $ chop 32 $ s "xmas" # speed 0.5 -- sample "fits" in 1 cycle without pitch shift'
- 'd1 $ chop 32 $ s "xmas!2" # speed 0.5 -- sample "fits" in 1/2 cycle without pitch shift'
striate:
cmd:
- striate noparts cpattern
- striateBy noparts length cpattern
- striate' noparts length cpattern
help: |-
Chop up a sample event and intersperse the parts with other samples in the
pattern and cycle. Given two samples `a` and `b` and a total of `4` parts
per sample, the sample parts are played like this:
~~~~
a0 b0 a1 b1 a2 b2 a3 b3
~~~~
**Note**: If the effect you're going for does not emerge, make sure you're
not unintentionally `cut`ing the samples.
params:
noparts: The number of parts to chop the samples into.
length: The length of each part.
examples:
- 'd1 $ striate 16 $ sound "numbers:0 numbers:2 numbers:3" # speed 0.5'
- |-
d1 $ striate' 8 (1/32) $ sound "numbers:0 numbers:2 numbers:3" # speed 0.5
- |-
d1 $ striate 8 $ s "breaks125:0 breaks125:1"
# unit "c" # speed 1 -- makes the samples exactly one cycle long
- 'd1 $ striate 16 $ s "breaks125:0 breaks125:1" # unit "c" # speed 1 -- notice how the loop feels different'
links:
- https://tidalcycles.org/index.php/striate
striateBy:
alias: striate
striate':
alias: striate
speed:
cmd: 'cpattern # speed number'
help: |-
Change the speed of the samples in the pattern. Changing the speed
effectively changes the pitch, so if you want to pitch a sample up or down
by an octave (depending on your tuning scheme) you can set the pitch to `2`
or `1/2`.
Changing the speed also affects the sample length. Together with
[unit](command:tidal.help?cmd=unit) you can e.g. speed up and slow down the
sample to be a multiple of your cycle length.
params:
number: A pattern of fractionals that define the speed of the samples.
Values less than 1 slow down the sample, above 1 they speed it up.
Negative values cause the sample to be played in reverse.
examples:
- 'd1 $ s "numbers:0" # speed 2 # cut 1'
- 'd1 $ s "numbers:0" # speed 0.5 # cut 1'
- 'd1 $ n "0!8" # s "numbers" # speed (range 0.5 1.5 saw) # cut 1'
- 'd1 $ s "numbers:0" # speed 2 # cut 1'
links:
- https://tidalcycles.org/index.php/speed
- https://tidalcycles.org/index.php/unit
unit:
cmd: 'cpattern # unit type'
help: |-
Changes the interpretation of the `speed` value.
params:
type: |-
One of `r` for sample length (default), `c` for the cycle length, `s` absolute seconds
examples:
- |-
setcps (74/60/4)
d1 $ s "breaks125" # unit "c" # gain 0.6
d2 $ s "hh!4" # gain "1.2 0.75 1 0.75"
- 'setcps (160/60/4) -- now go faster, notice how the pitch of the hi-hats stays the same'
- |-
setcps (125/60/4)
d1 $ slow 4 $
stack [
s "~!2 ho:2 ~" # speed (-1/2) # gain 0.7 # unit "c"
, s "cr:0 ~!3" # speed (3/8) # gain 0.8 # unit "r"
, s "breaks165!4" # speed 1 # unit "c"
]
superimpose:
cmd:
- superimpose function cpattern
- off time function cpattern
help: |-
Overlay a modified version of the pattern. For `superimpose` does not shift
the pattern, so both will be played at exactly the same time, while `off`
shifts the modified pattern by some offset.
params:
function: A function to apply to the pattern to modify it
time: A time pattern that defines how the modified pattern is shifted from
the original.
examples:
- 'd1 $ superimpose (# speed 0.5) $ s "arpy!2"'
- 'd1 $ off 0 (# speed 0.5) $ s "arpy!2" -- same as above'
- 'd1 $ off (-1/16) (# speed 0.5) $ s "arpy!2"'
- |-
d1 $ fast 2 $ -- phase music
off (slow 256 $ range (-1) 1 tri) (# speed 0.5) $ s "arpy"
- |-
d1 $ fast 2 $ off (-1/32) -- imitate hitting some chord notes realy
(# note "c4 <c3 es3>") -- the earlier notes
(note "c5 <es4 c5>" # s "arpy") -- the original notes
links:
- https://tidalcycles.org/index.php/superimpose
- https://tidalcycles.org/index.php/off
off:
alias: superimpose
run:
cmd: run number
help: |-
Generates a pattern of one cycle length of consecutive, ascending numbers
starting from 1 up to the specified `number`.
examples:
- 'd1 $ n (run 8) $ s "hh"'
- 'd1 $ up (run 8) $ s "hh"'
- 'd1 $ s "bass:1!4" # lpf 800 # resonance (slow 4 $ run 8 |*| (1/8) * 0.3) # cut 1'
quantise:
cmd: quantise num function
help: |-
Limit values in a function to `num` equally spaced values, if the function
returns values between `0` (inclusive) and `1` (exclusive). `quantize 1`
will return two values instead of one for that range. Keep in mind that
`saw`, `tri` and `sine` don't reach the value `1`.
For values outside the range of `0` to `1` it'll still generate quantized
values but it'll be `(upper-lower)*num+1` values that are spaced equally
between `lower` (inclusive) and `upper` (inclusive).
params:
num: The number of discrete values. Actual values of the function will be
assigned to the nearest lower discrete value.
function: The function to quantise.
examples:
- 'd1 $ s "arpy!16" # speed (saw |+| 1) -- every event has a distinct value'
- 'd1 $ s "arpy!16" # speed (quantise 2 $ saw |+| 1) -- there''s only two values now'
- 'd1 $ s "arpy!16" # speed (quantise 3 $ saw |+| 1) -- only three values'
- 'd1 $ s "arpy!16" # speed (quantise 3 $ saw |+| 2) -- still only three values'
- 'd1 $ s "arpy!16" # speed (quantise 3 $ range 1 4 saw |+| 1) -- nine values'
- 'd1 $ s "arpy!16" # speed (quantise 1 $ (saw |+| 1)) --one value, because saw is >=0 and <1'
- 'd1 $ s "arpy!16" # speed (quantise 1 $ (square |+| 1)) -- two values, because square is 0 or 1'
euclid:
cmd: euclid num parts cpattern
help:
Distribute `num` re-occurrences of a pattern evenly over `parts` slices of a
cycle.
param:
num: The number of re-occurrences of the pattern. Should be less than
`parts`. Can be a pattern as well.
parts: The number of slices to divide the cycle into. The `num`
re-occurrences will be placed at the beginning of the parts. Can be a
pattern as well.
examples:
- 'd1 $ euclid 3 8 $ s "bd hh!3"'
- 'd1 $ euclid 5 8 $ s "bd hh!3"'
- |-
d1 $ superimpose
((slow 4) . (euclid 3 8) . (# speed 2))
(euclid 3 8 $ s "lt:5")
- |-
d1 $ stack [
euclid "<3 5 3 [7, 13]>" "<8 8 8 16>" $ s "bd" # shape 0.3
, juxBy 0.3 (rev) $ euclid "<9 11>" 16 $ s "db"
, euclid "[5, <7 6>]" 8 $ s "sn:2" # gain 0.75
]
links:
- https://tidalcycles.org/index.php/euclid
- https://en.wikipedia.org/wiki/Euclidean_rhythm
sine:
cmd:
- sine
- saw
- square
- tri
help: |-
Generate a value according to one of the shape functions. The frequency is
one per cycle, use `slow` or `fast` to change it. The values are between
`0` and `1`, both exclusive for all except square. The interval can be
scaled using the `range` function. Sine starts around 0.5, square at 0 and all
others at slightly more than 0
The generated values are continuously changing. You can get sample and
hold like behavior by
examples:
- 'd1 $ s "hh!16" # speed (saw |+| 1)'
- 'd1 $ fast 2 $ s "numbers" # n (slow 2 $ square)'
- |-
d1 $ fast 2 $ n "0 [~ 0]" # s "bass:3" # cut 1
# lpf (slow 8 $ range 600 1000 $ sine)
saw:
alias: sine
square:
alias: sine
tri:
alias: sine
rand:
cmd: rand
help: |-
Generate a random number between 0 and 1. Use `range` to adjust the range
of values.
`rand` produces random numbers not over time but by invocation. So the
`n`-th invocation will always have the same value, no matter where in the
cycle it is:
~~~~
n "0!4" # n (rand) -- run and check your TidalCycles output
n "0!8" # n (rand) -- run and compare the TidalCycles output with the previous one
~~~~
Due to the implementation of TidalCycles the random values generated by all
`rand` calls that have the same offset have exactly the same sequence values.
If you want unique random values in various points in your patterns, the
easiest workaround is to shift the `rand` function around:
~~~~
n "0!4" # n (rand) # gain (rand) -- speed and gain have the same values
n "0!8" # n (rand) # gain ((0.1 ~>) rand) -- speed and gain now have different values
~~~~
examples:
- 'd1 $ s "hh!16" # gain (rand |+| 0.5)'
- |-
d1 $ stut 3
(range 0.02 0.8 rand)
(range (1/16) (3/16) square)
$ s "sn:2!4"
irand:
cmd: irand number
help: Generate random integer numbers between 0 and `number - 1`.
params:
number: The upper, exclusive bound for the random numbers.
examples:
- 'd1 $ s "arpy!4" # n (irand 4)'
- |-
d1 $ stut (irand 4)
(irand 10 |/| 20 |+| 0.3)
((irand 3 |+| 1) |*| (1/16))
$ s "sn:2!4"
range:
cmd: range lower upper function
help: |-
Scales the values of a function. If the values of `function` were in the
range of `0` to `1` before they'll be in the range of `lower` to `upper`
afterwards.
If the values of `function` had a different range, then the output won't be
scaled to the exact interval of `lower` to `upper`. The formula applied is
~~~~
range(x) = function(x) * (upper-lower) + lower
~~~~
examples:
- 'd1 $ s "arpy!4" # note (range 0 2 square)'
- 'd1 $ s "arpy!4" # note (range 0 2 $ range 0 2 square)'
cut:
cmd: 'cpattern # cut n'
help:
Assigns a cut group to a pattern. All sounds in the cut group are played
exclusively with last note priority. That means if a sound in a cut group
is currently still playing and a new sound starts, the old one will be
stopped.
params:
n: The cut group number.
examples:
- 'd1 $ s "numbers:2!4" # speed 0.5'
- 'd1 $ s "numbers:2!4" # speed 0.5 # cut 1'
- |-
d1 $ stack [
s "hh:1" # cut 1
, fast 4 $ s "~ hh" # cut 1
, ((1/128) ~>) $ s "bass!4" # gain 0.7 # cut 2
, s "bd!4" # cut 2
]
whenmod:
cmd: whenmod div remainder function cpattern
help: |-
Apply `function` to `cpattern` every time the current cycle count modulo
`div` is `remainder` **or higher**. `fast` and `slow` affect the cycle count
and hence the behavior of `whenmod`.
This is handy e.g. for drum fills.
params:
div: The divisor to divide the cycle count by.
remainder: The minimum the remainder of the modulo operation needs to be
in order to modify the pattern by `function`
function: A function to apply to the pattern.
examples:
- 'd1 $ fast 4 $ whenmod 4 2 (# speed 2) $ s "arpy"'
- 'd1 $ fast 4 $ whenmod 4 1 (# speed 2) $ s "arpy"'
- 'd1 $ fast 4 $ whenmod 4 3 (euclid 3 8) $ s "sn:2"'
- 'd1 $ fast 4 $ whenmod 4 3 (const "sn:2!3") $ s "sn:2"'
stack:
cmd: stack [ cpatterns ]
help: |-
Combines the events of an array of control patterns. The patterns can be of
different lengths. The patterns can use polyphony or `stack`s themselves.
**Note:** Some functions like some effects (e.g. `delay`) a whole `orbit`
not only single patterns. Hence using them in `stack` does not work. If you
want different effect values you need to separate your sounds into different
streams and/or orbits.
examples:
- 'd1 $ stack [s "hh!4", fast 2 "bd"]'
- |-
d1 $ stack [
stack [
s "bd!2"
, stack [
((1/4) ~>) $ s "hh!2" # gain 1.2
, slow 2 $ s "tablex:1" # unit "c" # speed 0.5
] # cut 1 -- same cut group
] # orbit 2 -- same orbit for the whole stack
# room 0.7 # size 0.5 # lpf 6000 -- same fx for the whole orbit
, stack [
slow 2 $ note "e2 d2" # s "arpy" # crush 6
, stut "<1 3>" 0.1 (3/16) $ -- use stut to fake delays
((1/4) ~>) $ note "[e4, g4, b4]!2" # s "arpy"
] # orbit 1 -- separate orbit for the whole stack
# lpf 1200 # resonance 0.15 -- applies only this orbit
]
degrade:
cmd:
- degrade cpattern
- degradeBy number cpattern
help: |-
Randomly drops events from a pattern. `degrade` has a 50% chance of dropping
events, with `degradeBy` you can specify a `number` between `0` (don't drop
anything) and `1` (drop every event).
params:
number: The probability between `0` and `1` that an event is going to be
dropped.
examples:
- 'd1 $ degrade $ s "hh!16"'
- 'd1 $ degradeBy 0.1 $ s "hh!16"'
- 'd1 $ degradeBy (slow 4 $ range 0.1 0.5 tri) $ striate 64 $ s "breaks125"'
degradeBy:
alias: degrade
const:
cmd: const newpattern cpattern
help: |-
Discard any incoming pattern information and replace with a new pattern.
This is handy for when you want to completely replace a patter in a function
like `every`.
params:
newpattern: The new control pattern.
examples:
- 'd1 $ const (s "hh!4") $ s "bd!4" # gain "1 0 1 0"'
- 'd1 $ every 2 (const $ s "sn(11,16)") $ s "bd!4"'
samples:
cmd: samples sound number
help: |-
Lets you set the `s` and `n` parameter on a pattern separately.
params:
sound: A pattern specifying the sounds to play.
number: A number or function that specifies the sample to pick from the
sound folder.
examples:
- 'd1 $ sound $ samples "drum*4" (run 4)'
xfade:
cmd:
- xfade stream cpattern
- xfadeIn stream time cpattern
help: |-
Fade a new pattern into a stream over time. For `xfade` 4 cycles are used.
`xfadeIn` let's you specify the number of cycles in the `time` parameter.
You can use `xfade` to fade out byt just fading to `silence`.
params:
stream: The number or name of a stream. This has to be the stream name and
can't be one of the aliases like `d1` that are set up. For `d1` you would
have to use the number 1.
time: The number of cycles to take for the fading the new pattern in.
examples:
- 'xfade 1 $ s "bd!4"'
- 'xfade 1 $ stack [ s "bd!8", fast 2 $ s "~ sn:2" ]'
- |-
xfadeIn 1 8 $ stack [
s "bd!4" , s "hh!16"
, note "c3!7 c2" # s "arpy" # gain 0.9
]
xfadeIn:
alias: xfade
slowcat:
cmd:
- cat [cpatterns]
- slowcat [cpatterns]
- fastcat [cpatterns]
help: |-
Concatenates cycles from an array of pattern into combined cycles. `cat` is
and alias for `slowcat`.
For each cycle the patterns in the array are, in order, asked to provide
one cycle of events. These one cycles per pattern are then concatenated. In
the case of `fastcat` the concatenated pattern is then sped up by the number
of patterns in the array, so the new, concatenated cycles spans exactly one
cycle. `slowcat` does not adjust the speed, hence the new pattern will have
a length of cycles that's equal to the number of patterns in the array.
If the patterns have different lengths/speeds their "parts" will be
progressively integrated into the concatenated pattern.
examples:
- 'd1 $ slowcat [n "0!2", n "1!2"] # s "arpy"'
- 'd1 $ cat [n "0!2", n "1!2"] # s "arpy"'
- 'd1 $ fastcat [n "0!2", n "1!2"] # s "arpy"'
- 'd1 $ fast 2 $ slowcat [n "0!2", n "1!2"] # s "arpy"'
- 'd1 $ fastcat [n "0!2", slow 3 $ n "2!2 3!2 4!2"] # s "arpy"'
- 'd1 $ fastcat [slow 2 $ n "0!2 1!2", slow 3 $ n "3!2 4!2"] # s "arpy"'
cat:
alias: slowcat
fastcat:
alias: slowcat