| 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 poscil3-file.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; Example written by Joachim Heintz 07/2008 |
| 12 |
|
| 13 |
sr = 44100 |
| 14 |
kr = 4410 |
| 15 |
ksmps = 10 |
| 16 |
nchnls = 1 |
| 17 |
|
| 18 |
; non-normalized function table with a sample 1 |
| 19 |
giFile ftgen 1, 0, 0, -1, "fox.wav", 0, 0, 0 |
| 20 |
|
| 21 |
; Instrument #1 - uses poscil3 for playing samples from a function table |
| 22 |
instr 1 |
| 23 |
kamp = p4 |
| 24 |
kspeed = p5 |
| 25 |
ifn = 1 |
| 26 |
iskip = p6 |
| 27 |
kcps = kspeed / (ftlen(ifn) / ftsr(ifn)); frequency of the oscillator |
| 28 |
iphs = iskip / (ftlen(ifn) / ftsr(ifn)); calculates skiptime to phase values (0-1) |
| 29 |
|
| 30 |
a1 poscil3 kamp, kcps, ifn, iphs |
| 31 |
out a1 |
| 32 |
endin |
| 33 |
</CsInstruments> |
| 34 |
<CsScore> |
| 35 |
i1 0 2.756 1 1 0 |
| 36 |
i1 3 2.756 1 -1 0 |
| 37 |
i1 6 1.378 1 .5 2.067 |
| 38 |
e |
| 39 |
</CsScore> |
| 40 |
</CsoundSynthesizer> |