DSPRelated.com
Forums

realtime convolution with time-varying filter

Started by Emile December 18, 2004
Fred Marshall wrote:
> "Emile" <bla.abla@telenet.be> wrote in message > news:layyd.8091$JC2.461018@phobos.telenet-ops.be... > >>i think i actually understand what u are saying here, but it would >>probably be to compututational expensive (doing the N >>multiplications/additions per output sample for time-domain >>convolution). > > > Well, waitaminnit ..... you need to think about what is "N". > > If there are M paths, then you need to do M additions per output point. > I don't know what N is for sure here..... > > That is, the "filter" can be very sparse indeed. This is entirely driven by > the number of paths. There are only as many filter coefficients as there > are paths. All of the intervening coefficients are zero. Now, if you FFT > and multiply then you have to transform the model - including all the zeros. > So *that* would be pretty compute intensive in comparison I should think.
yes idd, u're right. I forgot to tell u that only the early reflections (about 20ms after direct sound) are modeled with geometrical paths, the rest is approximated with an artificial reverberation algorithm. These first reverberations are most important to be able to locate the soundsource in space, the rest of the response is to dense. Also i have to admit i have some troubles understanding how doppler shift works in this case. Suppose i only take 1 direct path that becomes shorter, thus the delay gets smaller (and amplitude higher). As an input signal i take a discrete sine-wave. Ok i think i can see how this can work when it is done in time-domain when some interpollation is used. (something like u said in ur next post about the sample rate conversion exercise) but what if when using fft, i shift the frequency of the block being processed based on the speed-vectors of the source/reciever also should i forget, thank u so far. This discussion really helps me think about my problem (and understanding the things i've read so far). I only came into contact with dsp during my digital image processing class (wich hasnt finished yet), where the discrete function is a function of color not time. another question i still cant figure out, i seem to see impulse responses of 2 types. Ones with only positive taps, when this is the model i can see how a path becomes a tap in the response. But i also see responses with negative taps, more like a sound wave representation, but then i dont see how i should transform paths to impulse responses. Also i cant find good reading about this subject (this is maybe more a question for some acoustics newsgroup).
> > If there is one path, then no additions. > If there are two paths then one addition. > If ther are three paths then two additions > .......... > > Fred > >
"Emile" <bla.abla@telenet.be> wrote in message 
news:oWKyd.8781$hC2.432318@phobos.telenet-ops.be...
> Fred Marshall wrote: >> "Emile" <bla.abla@telenet.be> wrote in message >> news:layyd.8091$JC2.461018@phobos.telenet-ops.be... >> >>>i think i actually understand what u are saying here, but it would >>>probably be to compututational expensive (doing the N >>>multiplications/additions per output sample for time-domain >>>convolution). >> >> >> Well, waitaminnit ..... you need to think about what is "N". >> >> If there are M paths, then you need to do M additions per output point. >> I don't know what N is for sure here..... >> >> That is, the "filter" can be very sparse indeed. This is entirely driven >> by the number of paths. There are only as many filter coefficients as >> there are paths. All of the intervening coefficients are zero. Now, if >> you FFT and multiply then you have to transform the model - including all >> the zeros. So *that* would be pretty compute intensive in comparison I >> should think. > > yes idd, u're right. I forgot to tell u that only the early reflections > (about 20ms after direct sound) are modeled with geometrical paths, the > rest is approximated with an artificial reverberation algorithm. These > first reverberations are most important to be able to locate the > soundsource in space, the rest of the response is to dense. > > Also i have to admit i have some troubles understanding how doppler shift > works in this case. Suppose i only take 1 direct path that becomes > shorter, thus the delay gets smaller (and amplitude higher). As an input > signal i take a discrete sine-wave. Ok i think i can see how this can work > when it is done in time-domain when some interpollation is used. > (something like u said in ur next post about the sample rate conversion > exercise) > > but what if when using fft, i shift the frequency of the block being > processed based on the speed-vectors of the source/reciever > > also should i forget, thank u so far. This discussion really helps me > think about my problem (and understanding the things i've read so far). I > only came into contact with dsp during my digital image processing class > (wich hasnt finished yet), where the discrete function is a function of > color not time. > > another question i still cant figure out, i seem to see impulse responses > of 2 types. > Ones with only positive taps, when this is the model i can see how a path > becomes a tap in the response. > But i also see responses with negative taps, more like a sound wave > representation, but then i dont see how i should transform paths to > impulse responses. Also i cant find good reading about this subject (this > is maybe more a question for some acoustics newsgroup).
Well, if it's a simple path, and not the direct path, then at least there's a reflection. As I recall, some surfaces will reflect with an inversion and others don't. Thus sign differences. Let us say there is a direct path at 2500 feet in water - so the temporal length is of the direct path is around 0.5 seconds or 500msec. This is represented by a delay of 500msec and a multiplier that is equivalent to the attenuation loss. Now let's assume that the transmitter and receiver are at 2500 feet depth and there is a noticeable surface reflection path. The surface reflection path has a length sqrt(5)*2500=5590 so a delay of around 5590msec and a multiplier that is equivalent to the attenuation loss for this path and maybe the bounce is inverting (I don't remember). These two paths look like a transversal filter with two taps at delays of 2500 and 5590msec respectively. The model builds from there. Perhaps including multiple paths across the transmit beam pattern, etc..... Fred