| 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 lpread.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 |
ires system_i 1, {{ lpanal -a -P70 -Q5000 -v1 fox.wav fox_poles.lpc }} ; create pole file |
| 17 |
|
| 18 |
instr 1 |
| 19 |
; works with or without -a option when analyzing "fox.wav" from the manual |
| 20 |
ilen filelen "fox.wav" ; length of soundfile |
| 21 |
prints "fox.wav = %f seconds\\n",ilen |
| 22 |
|
| 23 |
ktime line 0, p3, p4 |
| 24 |
krmsr,krmso,kerr,kcps lpread ktime,"fox_poles.lpc" |
| 25 |
krmso = krmso*.00005 ; low volume |
| 26 |
aout buzz krmso, kcps, 15, 1 |
| 27 |
krmsr = krmsr*.0001 ; low volume |
| 28 |
asig rand krmsr |
| 29 |
outs (aout*2)+asig, (aout*2)+asig ; mix buzz and rand |
| 30 |
|
| 31 |
endin |
| 32 |
</CsInstruments> |
| 33 |
<CsScore> |
| 34 |
; sine |
| 35 |
f1 0 4096 10 1 |
| 36 |
|
| 37 |
i 1 0 2.8 1 ; first words only |
| 38 |
i 1 4 2.8 2.8 ; whole sentence |
| 39 |
i 1 8 10 10 ; last analyses frame gets repeated until note end |
| 40 |
</CsScore> |
| 41 |
</CsoundSynthesizer> |