| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
; Audio out Audio in |
| 5 |
-odac ;;;RT audio out |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o wgpluck.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; by Menno Knevel 2021 |
| 12 |
|
| 13 |
sr = 44100 |
| 14 |
ksmps = 32 |
| 15 |
nchnls = 2 |
| 16 |
0dbfs = 1 |
| 17 |
|
| 18 |
instr 1 |
| 19 |
|
| 20 |
icps = 220 |
| 21 |
iamp = 1 |
| 22 |
kpick = 0.5 |
| 23 |
iplk = 0 |
| 24 |
idamp = p4 |
| 25 |
ifilt = p5 |
| 26 |
ichoice = p6 |
| 27 |
|
| 28 |
if ichoice == 1 then |
| 29 |
axcite = 0 ; no exciter signal |
| 30 |
else |
| 31 |
axcite diskin2 "fox.wav", 1 ; use the fox as exciter |
| 32 |
axcite *= .15 ; but lower amplitude |
| 33 |
endif |
| 34 |
|
| 35 |
apluck wgpluck icps, iamp, kpick, iplk, idamp, ifilt, axcite |
| 36 |
apluck dcblock2 apluck ; gets rid of DC offset |
| 37 |
outs apluck, apluck |
| 38 |
|
| 39 |
endin |
| 40 |
|
| 41 |
</CsInstruments> |
| 42 |
<CsScore> |
| 43 |
f 1 0 16384 10 1 ; sine wave. |
| 44 |
s |
| 45 |
; damp filter choice |
| 46 |
i 1 0 8 10 1000 1 |
| 47 |
i 1 + 8 30 10 1 |
| 48 |
s |
| 49 |
i 1 0 8 10 1000 2 |
| 50 |
i 1 + 8 30 10 2 |
| 51 |
e |
| 52 |
</CsScore> |
| 53 |
</CsoundSynthesizer> |