| 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 adds.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 |
; add unipolar square to oscil |
| 18 |
kamp = p4 |
| 19 |
kcps = 1 |
| 20 |
itype = 3 |
| 21 |
|
| 22 |
klfo lfo kamp, kcps, itype |
| 23 |
printk2 klfo |
| 24 |
asig oscil 0.7, 440+klfo, 1 |
| 25 |
outs asig, asig |
| 26 |
|
| 27 |
endin |
| 28 |
|
| 29 |
|
| 30 |
</CsInstruments> |
| 31 |
<CsScore> |
| 32 |
;sine wave. |
| 33 |
f 1 0 32768 10 1 |
| 34 |
|
| 35 |
i 1 0 2 1 ;adds 1 Hz to frequency |
| 36 |
i 1 + 2 10 ;adds 10 Hz to frequency |
| 37 |
i 1 + 2 220 ;adds 220 Hz to frequency |
| 38 |
|
| 39 |
e |
| 40 |
|
| 41 |
</CsScore> |
| 42 |
</CsoundSynthesizer> |