| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac ;;;RT audio out |
| 5 |
;-iadc ;;;uncomment -iadc if RT audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o ATSreadnz.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 |
; by Menno Knevel - 2023 |
| 17 |
|
| 18 |
ires system_i 1,{{ atsa Mathews.wav Mathews.ats }} ; default settings |
| 19 |
|
| 20 |
instr 1 |
| 21 |
|
| 22 |
ktime line 0, p3, 2 |
| 23 |
kenergy ATSreadnz ktime, "Mathews.ats", p4 ; return energy from band p4 |
| 24 |
anoise randi kenergy, 5000 |
| 25 |
outs anoise *p5, anoise *p5 ; compensate amplitude differences! |
| 26 |
endin |
| 27 |
|
| 28 |
</CsInstruments> |
| 29 |
<CsScore> |
| 30 |
; 3 different energy bands, compensated by different amplitude values |
| 31 |
i 1 0 10 6 .015 ; loud!! |
| 32 |
i 1 11 10 12 .4 ; less energy in this band |
| 33 |
i 1 22 10 17 1 ; and even less... |
| 34 |
e |
| 35 |
|
| 36 |
</CsScore> |
| 37 |
</CsoundSynthesizer> |