| 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 pvslpc.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; by Menno Knevel 2021 |
| 12 |
|
| 13 |
sr = 44100 |
| 14 |
ksmps = 32 |
| 15 |
nchnls = 2 |
| 16 |
0dbfs = 1 |
| 17 |
|
| 18 |
gifw ftgen 0, 0, 1024, 20, 2, 1 ; Hanning window |
| 19 |
|
| 20 |
instr 1 |
| 21 |
|
| 22 |
iswap = p4 ; decide which sample goes to pvslpc |
| 23 |
if iswap == 1 then |
| 24 |
a1 diskin "MSjungleMid.wav", 1, 0, 1 ; first the jungle |
| 25 |
a2 diskin "fox.wav", 1, 0, 1 |
| 26 |
prints "\n--**the jungle...**--\n" |
| 27 |
else |
| 28 |
a1 diskin "fox.wav", 1, 0, 1 ; then the fox |
| 29 |
a2 diskin "MSjungleMid.wav", 1, 0, 1 |
| 30 |
prints "\n--**and the fox...**--\n" |
| 31 |
endif |
| 32 |
iorder = p5 |
| 33 |
fenv pvslpc a1, 1024, 128, p5, gifw |
| 34 |
fsig pvscale fenv, 1.5 ; convert lpc to pvs, for |
| 35 |
a3 pvsynth fsig ; scaling basic frequency 1.5 times |
| 36 |
a3 dcblock a3 |
| 37 |
outs a3*.1, a3*.1 |
| 38 |
endin |
| 39 |
|
| 40 |
</CsInstruments> |
| 41 |
<CsScore> |
| 42 |
; jungle order |
| 43 |
i1 0 10 1 10 |
| 44 |
i1 11 10 1 150 |
| 45 |
s |
| 46 |
i1 2 10 0 10 |
| 47 |
i1 13 10 0 150 |
| 48 |
e |
| 49 |
</CsScore> |
| 50 |
</CsoundSynthesizer> |