| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac --limiter=0.95 ;;;realtime audio out & and limit loud sounds |
| 5 |
;-iadc ;;;uncomment -iadc if realtime audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o scans.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
sr=44100 |
| 12 |
ksmps=32 |
| 13 |
nchnls=2 |
| 14 |
0dbfs=1 |
| 15 |
|
| 16 |
; example by Menno Knevel 2024 |
| 17 |
|
| 18 |
instr 1 |
| 19 |
|
| 20 |
a0 = 0 ; no audio input |
| 21 |
;scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id |
| 22 |
scanu 1, .01, 6, 2, 3, 4, 5, 2, .1, .1, -.01, .1, .5, 0, 0, a0, 1, 2 |
| 23 |
|
| 24 |
if (p6 == 0) then |
| 25 |
asig scans ampdb(p4), cpspch(p5), 7, 2 ; exponential trajectory |
| 26 |
elseif (p6 == 1) then |
| 27 |
asig scans ampdb(p4), cpspch(p5), 77, 2 ; linear trajectory |
| 28 |
else |
| 29 |
asig scans ampdb(p4), cpspch(p5), 777, 2 ; linear trajectory but only a small portion |
| 30 |
endif |
| 31 |
|
| 32 |
asig *= .000025 ; compensate volume due to 0dbfs = 1 |
| 33 |
outs asig, asig |
| 34 |
endin |
| 35 |
|
| 36 |
</CsInstruments> |
| 37 |
<CsScore> |
| 38 |
f1 0 128 7 0 64 1 64 0 |
| 39 |
f2 0 128 -7 1 128 1 |
| 40 |
f3 0 16384 -23 "string-128.matrxB" ; binary matrix, can be found in the examples folder of the manual |
| 41 |
f4 0 128 -7 0 128 2 |
| 42 |
f5 0 128 -7 1 128 1 |
| 43 |
f6 0 128 -7 0 128 0 |
| 44 |
f7 0 128 -5 .001 128 128 ; exponential trajectory |
| 45 |
f77 0 128 -7 0 128 128 ; linear trajectory |
| 46 |
f777 0 128 -7 10 128 20 ; linear trajectory but only a small portion |
| 47 |
|
| 48 |
i1 0 9 90 6.00 0 |
| 49 |
i1 9 12 90 7.00 0 |
| 50 |
i1 13 17 90 5.00 0 |
| 51 |
i1 31 9 90 6.00 1 |
| 52 |
i1 40 12 90 7.00 1 |
| 53 |
i1 44 17 90 5.00 1 |
| 54 |
i1 62 9 90 6.00 2 |
| 55 |
i1 71 12 90 7.00 2 |
| 56 |
i1 74 17 90 5.00 2 |
| 57 |
e |
| 58 |
</CsScore> |
| 59 |
</CsoundSynthesizer> |