I'm trying to create a simple instrument that will prolong the sustain
of a live instrument. I've been tinkering with different approaches
for the past few days and I'm wondering if anyone can suggest anything
else. If I use pvsfread/write I can get a nice warm sustain going with
the caveat that I have to use two different instruments because I
can't access a file being written until the instrument writing the
file has stopped. If I use pvsbuffer to apply the sustain the audio is
warbly and not very convincing. Here are the csds which I've being
using. Remember to change the audio devices if you want to try them.
I've also tried using pvsfreeze but I don't want to freeze the
spectrum as I want to preserve the spectral evolution of the captured
audio, even if it is very short. Any tips or suggestions are most
welcome.
Rory.
;--------------------------------------pvsfread/write
example-----------------------------------
-odevaudio1 -b10 -idevaudio2
sr = 44100
kr = 44100
ksmps = 1
nchnls = 1
instr 1
asig inch 1 ; input
Sname sprintfk "soundin-%d.wav", p4
fsig pvsanal asig, 1024, 256, 1024, 1 ; analysis
pvsfwrite fsig, Sname ; write file
endin
instr 2
k1 linen 1, 0.1, p3, 1
Sname sprintfk "soundin-%d.wav", p4
idur filelen Sname ; find dur of analysis file
kpos line 0,p3,idur ; to ensure we process whole file
fsigr pvsfread kpos+0.5, Sname
aout pvsynth fsigr
out aout*k1
endin
f1 0 1024 10 1
i1 2 .3 1
i2 2.5 20 1
i1 6 .3 2
i2 6.5 20 2
;---------------------pvsbuffer/read
example------------------------------------------
-odevaudio1 -b10 -idevaudio2
sr = 44100
kr = 44100
ksmps = 1
nchnls = 1
;capture 1st second of line audio and sustain it....
instr 1
asig inch 1
k1 linseg 0, 1, 0, 1, 1, p3, 1
ktime line 0, p3, p3
if(ktime<1) then
fsig1 pvsanal asig, 4096*2, 2048*2,1024*8, 2
ibuf1,kt1 pvsbuffer fsig1, 2
endif
khan init ibuf1
if(ktime>1) then
kpt phasor 0.1
fsb1 pvsbufread kpt+0.5, khan
aout1 pvsynth fsb1
out aout1*k1
endif
endin
f1 0 1024 10 1
i1 0 100