;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.5, 128, 20000.0 ;TABLE FOR EXP SLIDER
instr 10 ;GUI
ktrig metro 10
if (ktrig == 1) then
gkamp invalue "Amplitude"
kfreq invalue "Frequency"
gkfreq tablei kfreq, giExp1, 1
outvalue "Frequency_Value", gkfreq
gkbeans invalue "NbBeans"
gkdamp invalue "Damping"
gkdecay invalue "Decay"
gkoutgain invalue "OutGain"
gktimes invalue "NbShakes"
endif
endin
instr 1
kSwitch changed gkdecay ;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:
ashaker shaker gkamp, gkfreq, gkbeans, gkdamp, gktimes , i(gkdecay)
rireturn
outs ashaker * gkoutgain, ashaker * gkoutgain
endin
instr 2 ;INIT
outvalue "Amplitude" , 0.2
outvalue "Frequency" , 0.0653
outvalue "NbBeans" , 30
outvalue "Damping" , 0.99
outvalue "NbShakes" , 5
outvalue "Decay" , 0
outvalue "OutGain" , 0.5
endin
;INSTR | START | DURATION
i 10 0 3600 ;GUI
i 2 0 0.1 ;INIT
801
282
518
557
true
241
226
185
2
2
512
553
{aa607456-d368-4d59-8497-d16d608404c3}
true
0
0
center
Liberation Sans
18
3
0
0
0
147
154
255
border
5
2
8
69
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
48
500
27
{5585fa6f-0f63-4ac3-bf1b-809c2b1d9134}
true
0
0
0.00000000
1.00000000
0.20000000
lin
continuous
-1.00000000
false
Amplitude
448
69
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
8
120
30
{04d44ebe-12eb-4bb0-a3f5-9e4fd3e7830e}
true
0
0
event
1.00000000
Shake !
/
i 1 0 -1
false
false
8
115
220
30
{1fee3c20-99d2-4c60-baa7-669d23492f06}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
Frequency
8
94
500
27
{f5ebacc2-9a31-48e3-adb0-3cb090aec444}
true
0
0
0.00000000
1.00000000
0.77000000
lin
continuous
-1.00000000
false
Frequency_Value
448
115
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
161
220
30
{bce7cccd-a303-4a57-af94-fd50cf914991}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
NbBeans
8
140
500
27
{aaf82558-9229-4d61-8190-0286f3764e87}
true
0
0
1.00000000
500.00000000
177.64600000
lin
continuous
-1.00000000
false
NbBeans
448
161
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
207
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
186
500
27
{4a2f399c-8a7b-40cf-84ab-839e1d7012f5}
true
0
0
0.98000000
1.00000000
0.98000000
lin
continuous
-1.00000000
false
Damping
448
207
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
253
220
30
{3967c371-a6b0-46ca-a51c-5a44bcad618d}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
Decay
8
232
500
27
{fa94c4bb-3469-4fbf-9096-f6f7c115eb69}
true
0
0
0.00000000
1.00000000
0.00000000
lin
continuous
-1.00000000
false
Decay
448
253
60
30
{1f01b045-b441-4f44-8dfe-884fb64aba2a}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
5
355
507
196
{4dd9a56f-89f0-4d88-aacf-1fcb6f6145fd}
true
0
0
left
Liberation Sans
14
3
0
0
0
255
255
255
noborder
1
1
NbShakes
278
274
50
30
{73b6e3dd-b842-4f01-9d9b-5a8f495a4dca}
true
0
0
right
Liberation Sans
14
0
0
0
255
255
255
1.00000000
0
50
false
5
134
275
141
30
{0ff7e4d8-7aa2-4580-992a-1085433af7a3}
true
0
0
right
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
8
338
220
30
{bb8274f3-5c02-4c77-910c-7af6261b3bdc}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
OutGain
8
317
500
27
{8060c436-34f2-4247-9dc1-8c1a551bb6c6}
true
0
0
0.00000000
10.00000000
0.50000000
lin
continuous
-1.00000000
false
OutGain
448
338
60
30
{54cc0b6c-d8c5-41a7-96ae-7b54ef47ec42}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1