| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac ;;;realtime audio out |
| 5 |
;-iadc ;;;uncomment -iadc if realtime audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o lowresx.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 |
instr 1 |
| 17 |
|
| 18 |
kres = p4 |
| 19 |
inumlayer = 4 |
| 20 |
|
| 21 |
kenv linseg 0, p3*.1, 1, p3*.8, 1, p3*.1, 0 ;envelope |
| 22 |
asig vco .3 * kenv, 220, 1 ;sawtooth |
| 23 |
kcut line 30, p3, 1000 ;note: kcut is not in Hz |
| 24 |
alx lowresx asig, kcut, kres, inumlayer ;note: kres is not in dB |
| 25 |
aout balance alx, asig ;avoid very loud sounds |
| 26 |
outs aout, aout |
| 27 |
|
| 28 |
endin |
| 29 |
</CsInstruments> |
| 30 |
<CsScore> |
| 31 |
;sine wave |
| 32 |
f 1 0 16384 10 1 |
| 33 |
|
| 34 |
i 1 0 5 1 |
| 35 |
i 1 + 5 3 |
| 36 |
i 1 + 5 20 |
| 37 |
e |
| 38 |
</CsScore> |
| 39 |
</CsoundSynthesizer> |