Debian Codegraph @

examples/gen43.csd

raw
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 GEN43.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 ; Audacity shows the selection of reverb and noise- see image above
19
20 instr 1 ; analyze this selection and output result to pvx file
21 ires system_i 1,{{
22 pvanal -b1.04 -d0.8 finneganswake1.flac reverbnoise.pvx
23 }}
24 endin
25
26 instr 2 ; untreated signal, contains some reverb and noise
27 asig diskin2 "finneganswake1.flac", 1
28 outs asig, asig
29 endin
30
31 instr 3 ; use .pvx file from instr. 1 to remove reverb and noise
32 ; pvanal created 1 frame of size 1024, so size of table for GEN 43 = 512 (fftsize/2)
33 ipvx ftgen 1, 0, 512, -43, "reverbnoise.pvx", 0 ; can be found in examples folder
34 asig diskin2 "finneganswake1.flac", 1
35 fsig pvsanal asig, 1024, 256, 1024, 1
36 fclean pvstencil fsig, 0, 1, ipvx ; maximum cleaning
37 aclean pvsynth fclean
38 outs aclean, aclean
39 endin
40
41 </CsInstruments>
42 <CsScore>
43 i1 0 2 ; first analyze
44 i2 5 12.7 ; untreated signal
45 i3 20 12.7 ; denoised gignal
46 e
47 </CsScore>
48 </CsoundSynthesizer>