Debian Codegraph @

src/Examples/FLOSS Manual Examples/05 Sound Modification/05H01_pconvolve.csd

raw
1 <CsoundSynthesizer>
2
3 <CsOptions>
4 --env:SSDIR+=../../SourceMaterials -odac
5 </CsOptions>
6
7 <CsInstruments>
8
9 sr = 44100
10 ksmps = 512
11 nchnls = 2
12 0dbfs = 1
13
14 gasig init 0
15
16 instr 1 ; sound file player
17 gasig diskin2 p4,1,0,1
18 endin
19
20 instr 2 ; convolution reverb
21 ; Define partion size.
22 ; Larger values require less CPU but result in more latency.
23 ; Smaller values produce lower latency but may cause
24 ; realtime performance issues
25 ipartitionsize = 256
26 aconv pconvolve gasig, p4,ipartitionsize
27 ; create a delayed version of the input signal that will sync
28 ; with convolution output
29 adel delay gasig, ipartitionsize/sr
30 ; create a dry/wet mix
31 aMix ntrpol adel, aconv*0.1, p5
32 outs aMix ,aMix
33 gasig = 0
34 endin
35
36 </CsInstruments>
37
38 <CsScore>
39 ; instr 1. sound file player
40 ; p4=input soundfile
41 ; instr 2. convolution reverb
42 ; p4=impulse response file
43 ; p5=dry/wet mix (0 - 1)
44
45 i 1 0 8.6 "loop.wav"
46 i 2 0 10 "Stairwell.wav" 0.3
47
48 i 1 10 8.6 "loop.wav"
49 i 2 10 10 "dish.wav" 0.8
50 e
51 </CsScore>
52
53 </CsoundSynthesizer>
54 ;example by Iain McCurdy