Csound Csound-dev Csound-tekno Search About

Re: CONVOLVE

Date1998-06-04 03:06
FromHans Mikelson
SubjectRe: CONVOLVE
Hi,

First do cvanal on a sound file ie

cvanal Slucia.wav Slucia.cv

then use it with csound as follows:

; ORCHESTRA
; Stereo/Stereo Reverb
       instr   5
inch   =       p4
irtime =       p5
idel1  =       (int(irtime*kr)+1)/kr*2
asig, asig2   diskin  11, 1
awet1, awet2   convolve asig, "Slucia.cv"
aout    delay asig, idel1
       outs    aout/2+awet1*.005, aout/2+awet2*.005
       endin

; SCORE
f1 0 8192 10 1
;   Sta  Dur   InCh  IRTime
i5  0    16.7  1     2.0

Does anyone know how to make the sound come out at the begining of the sound
file rather than having to put in this delay?

Hans Mikelson

Date1998-06-05 16:05
FromErik Spjut
SubjectRe: CONVOLVE
At 9:06 PM -0500 6/3/98, Hans Mikelson wrote:
>Hi,
>
>[Convolve example]
>
>Does anyone know how to make the sound come out at the begining of the sound
>file rather than having to put in this delay?

It's an artifact of how convolve works. No simple way around it. I usually
chop off the front of the file with either another pass through Csound or a
soundfile editing program.

Direct convolution which doesn't have the delay runs about 10,000 to
1,000,000 slower than convolve. To me the pain of calculating the delay and
working around it is a small price to pay for the million-fold increase in
speed.

-------------------------------------------------------------------------------
Erik Spjut (rhymes with cute) - Acting Director,The Center for Design Education
and/or Associate Professor of Engineering
Harvey Mudd College, Claremont, CA 91711  USA
Erik_Spjut@hmc.edu      Ph & Voice mail (909) 607-3890      Fax (909) 621-8967