-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathsapf-examples.txt
2218 lines (1776 loc) · 80.4 KB
/
sapf-examples.txt
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
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;;; analog bubbles
((.4 0 lfsaw) 2 * ([8 7.23] 0 lfsaw) .25 * 9.667 + + exp2) 0 sinosc .04 * .2 0 4 combn play
(([.4 [8 7.23]] 0 lfsaw) [24 3] * +/ 81 + nnhz) 0 sinosc 4c * .2 0 4 combn play
(
[.4 [8 7.23]] ; LFO freq
0 lfsaw ; sawtooth LFO
[24 3] * ; modulation depth in semitones
+/ ; add mono and stereo LFOs
81 + ; midi note offset
nnhz ; convert note number to Hertz
0 sinosc ; sine wave oscillator
4c * ; scale amplitude
.2 0 4 combn ; comb delay
play
)
; a sound as a form. a longer way to write the same example, but now parameterizable.
{
:rate1 .4 ; Hz
:rate2 [8 7.23] ; Hz
:depth1 24 ; semitones
:depth2 3 ; semitones
:center 80 ; semitones
:db -28 ; dB
:delay .2 ; seconds
:maxdelay 0 ; seconds
:decay 4 ; seconds
:out \o[
o.center
o.rate1 0 lfsaw o.depth1 * +
o.rate2 0 lfsaw o.depth2 * +
nnhz 0 sinosc o.db dbamp *
o.delay o.maxdelay o.decay combn
]
} = analog_bubbles
analog_bubbles.out play
{analog_bubbles :rate1 -.2 :decay 8}.out play ; change parameters
analog_bubbles.out +/ 5 T 100 0 sgram ; plot spectrogram. +/ to mix to mono
;;;; moto rev
.2 0 11 31 lfo [0 3c] .1 lfpulse 1h .1 rlpf .4 clip2 play
;;;; sample and hold liquidities
\[ 1 2h xmousex aa 1/ = ckt
0 impulse = ck
1h 8k xmousey = f
f .5 * white f + ck sah 0 sinosc ck 1.2 ckt * decay .1 ckt * lag * 1 rand2s ck seq pan2
aa .3 0 2 combn +
] ! play
;; more verbose:
\[
1 2h xmousex = clockRate
clockRate 1/ = clockPeriod
clockRate 0 impulse = clock
1h 8k xmousey = centerFreq
((.5 1.5 rands) clock seq) (centerFreq clock sah) * = freq
(clock (1.2 clockPeriod *) decay) (.1 clockPeriod *) lag = amp
(1 rand2s) clock seq = panpos
(freq 0 sinosc) amp * panpos pan2 = in
(in .3 0 2 combn) in + aa pr cr
] ! play
;;;; sweepy noise
(3c 2X white) ((4 60 xmousex 0 lfsaw) 1.2 + (2h 8k xmousey) *) 2m lag .1 rlpf aa .3 0 2 combn + play
\[
4 60 xmousex = rate
2h 8k xmousey = centerFreq
rate 0 lfsaw = lfo
(lfo 1.2 + centerFreq *) 2m lag = fc
3c 2X white = in
in fc .1 rlpf aa .3 0 2 combn +
] play
;;;; sweepy noise as a form
{
:rate1 4 ; hz
:rate2 60 ; hz
:freq1 2h ; hz
:freq2 8k ; hz
:rq .1 ; 1/Q
:delay .3 ; seconds
:maxdelay 0 ; seconds
:decay 2 ; seconds
:out \o[
(3c 2X white)
((o.rate1 o.rate2 xmousex 0 lfsaw) 1.2 + (o.freq1 o.freq2 xmousey) *) 2m lag
o.rq rlpf softclip aa o.delay o.maxdelay o.decay combn +
]
} = sweepy
sweepy.out play
{sweepy :rate1 -.1 :rate2 -30 :freq1 2h :rq .02 }.out play
;;;; lots of sine lfos
((.027 0 .05 .2 xlfo) 0 40 4k xlfo) [-.2 .2] + 0 saw (.17 0 1h 6k xlfo) .1 rlpf (.041 0 2 20 xlfo) [0 .25] sinosc biuni * .2 * .3 0 3 combn play
;;;; hell is busy
\[ ((4h 2k rand) 0 sinosc) ((1 11 rand) 0 (0 .7 rand) lfpulse) 4m lag 4c * * rpan2 4 quadenv *] .5 1 2 ola play
;; hell is busy - as a form
; create a base sound
{
:freq 1k ; hz
:rate 4 ; hz
:duty .3 ; 0 to 1
:db -28 ; dB
:dur 4 ; seconds
:out \o[
(o.freq 0 sinosc) (o.rate 0 o.duty lfpulse) 4m lag (o.db dbamp) * * rpan2 (o.dur quadenv) *
]
} = busytone
; play the base sound
busytone.out play
; create a texture by overriding some fields with streams
{ busytone
:freq 4h 2k rands @
:rate 1 11 rands @
:duty 0 .7 rands @
}.out .5 1 2 ola play
; The @ operators cause the form to expand to a stream of forms.
; The . operator will evaluate the 'out' field of each form in the stream creating a stream of stereo pairs.
; This stream is then played by ola.
;;;; pond life
\[((20 50 rand 0 sinosc 1h 4h rand 5h 25h linrand *+) 0 sinosc) (((3 1 9 rand /) 0 (.2 .5 rand) lfpulse) 4m lag 4c *) * rpan2] 8 4 8 2 oltx play
;;;; pulse width modulation and resonant filter
(((#[48 54 64] cyc 4 1 steps) [0 .5] +) 0 (.2 urand sinosc .98 * biuni) pulse) ((.14 urand sinosc) 100 6k biexp) .1 rlpf .3 * .27 0 2 combn play
;;;; scratchy
.5 2X brown .49 - 0 | 20 * 5k 1 rhpf play
;;;; rain
\[2 .2 dust2 .25 decay .05 lfnoise3 8h 13k biexp .18 bpf .08 lfnoise3 pan2 .08 .01 apverb6] 16 X +/ .01 2X pink + .005 2X brown + play
;;;; chorusing saws
\[ 30 100 irand nnhz = f \[\[.995 1.005 rand f *] 2X urand lfsaw .04 *] 10 X +/ 8m lag] 4 4 4 2 oltx = a a [.5 .47] 0 4 combn a reverse + play
\[ 30 100 irand nnhz = f \[\[.995 1.005 rand f *] 2X urand saw .04 *] 10 X +/ 8m lag] 4 4 4 2 oltx = a a [.5 .47] 0 4 combn a reverse + play
;;; hard sync sawtooth with LFO
\[ 30 80 irand nnhz = f (f [0 .2] +) (.2 urand sinosc 1 5 bilin f *) ssaw .05 *] 4 4 4 2 oltx aa .3 0 4 combn reverse + play
;;;; bang on a can
\[32 = n 4 10 xrand urand impulse .2 2 xrand urand .1 .5 rand lfpulse * n 30 6k nrands .5 2 xmousex * n .1 1 nrands n .1 4 nxrands klank ] 5X splay 12m lag .1 * play
;;;; rocks on rails
\[ 20 = p (1h 4m dust) (8 3k 3h xline) .2 resonz (p 2h 32h nlinrands) 1 (p .2 1.2 nrands) klank 8 rsweeppan2] 2 3 4 2 oltx .2 * play
;;;; bouncing lightbulbs, pencils, cans and other assorted objects
\[ 4 = n (4 3 7 rand 6h xline 0 impulse 4 9c 9u xline * 1m decay) (n 4h 84h nrands) (n nurands) (n .01 .11 nrands) klank rpan2 3 1m fadeout] .6 1.2 randz 1 2 ola play
\[ 6 = n (5 3 7 rand 6h xline 0 impulse 5 9c 9u xline * .1m 1m decay2) (n 2h 12k nxrands) (n nurands) (n .01 1 nrands) klank rpan2 4.5 1m fadeout] .4 1.8 randz 1 2 ola play
\[`nrands = n 4 5 6h xline 0 impulse 4 9c 9u xline * 1m decay 4 4h 8k n 4 0 1 n 4 1c .11 n klank rpan2 3 1m fadeout] .9 1 2 ola play;tweet
;;;; various rhythms with the above timbre
\[ 4 = n (#[1 2 3 4 6 8] pick 0 impulse .4m 4m decay2 3c 9c rand *) (n 4h 84h nrands) (n nurands) (n .02 .21 nrands) klank rpan2 12 1m fadeout] 2 1 2 ola play
\[ 4 = n (#[1 1 0 0 0 0 0 0] muss cyc 8 0 impulse iseq .4m 4m decay2 6c *) (n 4h 84h nrands) (n nurands) (n .02 .21 nrands) klank rpan2 12 1m fadeout] 2 1 2 ola play
\[ 4 = n (3/8 coinz 8 0 impulse iseq .4m 4m decay2 6c *) (n 4h 84h nrands) (n nurands) (n .02 .21 nrands) klank rpan2 12 1m fadeout] 2 1 2 ola play
\[ 4 = n (3/8 coinz 12 N cyc 8 0 impulse iseq .4m 4m decay2 6c *) (n 4h 84h nrands) (n nurands) (n .02 .21 nrands) klank rpan2 12 1m fadeout] 2 1 2 ola play
\[ 4 = n (3/8 coinz [3 4 6 8 12] pick N cyc 8 0 impulse iseq .4m 4m decay2 6c *) (n 4h 84h nrands) (n nurands) (n .02 .21 nrands) klank rpan2 12 1m fadeout] 2 1 2 ola play
\[ 4 = n (3/8 coinz [4 8 16] pick N cyc 8 0 impulse iseq 2m 4m decay2 1c *) (n 2h 24h nxrands) (n nurands) (n .02 .41 nrands) klank rpan2 12 1m fadeout] 2 1 2 ola aa 5c 2 apverb6 -.3 fade2 play
;;;; klang -- lots of sines.
\[60 = n \[n 40 10k nlinrands 1 n / 0 klang] 2X] 4 4 2 xftx play
;;;; klank - bank of resonators excited by impulses
\[15 = p (.7 4c dust) (p 80 10k nlinrands) (p 1 nrand2s) (p .2 8.2 nrands) klank rpan2] 6 6 5 2 oltx play
;;;; klank - excited by noise bursts
\[8 = p .6 1m dust 3.1 decay white = s \[s (p 80 10k nlinrands) (p 1 nrand2s) (p .2 8.2 nrands) klank] 2X] 8 8 5 2 oltx play
;;;; klank - excited by noise bursts - longer
\[8 = p .1 1m dust 3.1 decay white = s \[s (p 80 7k nlinrands) (p 1 nrand2s) (p 6.2 12.2 nrands) klank] 2X] 16 16 6 2 oltx play
;;;; resonators at random frequencies excited by BrownNoise
\[32 = p 1m brown = s \[s p 80 10k nlinrands p 1 nrand2s p .5 2.5 nrands klank] 2X] 6 6 2 xftx play
;;;; gustav tomita
84 -2 by [0 4 7 11] aa reverse 2ple cyc 24 N + mirror2 cyc nnhz $/ [0 1] @ + @ 1/5 1/8 0 sinosc 2/3 3/2 biexp steps 4c lag 0 saw 1k lpf2 aa 5c 2 apverb6 + .2 * play
;;;; dominant chord arpeggios
nat @ 0 3 to + $/ [0 4 7 10 12] degkey 48 + 48 N mirror2 0 6 to mirror1 @ + $/ nnhz .1 1 steps 2c lag 0 sinosc 5 ^ .2 * 5c 2 apverb6 play
;;;; analog daze
\[
#[-5 3 0 3 -3 5 2 5] 12 / = pattern
\octave clockRate pwmrate fltrate[
((pattern octave + ohz cyc (clockRate 0 impulse) seq) 5c lag) 0 (pwmrate urand sinosc .4 * .5 +) lfpulse
fltrate urand sinosc 14h * 2k + 1/15 rlpf .1 * ] = f
2 0 impulse .15 decay .3 lfnoise1 6k * 8k + 2X lfnoise0 7c * * ;; "snare"
[1 8 .31 .2 f 0 2 .13 .11 f] + = g
g .375 0 5 combn g reverse + .5 *
] = daze
daze play
;;;; choip choip choip
\[
12 = t
\[
(t 1 30 xrxline) 0 impulse = impulses
(t 6h 8k xrxline) = freq
(t 1c .5 xrxline) impulses * 1c .2 decay2 (impulses 5c .5 decay2 -.9 freq * * freq +) 0 sinosc * t rsweeppan2
] t 2 - 1 8 2 oltx 5c 4 apverb4
] = choip
choip play
choip +/ 20 T 100 0 sgram
;;;; deep trip
\[\[
0 .3 rand lfnoise1 5 * 5/6 + ohz = freq
(0 8 rand lfnoise1) (0 40 rand 0 sinosc) .1 * * 0 | (0 .5 rand freq * lfnoise3) * = amp
(freq 0 sinosc) amp * (0 5 rand lfnoise1) pan2 = s
\[ s \[.2 .5 rand] 2X 0 20 combn] 2X +/ s +
] 12 4 4 2 oltx] = deep-trip
deep-trip play
deep-trip +/ 30 T 100 0 sgram
\[\[
0 .3 rand lfnoise1 5 * 5/6 + ohz = freq
[(freq 0 sinosc) (0 .5 rand freq * lfnoise3) (0 8 rand lfnoise1) (0 40 rand 0 sinosc) .1] */ (0 5 rand lfnoise1) pan2 = s
\[ s \[.2 .5 rand] 2X 0 20 combn] 2X +/ s +
] 12 4 4 2 oltx] = deep-trip-2
deep-trip-2 play
;;;; fast LFOs with slow beats
\[
40 240 rand = a0 a0 brand + = a1
[a0 a1] = a 0 2k rand = b [a0 brand + a1 brand +] = c
a 0 sinosc urand b * * b + 0 sinosc c 0 sinosc 5c * 5c + *
] 8 4 4 2 oltx play
;;;; reverberated sine percussion
\[ 10 = d 7 = c
\[2 d / .2 dust 2h 32h rand .003 resonz] d X +/ = s
(s .048 aa delayn) (c 0 .1 nrands lfnoise1 4c * 5c +) .1 15 combl +/ 5c 1 apverb4 .2 * s +
] = rsp
rsp play
;;;; resonators tuned in a harmonic series with pitch ratios from a just scale
\[
12 = p
1m brown = source
\[ji-major pick 120 * = freq \[source ((p 1 1 nby freq *) (p .5 nrand2s) +) (p 1 1 nby 1/) (p .5 4.5 nrands) klank] 2X] 1 7 2 xftx
] = all-harm-klank .3 *
all-harm-klank play
;;;; similar to above, but tuned to odd harmonics only, shorter ring times, and using a different noise source
\[
12 = p
8k lfnoise3 1m * = source
\[ji-major pick 120 * = freq \[source ((p 1 2 nby freq *) (p .5 nrand2s) +) (p 1 2 nby 1/) (p .2 1 nrands) klank] 2X] 1 7 2 xftx
] = odd-harm-klank
odd-harm-klank play
;;;; cymbalism
\[ 15 = p
5h 25h rand = f1 5h 8k rand = f2
.5 3.5 rand 0 impulse 4m decay 3c white * = source
\[source (p f1 f1 f2 + nrands) 1 (p 1 5 nrands) klank] 2X
] 4 4 2 xftx .25 * play
;;;; synthetic piano
\[
6 36 90 nirands sort @ \pch
[3k lfnoise3 (.1 .5 rand urand impulse .1 * 8m 4c decay2) * (pch [-2c 0 1c] + nnhz 1/) aa 6 combl +/] ! splay
] ! play
\[
12 36 90 nirands sort @ \pch
[3k lfnoise3 (.05 .25 rand urand impulse .1 * 8m 4c decay2) * (pch [-2c 0 1c] + nnhz 1/) aa 6 combl +/] ! splay
] ! play
\[
24 36 90 nirands sort @ \pch
[3k lfnoise3 (.025 .125 rand urand impulse .1 * 8m 4c decay2) * (pch [-2c 0 1c] + nnhz 1/) aa 6 combl +/] ! splay
] ! play
;;;; uplink
\[
\[
\[(0 20 rand 0 urand lfpulse) (0 4 rand 0 urand lfpulse 0 8k rand * 0 2k rand +) *] 2X +/ = freq
freq 0 .5 pulse 4c * .8 rand2 pan2
] 4 1 5 2 oltx
] = uplink
uplink play
\[
\[
\[(0 40 rand 0 urand lfpulse) (0 8 rand 0 urand lfpulse 0 12k rand * 40 4k xrand +) *] 2X +/ = freq
freq 0 1c 99c rand pulse 4c * .8 rand2 pan2
] 4 1 5 2 oltx
] = uplink
uplink play
;;;; data space
\[
\[
\[(0 100 rand 0 urand lfpulse) (0 40 rand 0 urand lfpulse 0 8k rand * 0 2k rand +) *] 3X +/ = freq
freq 0 .5 lfpulse 4c * 0 3 rand lfnoise0 .8 * 4m lag pan2 .1 .35 rand aa 3 combl
] 6 1 4 2 oltx
] = data-space
data-space play
;;;; tremulate
\[
5h 9h xrand = f
30 90 xrand = r
[1/1 6/5 3/2 9/5] f * 0 sinosc r 4X lfnoise3 0 | .2 * * brands pan2 +/
] 2 .5 2 xftx .1 .1 1 combn play
;;;; clapping music - steve reich
([1 1 1 0 1 1 0 1 0 1 1 0] 12 ncyc [(13 0s) (0 -12 to)] rot @ $/ @) (5.6 0 impulse) iseq .1m 8c decay2 2 * white [1k 8h] .2 bpf [-1 1] 1m itd +/ play
;;;; birdies
\[ ((\[.4 .5 rand 0 .1 .9 rand lfpulse 4 7 rand *] 2X +/ 2 +) 0 lfsaw (-1k -1.8k rand)(28h 52h rand) *+ 5c lag) 0 sinosc (.2 .7 rand) 0 .4 lfpulse 2c * .3 lag * rpan2] 7 4 4 2 oltx 2c 1.5 apverb4 play
;;;; babbling brook
\[ \a b c d [ \[(1 brown)(1 brown a lpf b c *+) 3c rhpf d *] 2X] = f (10 2h 4h 6m f) (14 4h 8h 10m f) +] ! play
;;;; alien meadow
\[(0 20 rand 0 sinosc) 0 5k rand aa .1 * ba *+ 0 sinosc 0 20 rand 0 sinosc 5c aa *+ * rpan2] 6 2 6 2 oltx play
;;;; saucer base
\[0 20 rand 0 sinosc 0 1k rand aa 1.1 * *+ 0 sinosc 0 5k rand aa 1.1 * *+ 0 sinosc .1 * rpan2] 6 2 4 2 oltx play
;;;; tarmac
\[
\a b [[1 0][a b]?] = c ; make a boolean array
[1 2 c 2 1 c 2 2 c 3 3 c 3 5 c 4 4 c 5 3 c 6 10 c] @ Z = beats
\[
8 0 impulse = i
5c .5 rand = d
(beats pick muss cyc i iseq) 4m d decay2 = env
((0 3 rand lfnoise1 .8m * 2.2m + pink)(4 50 4k nlinrands)1(4 .2 12 nrands)klank randsign) (i 4m d decay2 0 5k rand * 1h 2h rand +) .2 rlpf urand lfnoise1 pan2 env *
] 12 3 6 2 oltx 4c 16 apverb4
] = tarmac
tarmac play
;;;; bowed garage door springs
\[ (0 3 rand lfnoise1 .4m * 1.1m + pink) (4 50 2k nrands)1(4 .2 12 nrands) klank abs randsign urand lfnoise1 pan2] 8 3 4 2 oltx 4c 16 apverb6 play
;;;; sawed cymbals
\[
15 = p
\[
1k 3k xrand = f1
f1 f1 8k + rand = f2
12 0 6h rxline 0 lfsaw .2m * = in
\[p f1 f2 nrands] 2X = freqs
\[p 2 6 nrands] 2X = ringTimes
in freqs @ 1 ringTimes @ klank
in freqs @ 1 2c klank -
] 4 4 3 2 oltx
] ! play
;;;;
\[
15 = p
\[
2h 3k xrand = f1
f1 f1 4k + xrand = f2
12 0 6h rand 0 6h rand xline 0 lfsaw .1m * = in
\[p f1 f2 nrands] 2X = freqs
\[p 2 6 nrands] 2X = ringTimes
in freqs @ 1 ringTimes @ klank
in freqs @ 1 2c klank - tanh .7 *
] 4 4 3 2 oltx tanh 5c 5 apverb6
] ! play
;;;; sawed cymbals 2
\[
15 = p
\[
2h 3k xrand = f1
f1 f1 4k + xrand = f2
12 0 6h rxline 0 lfsaw .1m * = in
\[p f1 f2 nrands] 2X = freqs
\[p 2 6 nrands] 2X = ringTimes
in freqs @ 1 ringTimes @ klank
in freqs @ 1 2c klank - tanh .7 *
] 4 4 3 2 oltx tanh
] ! play
;;;; unusual cymbals
\[
24 = p
\[
2h 3k xrand = f1
f1 f1 4k + xrand = f2
12 .3 12 xrxline 0 impulse 1c * = in
\[p f1 f2 nrands] 2X = freqs
freqs 2 rand2s + = freq2s
\[p 1 5 nxrands] 2X = ringTimes
\[p 8m .5 nxrands] 2X = atkTimes
in freqs @ 1 ringTimes @ klank
in freq2s @ 1 atkTimes @ klank - tanh .7 * un2 .8 rand2 bal2
] 4 4 6 2 oltx tanh
] ! play
;;;; ostinoodles
\[ 6 irand2 81 + = root #[0 2 4 5 7 9 11 12] = major
\[ #[0 1 2 3] 16 irand2 + muss major degkey root + nnhz cyc = sequence
12 4 24 xrxline 0 impulse = trig
(sequence trig seq 0 sinosc ^5) (trig 4m .3 decay2 5c *) * rpan2] 6 3 6 2 oltx 4c 6 apverb6
] ! play
\[ 6 rand2 81 + = root #[0 2 4 5 7 9 11 12] = major
\[ 4 0 6 nirandz 16 irand2 + major degkey root + nnhz cyc = sequence
12 4 24 xrxline 0 impulse = trig
(sequence trig seq 0 sinosc ^5) (trig 4m .3 decay2 5c *) * rpan2] 6 3 6 2 oltx 4c 6 apverb6
] ! play
\[ 6 rand2 78 + = root 8 16 to 8 / log2 12 * = harmonics
\[ [3 4 6 8] pick 0 8 nirandz 4 [0 0 0 0 1 2 -1 -2] npicks @ + $/ 20 irand2 + harmonics degkey root + nnhz cyc = sequence
[.25 .5 .75 1 2 3 4 6 8] pick 0 impulse = trig
(sequence trig seq 0 .1 .5 rand pulse 1k 4k rand lpf2) (trig 1m 2c xrand .2 1.6 rand decay2 5c *) * rpan2] 8 8 8 2 oltx 4c 8 apverb6
] ! play
\[ 6 rand2 78 + = root 8 16 to 8 / log2 12 * = harmonics
\[ [4 8] pick 0 8 nirandz 4 [0 0 0 0 1 2 -1 -2] npicks @ + $/ 20 irand2 + harmonics degkey root + nnhz cyc = sequence
[.25 .5 1 2 4 8] pick 0 impulse = trig
(sequence trig seq 0 .1 .5 rand pulse 1k 4k rand lpf2) (trig 1m 2c xrand .2 1.6 rand decay2 5c *) * rpan2] 8 8 8 2 oltx 4c 8 apverb6
] ! play
\[ 6 rand2 78 + = root 1 16 to 8 / log2 12 * = harmonics
\[ [4 8] pick 0 8 nirandz 4 [0 0 0 0 1 2 -1 -2] npicks @ + $/ 20 irand2 + harmonics degkey root + nnhz cyc = sequence
[.25 .5 1 2 4 8] pick 0 impulse = trig
(sequence trig seq 0 .04 .96 rand pulse .6 lfnoise3 4h 8k biexp .1 .4 rand rlpf2) (trig 1m 2c xrand .2 1.6 rand decay2 5c *) * rpan2] 8 8 8 2 oltx 4c 8 apverb6
] ! play ;;;; ***
\[ 6 rand2 66 + = root 1 16 to 8 / log2 12 * = harmonics
\[
[4 8] pick 0 8 nirandz 4 [0 0 0 0 1 2 -1 -2] npicks @ + $/ 24 irand2 + harmonics degkey root + nnhz cyc = sequence
[.125 .25 .5 1 2 4 8 16] [2 3 4 5 5 4 3 2] sumto1 wpick 0 impulse = trig
(sequence trig seq 0 .15 lfnoise3 .96 * pulse .6 lfnoise3 4h 8k biexp .1 .4 rand rlpf2) (trig 1m 2c xrand .2 1.6 rand decay2) *
.3 lfnoise3 .1 * + .3 lfnoise3 .5 32 biexp * tanh 5h 8k xrand lpf1 5c * rpan2
] 8 8 8 2 oltx
[.5 .5] lfnoise3 3m * 3m flange 4c 8 apverb6
] ! play ;;; modulate all the things at once
\[ 6 rand2 78 + = root 8 16 to 8 / log2 12 * = harmonics
\[ [3 9] pick 0 8 nirandz [3 6] pick [0 0 0 0 1 2 -1 -2] npicks @ + $/ 20 irand2 + harmonics degkey root + nnhz cyc = sequence
[1/9 1/3 1 3 9] pick 0 impulse = trig
trig 1m 2c xrand .2 1.6 rand decay2 = env
(sequence trig seq 0 .1 .5 rand pulse 1k 4k rand env * 1h + .3 rlpf) (env 5c *) * rpan2] 9 9 9 2 oltx 4c 8 apverb6
] ! play
\[ 6 rand2 78 + = root 8 16 to 8 / log2 12 * = harmonics
\[ 3 6 irand 0 8 nirandz 2 8 irand [0 0 0 0 0 0 1 2 -1 -2 3 -3] npicks @ + $/ 20 irand2 + harmonics degkey root + nnhz cyc = sequence
[.25 .5 .75 1 2 3 4 6 8 12] pick 0 impulse = trig
trig 1m 2c xrand .2 1.6 rand decay2 = env
(sequence trig seq 0 .1 .5 rand pulse 1k 4k rand env * 1h + .2 .7071 rand rlpf) (env 5c *) * rpan2]
16 8 8 2 oltx 4c 8 apverb6
] ! play
;;;; contamination zone
\[ 8h 8k xrand = f
0 3 rand lfnoise1 .8m * 2.2m + pink = source
(source (4 50 2k nrands)1(4 .2 .4 nrands)() klank abs randsign) (0 1 linrand 0 sinosc .7 f * * f +) .1 rlpf urand lfnoise1 pan2 (0 15 linrand 0 .2 .4 rand lfpulse 4m lag) *
] 8 3 4 2 oltx 4c 15 apverb6 play
;;;; ritual hymn in praise of the god of the LS-3000 life support unit.
\[ 20 = n \[ \[(n -36 24 nirands) 12 / ohz n 5 nrand2s +] 3X $/ 1 3 n * 0 2pi nrands klang .2 n / *] 2X ] 4 4 2 xftx play
;;;; the church of chance
\[
8 = n ; number of notes
[1 2 4 5 6] = h ; harmonics
[0 2 4 5 7 9] = s ; scale pitches
\[
24 35 irand = k ; root pitch
n s npicks n 0 5 nirands 12 * + k + nnhz @ h * $/ = freqs
\[freqs .4 rand2z +] 2X @ 1 freqs size 0 2pi nrands klang .1 n / *
] 6 3 2 xftx
] ! play
;;;; modal space
\[
((-7 22 mousex floor) #[0 2 3 5 7 9 10 12] degkey 72 + 3 2X lfnoise1 4c * + nnhz 0 sinosc .1 *) ;; lead
([48 55] nnhz 0 .15 lfpulse .1 0 sinosc 10 72 *+ nnhz .1 rlpf .1 *) ;; drone
+ aa .31 0 2 combn +
] ! play
;;;; modal space - sin^5 + lag
\[
(-7 22 mousex floor #[0 2 3 5 7 9 10 12] degkey 60 + 3 2X lfnoise1 4c * + nnhz [.1 .2] lag2 0 sinosc ^5 .1 *) ;; lead
([48 55] nnhz 0 .15 lfpulse .1 0 sinosc 10 72 *+ nnhz .1 rlpf .1 *) ;; drone
+ aa .31 0 2 combn +
] ! play
;;;; noise modulated sines
\[ 60 1h irand nnhz = f [0 .2] f + 0 sinosc [.15 .16] f * lfnoise3 .1 * *] 4 4 4 2 oltx aa .5 0 1 combn reverse + play
;;;; noise modulated sawtooths
\[ 60 1h irand nnhz = f [0 .2] f + 0 lfsaw [.15 .16] f * lfnoise3 .1 * *] 4 4 4 2 oltx aa .5 0 1 combn reverse + play
;; harmonic arpeggio
1 16 toz 64 * cyc .1 1 steps \[\[.4 rand2] 2 X] 7 X + 0 saw +/ .05 0 sinosc 3000 * 3300 + .3 rlpf2 .01 * .3 0 2 combn play
;;;; splay bells
16 \n[1c 0 sinosc .45 * .55 + ^2 .2 n X dust 2 decay 3m lag2 n 2h 2k expdiv 0 sinosc * 8m splayd]! play
;;;; jitter beats
((5 .8 -.1 nby .03 6 X $ coinz) ([1 .5][5 6] ?) * @) 1.1 ((5 1 2 ngrow) 16 6 X $ @) imps (5 1.6 .5 ngrow .9 6 X $ 3 *) decay 4m lag 1 11 to 64 * 0 sinosc ^3 * brands 11 N .7m itd +/ .3 * play
((5 .8 .3 lindiv .02 6 X $ coinz) ([1 .5][5 6] ?) * @) 1.1 ((0 4 to exp2) 16 6 X $ @) imps (5 5 .5 ngrow 2 6 X $) decay 4m lag 1 11 to 64 * 0 sinosc ^5 * brands .7m itd +/ .2 * play
;;;; bowed pipes
2 20 to 120 * @ \f [.3 2X brown 1k lpf2 .6 lfnoise3 3m * 3m flange .025 .25 xrand urand 1c lfpulse * f recip aa -8 f 8 * lpcombc] ! +/ .04 * play
2 20 to 120 * @ \f [.3 2X brown .6 lfnoise3 3m * 3m flange .01 .2 xrand urand .0031 lfpulse * f recip aa -3 f 6 * lpcombc] ! +/ .04 * play
2 20 to 120 * @ \f [.3 2X brown .6 lfnoise3 3m * 3m flange .2 4 xrand 0 .2 lfpulse * f recip aa -3 f 6 * lpcombc] ! +/ .04 * play
2 20 to 120 * @ \f [.3 2X brown .6 lfnoise3 3m * 3m flange .1 1 xrand urand .04 lfpulse * f recip aa -3 f 6 * lpcombc] ! +/ aa .8 aa delayn 3k lpf + .04 * play
1 16 to 80 * @ \f [.3 2X brown .6 lfnoise3 3m * 3m flange 1c .3 xrand urand .1 .02 rand lfpulse * f recip aa -3 f 6 * lpcombc] ! +/ aa 2 aa delayn 3k lpf + .04 * play
1 16 to 60 * @ \f [.3 2X brown un2 rbal2 .6 lfnoise3 3m * 3m flange 1c .1 xrand urand .05 .01 rand lfpulse * f recip aa -3 f 6 * lpcombc] ! +/ aa 2 aa delayn 3k lpf 8h lpf1 + aa 5c 3 apverb6 .5 fade2 .02 * play
;;;; random pitches
1 48 ilinrandz 1 48 ilinrandz & 50 * brandz + 1 8 steps [0 1] + 0 saw 6/8 0 12 combn .2 * play
;;;; flange pipe
.3 2X brown .6 lfnoise3 3m * 3m flange 300 [0 1] + recip aa -3 3k lpcombc .0625 * play
;;;; fifth tube
.2 2X pink .7 0 .5 lfpulse 1/300 1/200 unilin .05 -2 5k lpcombc .08 0 2 combn play
;;;; harmonic clouds
\[ 30 4000 xrand 64 round = f f 1 2X rand2 + 0 saw 1 6 rand f * lpf2 8 octenv * .04 * ] .4 1 2 ola play
;;;; harmonic clouds 2
\[ \[30 4000 xrand 40 round = f f 1 2X rand2 + 0 saw 1 6 rand f * lpf2 ] 6 X +/ [2.4 .4 aaa] pick octenv * .04 * ] .2 1 2 ola .04 aa .3 alpasn play
;;;; harmonic clouds 3
\[ \[30 4000 xrand 40 round = f f 1 2X rand2 + 0 saw 1 6 rand f * lpf2 ] 6 X +/ [2.4 .4 aaa] pick octenv * .04 * ] #[.1 .2 .4] pickz 1 2 ola play
;; construct Harry Partch's 43 tone scale and play it in ascending order.
#[1 3 5 7 9 11] aa @ / $/ #[81/80 33/32 21/20 16/15 32/27 21/16 27/20] aa 1/ $ $ log2 frac exp2 sort change mirror0 3h * .4 2X rand2z + @ 3 0 impulse seq 0 saw .15 * play
;;;; drone
[1h 2h 3h] .5 *.5 2X 3X rand2 + 0 sinosc ^7 [7 6 5] 2 * 1/ urands sinosc & [.3 .15 .1] * +/ .1 0 .1m 4m lfo 4m flange .067 0 5h 6k lfo .1 rlpf aa .3 0 3 combn + play
[1h 2h 3h] .5 *.5 2X 3X rand2 + 0 sinosc ^7 [7 6 5] 2 * 1/ 0 sinosc & [.3 .15 .1] * +/ .1 0 .1m 4m lfo 4m flange .067 0 1k 12k lfo .2 rlpf aa .3 0 3 combn + play
;;;; plectra dances
\[1 8 irandz 4 N 0 6 irandz 8 N @ + $/ cyc] 3 X [40 80 160] .2 rand2z + * @ 1 [1.5 3 6]@ steps 0 saw [1.5 3 6] 0 impulse [3 1.5 .75] decay 8m lag * 3 1 nrand2s 5m itd +/ aa .33 0 4 combn + .1 * play
\[1 8 irandz 4 N 1 6 irandz 8 N @ + $/] 3 X [40 80 160] .2 rand2z + * cyc @ 1 [1.5 3 6]@ steps 0 saw 3k lpf [1.5 3 6] 0 impulse [3 1.5 .75] decay 8m lag * +/ aa .3 0 1 combn + .1 * play
;;;; plucking
\[6k lfnoise3 #[0 1 0] -3 #[4m 2c] 1 curves * 7 0 ilinrand 8 choff] #[.1 .2] pickz 1 8 ola 1 8 to 100 * 1/ aa 5 8k lpcombc .2 * 4m splayd play
\[6k lfnoise3 #[0 1 0] -3 #[4m 2c] 1 curves * 0 7 irand 8 choff] #[.1 .2 .4 .8]#[8 4 2 1] sumto1 wpickz 1 8 ola 1 8 to 100 * 1/ aa 5 8k lpcombc .2 * 4m splayd play
;;;; mouse control of filter
400 [1/1 5/4 7/5 7/4] 2m ldv * 0 saw brands pan2 +/ 200 12k xmousex lpf play
;;;; data anomalies
\[ 0 .2 rand 2 X white 1m 10m rand T @ 1 8 linrand ncyc 0 2 X white 1m 10m rand T $$ @ 1 3 rand ncyc ] 20 X flop @ $/ play
\[\[ 0 .2 rand 2 X white .1m 3m rand T @ 1 20 linrand ncyc 0 2 X white .1m 8m rand T $$ @ 1 20 rand ncyc ] 1 3 rand X $/ @ 1 4 rand ncyc ] 80 X flop @ $/ 2k 1 bpf play
\[
\[
0 .2 rand 2 X white .1m 8m linrand T ;; short bit of stereo random amplitude white noise
@ 1 10 linrand ncyc ;; cycled some number of times
0 2 X white .1m 8m linrand T ;; short bit of silence
$$ @ 1 10 rand ncyc ;; concatenate and cycle that
\[3h 8k xrand] 2X .3 bpf
] 1 3 rand X $/ @ 1 4 rand ncyc
] 1k X flop @ $/ aa 5c 4 apverb6 .5 fade2 play
\[\[
8m 80m xrand = s
\[
\[
[\[0 .2 rand 2X white .1m 8m linrand T @ 1 10 linrand ncyc]
\[\[1h 4k xrand] 2X 0 sinosc 0 3 ilinrand 2 * 1 + ^ 0 .2 rand * 1m 50m xrand T]
\[\[1h 1k xrand] 2X lfnoise3 0 .2 rand * 1m 50m xrand T]
] [.45 .35 .2] wpick !
0 2 X white .1m s xrand T ;; short bit of silence
$$ @ 1 10 rand ncyc ;; concatenate and cycle that
= x .1 coin \[ x \[.1 1 xrand 3h 4k xrxline hang] 2X .05 .7 xrand bpf 2 *]\[x] if
] 1 3 rand X $/ @ 1 12 xrand ncyc
[\[.1 2 xrand 3h 4k xrxline hang] \[3h 4k xrand]] [.4 .6] wpick 2X .05 .7 xrand bpf
] 1 3 rand X 1 12 xrand ncyc $/
= x .2 coin \[ .2 2h xrand urand sinosc x * ]\[x] if
] 1k X flop @ $/
.41 2X lfnoise3 3m * 3m flangep
.5 2X lfnoise3 3m * 3m flangep
aa 5c 4 apverb6 .5 fade2 .7 * tanh ] ! play
;;;; jam
\[ 256 [.5 .5 1 1 1 2] pick * [1/1 5/4 3/2 15/8 9/4 45/16 27/8] pick * brand 2X + 0 .05 .95 rand [`vsaw `pulse] pick ! #[0 1 0] -2 #[[2m 8m 32m] pick [.25 .5 1] pick] 1 curves = env env 2h 6k xrand * 1h + lpf2 env *] .1 1 2 ola aa .3 0 2 combn + .2 * play
;;;; MIDI control. see help for starting MIDI and connecting a device.
(1 1 2h 2k xmctl) 0 (1 2 2h 12k xmctl) sawf .2 * play
(1 1 50 2k xmctl) [1 1.501] * 0 saw +/ (1 2 2h 20k xmctl) (1 3 1 .01 xmctl) rlpf (1 4 .01 4 mctl) * softclip (1 5 .0001 .5 xmctl) * play
;;;; shepard tone
\[ 80 = t \[ t 16 16384 xline 0 sinosc ^7 t hanenv * .1 * 2X] 8 1 2 ola 4c 2 apverb6 t T> 1 fadein] ! play
;;;; narrow band filtered Crackle noise
\[
[0 1 1 0][2 5 2] 1 lines = e
80 2k xrand = rf
1 1.2 rand rf * = rf2
1.97 2 rand crackle .03 * 9 rf rf2 xline .2 resonz e * rpan2
] 1 1 2 ola play
;;;; harmonic swimming
\[
50 = f
20 = p
0 = z
60 0 -2c line = offset
\i[i f * 0 sinosc 2 2 10 nrands lfnoise1 2c * offset + 0 | * ] p X +/
] ! play
;;;; police state ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
4 = n
\[2c aa .1 + rand urand sinosc 0 600 rand * 1k 1.3k rand + 0 sinosc 1h 120 rand lfnoise3 .1 * * rpan2] n X +/
.4 2X lfnoise3 90 * 620 + lfnoise3 .3 2X lfnoise3 .15 * .18 + *
+
.3 .3 3 combn
] ! play
;;;; what was I thinking? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
.1 0 5c lfpulse 8 0 impulse 500 * * 2 decay 80 | 0 .157 lfnoise1 .4 * .5 + pulse 4c * .2 lfnoise1 2k * 24h + .2 rlpf = z
.6 z * = y
\[ \[ y .3 lfnoise1 .01 .06 bilin .06 1 combl ] 2X +/ ] 2X z +
] ! play
;;;; alien froggies ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
\hi[ 0 hi linrands 0 hi linrands -] = bilinrands
.2 bilinrands exp *\ 11 * 1 30 fold = rates
rates @ \rate [ .1 .9 rand = p rate .5 lfsaw 0 p 1/ bilin aa 1 < * = s s pi * sin sq 2h 3k xrand 0 sinosc * rpan2 ] ! = sounds
sounds .5 .25 5 2 oltx .05 *
] ! play
;;;; strummable guitar ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
#[52 57 62 67 71 76] = pch
0 1 mousex = mx
\i[
((mx i .1 .25 *+ > 0 -^i) 5c decay pink) (pch i at nnhz 1/) aa 4 combl
] pch size X splay 12k lpf .997 leakdc
] ! play
;;;; strummable 12 string guitar ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
#[52 57 62 67 71 76] = pch
0 1 mousex = mx
\i[
i .1 .25 *+ = pos
pch i at nnhz 1/ = period
((mx pos > 0 -^i) 5c decay pink) period aa 4 combl
((mx pos 15m + > 0 -^i) 5c decay pink) period half aa 4 combl +
] pch size X splay 12k lpf .997 leakdc
] ! play
;;;; bidirectional strummable guitar ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
#[52 57 62 67 71 76] = pch
pch 7 + = pch2
0 1 mousex = mx
\i[
mx i .1 .25 *+ > 0 -^i = trigger
(trigger 0 | 5c decay pink) pch i at nnhz 1/ aa 4 combl
(trigger neg 0 | 5c decay brown .5 *) pch2 i at nnhz 1/ half aa -4 combl +
] pch size X splay 12k lpf .997 leakdc
] ! play
;;;; strummable metals ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
15 = n
0 1 mousex = mx
n 3h 8k nlinrands = partials
2 1/5 ^ = interval
\i[
mx i .1 .25 *+ > -^ 0 replacehead = trigger
(trigger 5c decay pink 4c *) (partials interval i ^ *) 1 (n 1 4 nrands) klank
] 6X splay 12k lpf .997 leakdc .3 *
] ! play
;;;; Bach, WTC Prelude 1 in C ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
([[60 64 67 72 76][60 62 69 74 77][59 62 67 74 77][60 64 67 72 76]
[60 64 69 76 81][60 62 66 69 74][59 62 67 74 79][59 60 64 67 72]
[57 60 64 67 72][50 57 62 66 72][55 59 62 67 71][55 58 64 67 73]
[53 57 62 69 74][53 56 62 65 71][52 55 60 67 72][52 53 57 60 65]
[50 53 57 60 65][43 50 55 59 65][48 52 55 60 64][48 55 58 60 64]
[41 53 57 60 64][42 48 57 60 63][44 53 59 60 62][43 53 55 59 62]
[43 52 55 60 64][43 50 55 60 65][43 50 55 59 65][43 51 57 60 66]
[43 52 55 60 67][43 50 55 60 65][43 50 55 59 65][36 48 55 58 64]]
@ [0 2] 4 to $/ at @ 2 ncyc
[[36 48 53 57 60 65 60 57 60 57 53 57 53 50 53 50]
[36 47 67 71 74 77 74 71 74 71 67 71 62 65 64 62]
60 16 X]
$ $/ nnhz) = pitches
.2 = dur
pitches size 2 - dur * = susTime
2 dur * = fadeTime
pitches hang dur 1 steps 3c lag [0 1] + = freq
freq 0 saw susTime fadeTime fadeout @ 3 mum $ 1k lpf aa 5c 2 apverb6 + .2 *
] = bach-prelude
bach-prelude play
;;;; percussion solo in 10/8 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
[ 0 10 X
[9 0 0 0 0 0 0 0 0 0] aa
[9 0 0 2 0 0 0 2 0 0] aa
[9 0 0 2 0 0 0 2 0 2] aa
] $/ Z = intro
30 [
[9 0 0 7 0 2 0 7 0 0]
[9 2 0 7 0 2 0 7 0 0]
[9 0 0 7 0 2 0 7 0 2]
[9 0 0 7 2 2 0 7 0 0]
[9 0 0 7 0 2 2 7 2 0]
[9 2 2 7 2 2 2 7 2 2]
[9 2 2 7 2 2 2 7 0 0]
[9 0 0 7 2 2 2 7 0 0]
[9 0 4 0 4 0 4 0 4 0]
[9 0 0 4 0 0 4 0 4 0]
[9 0 2 7 0 2 0 7 0 0]
[9 0 0 7 0 0 0 7 0 0]
[9 7 7 0 0 2 2 2 0 0]
[9 0 0 0 0 0 0 0 0 0]
] npicks $/ Z = solo
[ [20 0 2 5 0 2 9
15 0 2 5 0 2 9
15 0 2 5 0 2] aaa [50]
] $/ Z = tehai
intro solo tehai 40 0z $ $ $ .1 * = sequence
((sequence 8 0 impulse iseq 2m .1 decay2 white) -1 ohz .6 ringz 2 * distort 8c *) ([[0 .04][7 7.04]] 12 / ohz 0 saw +/ 4 ohz lpf 7m *) +
] = mridangam
mridangam play
;;;; Berlin 1977 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
2 20 xmousex = clockRate clockRate 1/ = clockTime clockRate 0 impulse = clock
clock 16 0 pdiv = clock16
clock 16 -1 pdiv = clock16b
#[-12 -7 -5 0 2 5] 12 / exp2 pickz = roots
roots clock16 seq = root
roots clock16b seq = rootb
#[-5 0 3 2 0 7 3 -2] 12 / ohz cyc clock seq root * = freq
#[-12 -17 -24] 12 / ohz pickz clock16b seq rootb * = freq2
clock clockTime 5c * clockTime 2 * decay2 = env1
clock16b (clockTime 16 5c * *) (clockTime 16 2 * *) decay2 8c 2c *+ = amp16
env1 .1 2c *+ = amp
env1 .17 0 sinosc * 8h 14h *+ = filt
(freq 0 8c [0 .25] sinosc .45 .5 *+ lfpulse amp *) filt .15 rlpf
(freq2 0 .12 [0 .25] sinosc .48 .5 *+ lfpulse amp16 *) (.21 0 sinosc 4 8 *+ freq2 *) 7c rlpf +
aa [.2 .17] 0 2 combn (-1 1 mousey) fade2
] = berlin77
berlin77 play
;;;; random events ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
\in [#[0 1 .2 0] -2 #[4m .2 .8] 1 curves in * rpan2] = e
[
\[0 6 irand 200 600 *+ 0 sinosc .1 * e]
\[0 6 irand 100 300 *+ 0 .1 lfpulse .1 * e]
\[.05 white e]
\[.1 pink e]
\[.15 brown e]
] picks .2 1 2 ola
] ! play
;;;; random events - elaborated
\[
\in [#[0 1 .2 0] -2 #[4m .2 .8] 1 curves in * rpan2] = e
[
\[0]
\[0 16 irand 200 200 *+ 0 sinosc 40 lfnoise3 * .2 * e]
\[0 16 irand 100 100 *+ 0 .1 lfpulse 1k 8k xrand lpf .1 * e]
\[0 6 irand 50 50 *+ 0 .4 lfpulse 3h 2k xrand .3 rlpf .15 * e]
\[.05 white .002 .01 xrand aa flangep e]
\[.2 violet e]
\[.25 brown 2h 8h xrand lpf e]
] picks [.1 .2 .4 .8] [8 4 2 1] sumto1 wpicks 1 2 ola
.3 aa 4 alpasn
aa 3c .7 apverb6 -.2 fade2
] ! play
;;;; random events - elaborated 2
\[
\in [#[0 1 .2 0] -2 #[1m 6m rand .2 .8] 1 curves in * rpan2] = e
\in [#[0 1 1 0] -2 #[1m 6m rand 5c .1] 1 curves in * rpan2] = e2
[
\[0]
\[0 32 ilinrand 200 200 *+ 0 sinosc 20 80 xrand lfnoise3 * .2 * e]
\[0 32 ilinrand 100 100 *+ 0 .1 lfpulse 2k 9k xrand lpf .1 * e]
\[0 6 ilinrand 50 50 *+ 0 .4 lfpulse 5h 2k xrand .3 rlpf .15 * e]
] [4 4 3 2] sumto1 wpicks [.1 .2 .4 .8] [8 4 2 1] sumto1 wpicks 1 2 ola
.3 aa 4 alpasn
[
\[0]
\[.05 white .002 .01 xrand aa flangep e2 8k lpf]
\[.2 violet e2]
\[.25 brown 2h 8h xrand lpf e2]
] [4 4 3 2] sumto1 wpicks [.1 .2 .4 .8] [8 4 2 1] sumto1 wpicks 1 2 ola 1.5 * +
aa 3c .7 apverb6 -.2 fade2
] ! play
;;;; cave drops ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[ 16 0 impulse = clock 2k 12k randz clock seq 0 sinosc clock 2m 4c decay2 * 2 2c 5c nrands 0 2 combn 4 .2 0 line *] ! play
\[
12 24 1 xline 0 impulse = clock
2k 12k randz clock seq 0 sinosc clock 2m 4c decay2 * = x
x \[2c 5c xrand] 2X 0 2 combn
x \[2c 5c xrand] 2X 0 2 combn + 12 .2 0 line *
] ! play
;;;; beat subdivisions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; chromatic beat subdivisions
\[
.3 (1 12 irandz aa 1/ ba ?) 1 imps = t ;; lead's clock
t 4m .5 decay2 = e ;; lead's envelope
4 48 72 iwalkz nnhz = p ;; lead's pitches
.2 lfnoise3 5h 6k biexp = b ;; lead's brightness
p t seq 2c lag [0 .2] + 0 saw e b * 5h + .25 rlpf e .3 * * ;; lead
.2 #[.5 1] hangz 1 imps 4m .1 decay2 white + ;; snare
4 1 1 imps 4m 1 decay2 24 nnhz 0 sinosc * distort .7 * + ;; bass drum
aa 4c .5 apverb6 -.6 fade2 ;; reverb & wet/dry mix
] ! play
;; chromatic beat subdivisions - pulse wave
\[
.3 (1 12 irandz aa 1/ ba ?) 1 imps = t ;; lead's clock
t 4c 2 decay2 = e ;; lead's envelope
7 36 84 iwalkz nnhz = p ;; lead's pitches
.2 lfnoise3 5h 1k biexp = b ;; lead's brightness
p t seq 2c lag [0 .2] + 0 .2 pulse b .25 rlpf e .3 * * ;; lead
.2 #[.5 1] hangz 1 imps 4m .1 decay2 white + ;; snare
4 1 1 imps 4m 1 decay2 24 nnhz 0 sinosc * distort .7 * + ;; bass drum
aa 4c .5 apverb6 -.6 fade2 ;; reverb & wet/dry mix
] ! play
;; chromatic beat subdivisions - pulse wave - tuplets across two measures
\[
.3 (1 24 irandz aa 1/ *2 ba ?) 1 imps = t ;; lead's clock
t 4c 2 decay2 = e ;; lead's envelope
7 36 84 iwalkz nnhz = p ;; lead's pitches
.2 lfnoise3 5h 1k biexp = b ;; lead's brightness
p t seq 2c lag [0 .2] + 0 .2 pulse b .25 rlpf e .3 * * ;; lead
.2 #[.5 1] hangz 1 imps 4m .1 decay2 white + ;; snare
4 1 1 imps 4m 1 decay2 24 nnhz 0 sinosc * distort .7 * + ;; bass drum
aa 4c .5 apverb6 -.6 fade2 ;; reverb & wet/dry mix
] ! play
;; modal beat subdivisions
\[
#[0 2 4 5 7 9 10 12] = mixolydian
.3 (1 12 irandz aa 1/ ba ?) 1 imps = t ;; lead's clock
t 4m .5 decay2 = e ;; lead's envelope
3 14 iwalk2z mixolydian degkey 60 + nnhz = p ;; lead's pitches
.2 lfnoise3 5h 6k biexp = b ;; lead's brightness
(p t seq 2c lag [0 .2] +) 0 saw (e b * 5h +) .25 rlpf e .3 * * ;; lead
aa .25 0 2 combn .6 * + ;; lead's echo
.2 #[.5 1] hangz 1 imps 4m .1 decay2 white + ;; snare
4 1 1 imps 4m 1 decay2 24 nnhz 0 sinosc * distort .7 * + ;; bass drum
aa 4c .5 apverb6 -.6 fade2 ;; reverb & wet/dry mix
] ! play
;; {de,a}ccelerandi
\[
#[0 2 3 5 7 9 10 12] = dorian
.3 (\[(4 12 irand) 1 (.2 rand2 exp2) ngrowz sumto1] inf X $/) 1 imps = t ;; lead's clock
t 4m .5 decay2 = e ;; lead's envelope
3 14 iwalk2z dorian degkey 60 + nnhz = p ;; lead's pitches
.2 lfnoise3 5h 6k biexp = b ;; lead's brightness
(p t seq 2c lag [0 .2] +) 0 saw (e b * 5h +) .25 rlpf e .3 * * ;; lead
aa .25 0 2 combn .6 * + ;; lead's echo
.2 #[.5 1] hangz 1 imps 4m .1 decay2 white + ;; snare
4 1 1 imps 4m 1 decay2 24 nnhz 0 sinosc * distort .7 * + ;; bass drum
aa 4c .5 apverb6 -.6 fade2 ;; reverb & wet/dry mix
] ! play
;;;; dancing shadows ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\[
;; create an algorhythmic rhythm pattern
\[
[ ;; choose one of the following patterns at random
[2.0 0.0 2.0 0.0 1.0 0.0 1.0 1.0] 2 ncyc
[2.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0] 2 ncyc
[2.0 0.0 1.0 1.0 1.0 1.0 1.0 0.0] 2 ncyc
[2.0 0.3 0.3 1.0 0.3 0.3 1.0 0.3] 2 ncyc
[2.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0] 2 ncyc
[2.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0]
[2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0]
[0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0] 2 ncyc
[1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0] 2 ncyc
[1.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0] 2 ncyc
[1.0 0.0 0.0 1.0 0.0 1.0 0.0 0.0] 2 ncyc
[1.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0] 2 ncyc
[0.0 0.0 1.0 1.0 0.0 0.0 1.0 1.0] 2 ncyc
[0.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0] 2 ncyc
[2.0 0.0 1.0 1.0 0.0 1.0 0.0 0.0] 2 ncyc
[0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0] 2 ncyc
[2.0 1.0 0.0 1.0 0.0 0.0 1.0 0.0] 2 ncyc
[1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0
0.0 1.0 0.0 0.0 1.0 0.0 1.0 0.0]
] picks $/ Z
] = pat
\[
5 5.5 rand = rate
rate 0 impulse = trig
5 0 12 nrandz sort 12 add = notes
2 0 7 iwalkz notes degkey 84 + nnhz .3 coinz seq = melody
20 = n
\[
0 38 irand notes degkey 24 + nnhz = freq
pat trig iseq (40 sqrt 6 * freq sqrt n * /) * 5m 6 rate / decay2 = env
freq 0 sinosc 0 .5 rand lfnoise1 * env * rpan2
] n X +/
2m white (melody trig seq 5c lag) 4m .4 formlet
+
] 45 2 .95 2 oltx
] ! play
;;;; native algorhythms ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;