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
|
<CsoundSynthesizer>
<CsOptions>
-odac
</CsOptions>
<CsInstruments>
ksmps = 64
nchnls = 2
0dbfs = 1
seed 0
#include "wavetables.udo"
opcode oscbank, a, kkkkiiiiio
kfreq, kamp, kfreqstepmult, kampstepmult, ibands, iwidthamp, icentreamp, ihalfing, imaxrandrate, iband xin
aosc oscil kamp, min:k(kfreq, sr / 2)
aosc pdhalfy aosc, ihalfing
kwidth = abs:k(oscil:k(iwidthamp, random(0.1, imaxrandrate), gifnSine, random(0, 1)))
kcentre = abs:k(oscil:k(icentreamp, random(0.1, imaxrandrate), gifnSine, random(0, 1)))
aosc pdclip aosc, kwidth, kcentre
if (iband < ibands) then
arecurse oscbank kfreq * kfreqstepmult, kamp * kampstepmult, kfreqstepmult, kampstepmult, ibands, iwidthamp, icentreamp, ihalfing, imaxrandrate, iband + 1
aosc += arecurse
endif
xout aosc
endop
instr playback
ixstart = p4
iystart = p5
ixend = p6
iyend = p7
icolour = p8
ivariation = p9
iwidth = p10
iheight = p11
istartfreq = (ixstart * 100) + 20
iendfreq = (ixend * 100) + 20
kfreq linseg istartfreq, p3, iendfreq
istartfstep = iystart + 1.3
iendfstep = iyend + 1.3
kfreqstepmult linseg istartfstep, p3, iendfstep
aamp linseg 0, p3 * 0.05, 1, p3 * 0.9, 1, p3 * 0.05, 0
ioscillators = max(1, int(100 / active:i("playback")))
aout oscbank kfreq, 0.1, kfreqstepmult, random(0.9, 0.99), ioscillators, iwidth, iheight, icolour, ivariation * 2
aout *= aamp * 0.5
kpan linseg iystart, p3, iyend
aL, aR pan2 aout, kpan
outs aL, aR
endin
</CsInstruments>
<CsScore>
f0 36000
</CsScore>
</CsoundSynthesizer>
|