| 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 osciln.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 |
gione ftgen 1, 0, 1024, 7, 0, 1, 1, 1024, 0 |
| 17 |
gitwo ftgen 2, 0, 1024, 7, 0, 512, 1, 512, 0 |
| 18 |
|
| 19 |
instr 1 ;very simple waveguide system |
| 20 |
|
| 21 |
ifn = p4 |
| 22 |
ipitch = p5 |
| 23 |
itimes = p6 |
| 24 |
iperiod = 1000/ipitch |
| 25 |
|
| 26 |
afeed init 0 |
| 27 |
aimpl osciln 1, ipitch, ifn, itimes ;use as excitation signal |
| 28 |
arefl tone aimpl + afeed, 4000 |
| 29 |
aout atone arefl, 5000 |
| 30 |
afeed vdelay arefl, iperiod, 10 |
| 31 |
outs aout*3, aout*3 |
| 32 |
|
| 33 |
endin |
| 34 |
</CsInstruments> |
| 35 |
<CsScore> |
| 36 |
|
| 37 |
i 1 0 4 1 110 1 ;use different tables, |
| 38 |
i 1 5 4 2 110 1 ;& different pitch |
| 39 |
i 1 10 4 1 110 10 ;& different number of times the table is read |
| 40 |
i 1 15 4 2 110 10 |
| 41 |
i 1 20 6 1 880 1 |
| 42 |
i 1 25 3 2 880 1 |
| 43 |
i 1 30 3 1 880 10 |
| 44 |
i 1 35 3 2 880 10 |
| 45 |
|
| 46 |
e |
| 47 |
</CsScore> |
| 48 |
</CsoundSynthesizer> |