| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
; Audio out Audio in No messages |
| 5 |
-odac -iadc -d ;;;RT audio I/O |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o vibes.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; Initialize the global variables. |
| 12 |
sr = 44100 |
| 13 |
ksmps = 10 |
| 14 |
nchnls = 2 |
| 15 |
|
| 16 |
; Instrument #1. |
| 17 |
instr 1 |
| 18 |
; kamp = 20000 |
| 19 |
; kfreq = 440 |
| 20 |
; ihrd = 0.5 |
| 21 |
; ipos = p4 |
| 22 |
; imp = 1 |
| 23 |
; kvibf = 6.0 |
| 24 |
; kvamp = 0.05 |
| 25 |
; ivibfn = 2 |
| 26 |
; idec = 0.1 |
| 27 |
asig vibes 20000, 440, .5, p4 , 1, 6.0, 0.05, 2, .1 |
| 28 |
outs asig, asig |
| 29 |
endin |
| 30 |
|
| 31 |
|
| 32 |
</CsInstruments> |
| 33 |
<CsScore> |
| 34 |
|
| 35 |
; Table #1, the "marmstk1.wav" audio file. |
| 36 |
f 1 0 256 1 "marmstk1.wav" 0 0 0 |
| 37 |
; Table #2, a sine wave for the vibrato. |
| 38 |
f 2 0 128 10 1 |
| 39 |
|
| 40 |
; Play Instrument #1 for four seconds. |
| 41 |
i 1 0 4 0.561 |
| 42 |
i 1 + 4 1 |
| 43 |
e |
| 44 |
|
| 45 |
</CsScore> |
| 46 |
</CsoundSynthesizer> |