-
Notifications
You must be signed in to change notification settings - Fork 0
/
#boot.tidal#
executable file
·131 lines (130 loc) · 5.02 KB
/
#boot.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
let -- fx
bps x = cps (x/2)
adsr' a d s r = attack a # decay d # sustain s # release r
dly' l t f = delay l # delaytime t # delayfeedback f
gco' g c o = gain g # cut c # orbit o
scc' s c c' = shape s # coarse c # crush c'
lpf' c r = cutoff c # resonance r
bpf' f q = bandf f # bandq q
hpf' c r = hcutoff c # hresonance r
spa' s a = speed s # accelerate a
rvb' r s = room r # size s
io' i o = begin i # end o
trem' r d = tremolorate r # tremolodepth d
phsr' r d = phaserrate r # phaserdepth d
alv' = gain 0
-- sequence generators
r = run
ri a = rev (r a) -- run inverted
c = choose
odd a = (((r a) + 1) * 2) - 1 -- run of odd numbers
even a = ((r a) + 1) * 2 -- run of even numbers
codd a = c (patToList (odd a)) -- choose odd
ceven a = c (patToList (even a)) -- choose even
oddi a = rev (odd a) -- odd inverted
eveni a = rev (even a) -- even inverted
coddi a = rev (codd a) -- choose odd inverted
ceveni a = rev (ceven a) -- choose even inverted
-- transitions
j n = jumpIn' n
j2 = jumpIn' 2
j4 = jumpIn' 4
j8 = jumpIn' 8
j16 = jumpIn' 16
xf n = xfadeIn n
xf2 = xfadeIn 2
xf4 = xfadeIn 4
xf8 = xfadeIn 8
xf16 = xfadeIn 16
cl n = clutchIn n
cl2 = clutchIn 2
cl4 = clutchIn 4
cl8 = clutchIn 8
cl16 = clutchIn 16
swash = superwash
-- math/signal functions
sin = sine
cos = cosine
sq = square
pulse w = sig $ \t -> if ((snd $ properFraction t) >= w) then 1.0 else 0.0
pulse' w = liftA2 (\a b -> if (a>=b) then 1.0 else 0.0) saw w
pw = pulse
pw' = pulse'
scale' from to p = (p*to - p*from) + from
sc' = scale'
sc = scale
scx = scalex
sinf f = fast f $ sin -- sine at freq
cosf f = fast f $ cos -- cosine at freq
trif f = fast f $ tri -- triangle at freq
sawf f = fast f $ saw -- saw at freq
sqf f = fast f $ sq -- square at freq
pwf w f = fast f $ pw w -- pulse at freq
pwf' w f = fast f $ pw' w -- pulse' at freq
randf f = fast f $ rand -- rand at freq
ssin i o = sc i o sin -- scaled sine
scos i o = sc i o cos -- scaled cosine
stri i o = sc i o tri -- scaled triangle
ssaw i o = sc i o saw -- scaled saw
ssq i o = sc i o sq -- scaled square
spw i o w = sc i o pw w -- scaled pulse
spw' i o w = sc i o pw' w -- scaled pulse'
srand i o = sc i o rand -- scaled rand
sxsin i o = scx i o sin -- scaled exponential sine
sxcos i o = scx i o cos -- scaled exponential cosine
sxtri i o = scx i o tri -- scaled exponential triangle
sxsaw i o = scx i o saw -- scaled exponential saw
sxsq i o = scx i o sq -- scaled exponential sqaure
sxpw i o w = scx i o pw w -- scaled exponential pulse
sxpw' i o w = scx i o pw' w -- scaled exponential pulse'
sxrand i o = scx i o rand -- scaled exponential rand
ssinf i o f = fast f $ ssin i o -- scaled sine at freq
scosf i o f = fast f $ scos i o -- scaled cosine at freq
strif i o f = fast f $ stri i o -- scaled triangle at freq
ssawf i o f = fast f $ ssaw i o -- scaled saw at freq
ssqf i o f = fast f $ ssq i o -- scaled square at freq
spwf i o w f = fast f $ spw i o w -- scaled pulse at freq
srandf i o f = fast f $ srand i o -- scaled rand at freq
sxsinf i o f = fast f $ sxsin i o -- scaled exponential sine at freq
sxcosf i o f = fast f $ sxcos i o -- scaled exponential cosine at freq
sxtrif i o f = fast f $ sxtri i o -- scaled exponential triangle at freq
sxsawf i o f = fast f $ sxsaw i o -- scaled exponential saw at freq
sxsqf i o f = fast f $ sxsq i o -- scaled exponential square at freq
sxpwf i o w f = fast f $ sxpw i o w -- scaled exponential pulse at freq
sxpwf' i o w f = fast f $ sxpw' i o w -- scaled exponential pulse' at freq
sxrandf i o f = fast f $ sxrand i o -- scaled exponential random at freq
ssin' i o = sc' i o sin -- scaled' sine
scos' i o = sc' i o cos -- scaled' cosine
stri' i o = sc' i o tri -- scaled' triangle
ssaw' i o = sc' i o saw -- scaled' saw
ssq' i o = sc' i o sq -- scaled' square
srand' i o = sc' i o rand -- scaled' rand
ssinf' i o f = fast f $ ssin' i o -- scaled' sine at freq
scosf' i o f = fast f $ scos' i o -- scaled' cosine at freq
strif' i o f = fast f $ stri' i o -- scaled' triangle at freq
ssawf' i o f = fast f $ ssaw' i o -- scaled' saw at freq
ssqf' i o f = fast f $ ssq' i o -- scaled' square at freq
srandf' i o f = fast f $ srand' i o -- scaled' rand at freq
-- extreme mode
str = striate
strL = striateL
str' = striate'
strL' = striateL'
fE = foldEvery
ev = every
oa = offadd
sp = speed
ac = accelerate
sl = slow
fa = fast
i = id
g = gain
o = orbit
u = up
(>) = (#)
deg = degrade
degBy = degradeBy
disc = discretise
--more
half = slow 2
double = fast 2