;Written by Iain McCurdy, 2009
;Modified for QuteCsound by René, March 2011
;Tested on Ubuntu 10.04 with csound-float 5.13.0 and QuteCsound svn rev 817
;Notes on modifications from original csd:
; Add tables for exp slider
; INIT instrument added
;my flags on Ubuntu: -odac -b1024 -B2048 -+rtaudio=alsa -+rtmidi=null -m0
sr = 44100 ;SAMPLE RATE
ksmps = 100 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL
nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO)
0dbfs = 1 ;MAXIMUM AMPLITUDE REGARDLESS OF BIT DEPTH
giExp1 ftgen 0, 0, 129, -25, 0, 0.001, 128, 1.0 ;TABLE FOR EXP SLIDER
instr 10 ;GUI
ktrig metro 10
if (ktrig == 1) then
gkamp invalue "Amplitude"
kdettack invalue "Dettack"
gkdettack tablei kdettack, giExp1, 1
outvalue "Dettack_Value", gkdettack
gknum invalue "NumbPart"
gkdamp invalue "Damping"
gkmaxshake invalue "EnergyFB"
endif
endin
instr 1
kSwitch changed gkamp, gkdettack, gknum, gkdamp, gkmaxshake ;GENERATE A MOMENTARY '1' PULSE IN OUTPUT 'kSwitch' IF ANY OF THE SCANNED INPUT VARIABLES CHANGE. (OUTPUT 'kSwitch' IS NORMALLY ZERO)
if kSwitch=1 then
reinit BEGIN
endif
BEGIN:
asandpaper sandpaper i(gkamp), i(gkdettack) , i(gknum), i(gkdamp), i(gkmaxshake)
rireturn
outs asandpaper, asandpaper
endin
instr 2 ;INIT
outvalue "Amplitude" , 0.03
outvalue "Dettack" , 0.34
outvalue "NumbPart" , 500
outvalue "Damping" , -1
outvalue "EnergyFB" , 0
endin
;INSTR | START | DURATION
i 10 0 3600 ;GUI
i 2 0 0.1 ;INIT
1159
84
520
484
true
241
226
185
2
2
513
481
{aa607456-d368-4d59-8497-d16d608404c3}
true
0
0
center
Liberation Sans
18
3
0
0
0
147
154
255
border
5
2
8
112
220
30
{640b50b7-7200-4f81-8394-89d9843ae939}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
Amplitude
8
91
500
27
{5585fa6f-0f63-4ac3-bf1b-809c2b1d9134}
true
0
0
0.00000000
1.00000000
0.03000000
lin
continuous
-1.00000000
false
Amplitude
448
112
60
30
{b731b52e-e14a-476a-a583-f3b2bd885539}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
8
43
120
30
{04d44ebe-12eb-4bb0-a3f5-9e4fd3e7830e}
true
0
0
event
1.00000000
Scrape !
/
i 1 0 -1
false
false
8
158
220
30
{1fee3c20-99d2-4c60-baa7-669d23492f06}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
Dettack
8
137
500
27
{f5ebacc2-9a31-48e3-adb0-3cb090aec444}
true
0
0
0.00000000
1.00000000
0.34000000
lin
continuous
-1.00000000
false
Dettack_Value
448
158
60
30
{221d17eb-f6ee-4286-a97f-e6bc5c0a1749}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
8
204
220
30
{bce7cccd-a303-4a57-af94-fd50cf914991}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
NumbPart
8
183
500
27
{aaf82558-9229-4d61-8190-0286f3764e87}
true
0
0
0.00010000
1000.00000000
500.00000000
lin
continuous
-1.00000000
false
NumbPart
448
204
60
30
{1cd1723d-bcd9-44df-9f08-9d8191f03601}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
8
250
220
30
{0f0e06ef-104c-459c-8a8b-3bf531321341}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
Damping
8
229
500
27
{4a2f399c-8a7b-40cf-84ab-839e1d7012f5}
true
0
0
-5.00000000
0.05000000
-1.00000000
lin
continuous
-1.00000000
false
Damping
448
250
60
30
{62bd5b38-121f-4382-8c01-02c75edf2237}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
8
296
220
30
{3967c371-a6b0-46ca-a51c-5a44bcad618d}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
EnergyFB
8
275
500
27
{fa94c4bb-3469-4fbf-9096-f6f7c115eb69}
true
0
0
0.00000000
1.00000000
0.00000000
lin
continuous
-1.00000000
false
EnergyFB
448
296
60
30
{1f01b045-b441-4f44-8dfe-884fb64aba2a}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
6
319
507
161
{4dd9a56f-89f0-4d88-aacf-1fcb6f6145fd}
true
0
0
left
Liberation Sans
14
3
0
0
0
255
255
255
noborder
1
1