;Written by Iain McCurdy,
;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:
; 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 CYCLE
nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO)
0dbfs = 1 ;MAXIMUM AMPLITUDE REGARDLESS OF BIT DEPTH
instr 10 ;GUI
ktrig metro 10
if (ktrig == 1) then
gkK invalue "Stiffness"
gkT30 invalue "DT30"
gkb invalue "HFLoss"
gkpos invalue "Pos"
gkvel invalue "Vel"
gkscan invalue "Scan"
gkwid invalue "Width"
gkOutGain invalue "OutGain"
gkbcL invalue "bcL"
gkbcR invalue "bcR"
endif
endin
instr 1
kSwitch changed gkK, gkT30, gkb, gkpos, gkvel, gkwid ;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 ;IF kSwitch=1, I.E. IF ANY OF THE ABOVE LISTED PARAMETERS HAVE CHANGED...
reinit START ;...PERFORM AN I-RATE PASS BEGINNING FROM THE GIVEN LABEL
endif ;END OF CONDITIONAL BRANCHING
START: ;A LABEL
; LEFT | RIGHT | STIFFNESS | HIGH- | SCANNING | 30dB | STRIKE | STRIKE | WIDTH
; BOUNDARY | BOUNDARY | | -FREQUENCY | SPEED | DECAY | POSITION | VELOCITY | OF
; CONDITION | CONDITION | | LOSS | | TIME | | | STRIKE
ares barmodel gkbcL+1, gkbcR+1, i(gkK), i(gkb), gkscan, i(gkT30), i(gkpos), i(gkvel), i(gkwid)
rireturn
outs ares * gkOutGain, ares * gkOutGain ;SEND AUDIO TO OUTPUTS. RESCALE WITH VARIBLE FROM 'OUTPUT GAIN' SLIDER
endin
instr 2 ;INIT
outvalue "Stiffness" , 130
outvalue "DT30" , 20
outvalue "HFLoss" , .0775
outvalue "Pos" , .837
outvalue "Vel" , 16000
outvalue "Scan" , 0.775
outvalue "Width" , 0.0156
outvalue "OutGain" , 0.6
outvalue "bcL" , 1
outvalue "bcR" , 1
endin
;INSTR | START | DURATION
i 10 0 3600 ;GUI
i 2 0 0.1 ;INIT
647
284
963
506
true
241
226
185
2
2
512
500
{aa607456-d368-4d59-8497-d16d608404c3}
true
0
0
center
Liberation Sans
18
3
0
0
0
147
154
255
border
5
2
128
8
100
30
{24979132-c53f-4414-ac6b-6b4f503ecfe8}
true
0
0
event
1.00000000
Re-Strike
/
i 1 0 -1
false
false
8
74
220
30
{640b50b7-7200-4f81-8394-89d9843ae939}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
Stiffness
8
57
500
27
{5585fa6f-0f63-4ac3-bf1b-809c2b1d9134}
true
0
0
0.00000000
1000.00000000
130.00000000
lin
continuous
-1.00000000
false
Stiffness
448
74
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
109
220
30
{989564b0-b237-4c22-9d10-b76b7c7e4e4c}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
DT30
8
92
500
27
{84cd664e-fb67-4dd4-aac3-adbcf2c81fe6}
true
0
0
0.10000000
30.00000000
20.00000000
lin
continuous
-1.00000000
false
DT30
448
109
60
30
{ba8682a6-056f-4432-946b-4e3ee82c47a1}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
8
143
200
30
{76044785-79c4-4202-b7ce-07aee4868219}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
HFLoss
8
126
500
27
{0f952e77-ff9b-4621-b1af-23252bb9c2a6}
true
0
0
0.00001000
10.00000000
0.07750000
lin
continuous
-1.00000000
false
HFLoss
448
143
60
30
{7b92c0ca-2fe8-4b4f-9ed0-f618c1b3cb5c}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
8
178
220
30
{ca41878c-b561-486b-9cf9-d0da6b48448b}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
Pos
8
161
500
27
{2800fb88-347a-402c-88ed-fc97af6a36be}
true
0
0
0.00400000
0.99600000
0.83700001
lin
continuous
-1.00000000
false
Pos
448
178
60
30
{5d1ba94c-536a-4178-be6c-c0d9d2f75e3d}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
8
213
220
30
{cdd71125-b224-471a-9c41-9c05d8d28d0c}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
Vel
8
196
500
27
{7a83bb1f-f25d-47e0-bf2d-9c5c86e0756b}
true
0
0
0.00000000
30000.00000000
16000.00000000
lin
continuous
-1.00000000
false
Vel
448
213
60
30
{7f8d2709-bf8c-46ab-83f0-36fc620b0d56}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
8
248
220
30
{9519d46e-b6e4-422e-8653-ae5db12b1c04}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
Scan
8
231
500
27
{0f9b569d-7f5b-4540-a415-6fd6762f6fe9}
true
0
0
0.00000000
100.00000000
0.77499998
lin
continuous
-1.00000000
false
Scan
448
248
60
30
{df4e20a1-b9a6-46ca-bb02-911779f6b4b5}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
8
282
220
30
{1089c148-0c3a-497a-a8d5-a62e3d62ff54}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
Width
8
265
500
27
{cb90b71f-234b-4c3e-875b-ce04075ae3ee}
true
0
0
0.00010000
1.00000000
0.01560000
lin
continuous
-1.00000000
false
Width
448
282
60
30
{54d08872-94cf-49c9-b64f-605fddc65867}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
8
317
220
30
{8c81bb50-0c7b-4902-9178-d05f83831ade}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
OutGain
8
300
500
27
{6ef7cd84-2fc3-4cb0-b69d-4d037f7406af}
true
0
0
0.00000000
5.00000000
0.60000002
lin
continuous
-1.00000000
false
OutGain
448
317
60
30
{9481489d-99dd-43af-8282-21a31584dd71}
true
0
0
right
Liberation Sans
9
3
0
0
0
255
255
255
noborder
1
1
515
2
440
500
{74928ed2-b701-4668-9a11-74763d317e9b}
true
0
0
center
Liberation Sans
18
3
0
0
0
147
154
255
border
5
2
517
25
436
473
{d4bdb5ce-87d8-4c8c-9c64-40ec2eed6f5a}
true
0
0
left
Liberation Sans
14
3
0
0
0
255
255
255
noborder
1
1
8
8
120
30
{e40c02c1-81d8-4459-938d-9e77ae8e081e}
true
0
0
event
1.00000000
Note On / Off
/
i 1 0 -1
true
false
0
353
140
30
{06b97e22-13e9-494f-b2a3-ff8e25b47c7b}
true
0
0
right
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
236
353
140
30
{7c0236bb-4cdd-464c-966e-170c96d6ebd3}
true
0
0
right
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1
bcL
140
353
100
30
{15f676c6-5dd8-4142-a92f-e203d44762d1}
true
0
0
Clamped
0
Pivoting
1
Free
2
1
false
bcR
376
353
100
30
{001204b7-bbc6-4ce7-8211-a1c172ef0c29}
true
0
0
Clamped
0
Pivoting
1
Free
2
1
false
20
392
472
100
{a21b6db2-5090-4663-b2de-b6685e7f2d95}
true
0
0
center
Liberation Sans
18
3
0
0
0
255
255
255
border
10
2