Debian Codegraph @

examples/lpreson-2.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac --limiter=0.95 ;;;realtime audio out & limit loud pops
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o lpreson-2.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 ; by Menno Knevel - 2021
17 ;works with or without -a option when analyzing "fox.wav" from the manual
18 ;both options sound a little different
19 ires system_i 1,{{ lpanal -a -p40 -h200 -P50 -Q15000 -v1 fox.wav fox_poles.lpc }} ; pole filter file
20
21 instr 1
22
23 ilen filelen "fox.wav" ;length of soundfile 1
24 prints "fox.wav = %f seconds\\n",ilen
25
26 ktime line 0, p3, ilen
27 krmsr,krmso,kerr,kcps lpread ktime,"fox_poles.lpc"
28 krmso *= .000085 ; scale amplitude
29 asig diskin2 "flute.aiff", p4 ; use pitch deifferences from the flute
30 asig *= krmso ; & use the scaled back "krmso"
31 aout lpreson asig
32 ares balance aout, asig
33 outs ares, ares
34
35 endin
36 </CsInstruments>
37 <CsScore>
38 s
39 ; pitch
40 i 1 0 2.756 1
41 i 1 3 2.756 1.5
42 s
43 i 1 0 2.756 1 ; chord
44 i 1 0 2.756 .7
45 i 1 0 2.756 1.3
46 e
47 </CsScore>
48 </CsoundSynthesizer>