Csound Csound-dev Csound-tekno Search About

Re: About hrtfer

Date1999-02-01 18:52
FromSean Costello
SubjectRe: About hrtfer
David Boothe wrote:
> 
> It does take a while for this to render. I tried this on my 180 mHz Pentium
> Pro using Windows console version 3.51. It took about 80 seconds to render
> the 5 second sound file. By comparison, commenting out the hrtfer line and
> sending asrc directly out, takes about 2 seconds to render. Based on what
> this opcode does, I suspect it has a lot of number crunching to do.

I think it does convolution, i.e. it convolves the input file with the
HRTF impulse files.  Convolution is VERY processor intensive.  I'd
explain it, but I'm horrible at explaining convolution (I've tried
before, in order to let my friends know what I think about, and it
didn't work out that well...).  One way of thinking of it is this: when
you convolve an input signal with a HRTF impulse file, it is similar to
running the signal through a multitap delay line, with a weighted tap
for every sample, with the total length corresponding to the length of
the HRTF impulse file. The value of each sample in the impulse file
would correspond to the weighting of the corresponding tap in the delay
line.  Not a very clear explanation (and mind you, this isn't really
what is going on in the program), but it should at least make it clear
why it takes so long.  The number of multiplies needed for straight
convolution would be equal to the number of samples in the input sample
TIMES the number of samples in the impulse file.