| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
; Audio out Audio in |
| 5 |
-odac -iadc ;;;RT audio I/O |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o goto.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; Initialize the global variables. |
| 12 |
sr = 44100 |
| 13 |
kr = 4410 |
| 14 |
ksmps = 10 |
| 15 |
nchnls = 1 |
| 16 |
|
| 17 |
; Instrument #1. |
| 18 |
instr 1 |
| 19 |
a1 oscil 10000, 440, 1 |
| 20 |
goto playit |
| 21 |
|
| 22 |
; The goto will go to the playit label. |
| 23 |
; It will skip any code in between like this comment. |
| 24 |
|
| 25 |
playit: |
| 26 |
out a1 |
| 27 |
endin |
| 28 |
|
| 29 |
|
| 30 |
</CsInstruments> |
| 31 |
<CsScore> |
| 32 |
|
| 33 |
; Table #1: a simple sine wave. |
| 34 |
f 1 0 32768 10 1 |
| 35 |
|
| 36 |
; Play Instrument #1 for one second. |
| 37 |
i 1 0 1 |
| 38 |
e |
| 39 |
|
| 40 |
|
| 41 |
</CsScore> |
| 42 |
</CsoundSynthesizer> |