DSPRelated.com
Forums

Windows and "overlap and add"

Started by Richard Owlett September 19, 2004
"Bank-to-Turn" <Bank-to-Turn@mchsi.com> wrote in message 
news:dv60l09drh6oa4ufck4ie8j61u2pighdl9@4ax.com...
> On Mon, 20 Sep 2004 21:36:20 -0400, "Matt Timmermans" > <mt0000@sympatico.nospam-remove.ca> wrote: > >>>- Window each block with a sine window. Be sure the sine period is >>>exactly >>>twice the block length, i.e., put the window zeros on the last sample and >>>sample -1 of each block. > > I suspect that you meant that one zero-crossing of the sine window > should occur at the initial point in the block, and that the next > zero crossing (in the opposite direction) of the sine window > should occur one point beyond the end of the block. Correct?
No. It doesn't really matter, but if I have to zero-out a sample, I'd rather zero-out the one at the end
> I read the accompanying thread that you referenced. Nowhere in > this discussion or that thread do you mention the fact that, after > applying the window and before applying the FFT, the block must be > zeropadded with at least as many zeroes as there are points in the > impulse response of the filter that you are applying. This is > necessary to avoid circular-convolution effects. > > Or do I not fully understand what you are doing here?
It's not about FFT convolution. It's about direct (possibly nonlinear) spectral manipulation. -- Matt
On Tue, 21 Sep 2004 08:50:36 -0400, "Matt Timmermans"
<mt0000@sympatico.nospam-remove.ca> wrote:

>>> I suspect that you meant that one zero-crossing of the sine window >>> should occur at the initial point in the block, and that the next >>> zero crossing (in the opposite direction) of the sine window >>> should occur one point beyond the end of the block. Correct? >> >>No. It doesn't really matter, but if I have to zero-out a sample, I'd rather >>zero-out the one at the end
As you said, it doesn't really matter. The zeroed-out sample will eventually be accommodated, either by the two blocks before the current block, or by the two blocks after.
>>It's not about FFT convolution. It's about direct (possibly nonlinear) >>spectral manipulation.
Okay; that's not the flavor that I got from the rest of the conversation, but okay. Still, as long as the results are being transformed back into the time domain, there will be circular convolution effects to worry about. That spectral manipulation may result in a time-domain response whose length exceeds the length of the original block, in which case the leading-edge "pre-ring" and trailing-edge "post-ring" will wrap-around (temporal aliasing) unless there are zeropadded regions into which they can fall. And a synthesis window can NOT eliminate temporal aliasing. It can, however, eliminate pre- and post-ring if sufficient zeropadded regions are present. Greg Berchin

Bank-to-Turn wrote:


(snip)
(someone wrote)

>>>It's not about FFT convolution. It's about direct (possibly nonlinear) >>>spectral manipulation.
> Okay; that's not the flavor that I got from the rest of the > conversation, but okay. Still, as long as the results are being > transformed back into the time domain, there will be circular > convolution effects to worry about. That spectral manipulation > may result in a time-domain response whose length exceeds the > length of the original block, in which case the leading-edge > "pre-ring" and trailing-edge "post-ring" will wrap-around > (temporal aliasing) unless there are zeropadded regions into which > they can fall. And a synthesis window can NOT eliminate temporal > aliasing. It can, however, eliminate pre- and post-ring if > sufficient zeropadded regions are present.
DCT (and DST) don't have periodic boundary conditions, so the effect shouldn't be quite the same in that case. Also, pre/post ring shouldn't get outside the window, which is normally small enough that one wouldn't notice it in the reconstruction. If the amount of filtering is large, though, some types of non-linear effects are likely to come through. -- glen
Jerry Avins wrote:

> ... Richard has a different problem,
More gently put than family has stated ;)
> ... It's so far off the path that I don't know where to begin.
Family, school teachers, professors agree ;)
Randy Yates wrote:

> Jerry Avins <jya@ieee.org> writes: > >>Randy Yates wrote: >> >>[SNIP!] > > I'm really confused. If Richard is addressing a completely different > problem, then why wouldn't you have stated that explicitly? The words > "overlap and add" only refer to one specific thing that I know of - if > that's not what he's trying to do, then someone needs to elucidate.
As OP i suspect I've added 2 +2 and come up with a prime ;( I need a better understanding of when to window and when not. In either case, I see Lyons Chapt 3 in my future (again, yet, forever? ) Similarly for "overlap and add". I begin with hours of recorded audio data. I take a 'chunk" of 'appropriate' duration. I perform an FFT. The next step MAY be seen as a filter. On a "bin by bin" basis I multiply [bin(n)] by [coeff(n)] Perform IFFT on that 'chunk' I append some chunkette to previous chunkette's Have I done to DSP what I just did to English?
Stan Pawlukiewicz wrote:

> Richard Owlett wrote: > >> Jerry Avins wrote: >> >>> Richard Owlett wrote: >>> >>>> Just how flat need a window be to utilize "overlap and add" >>>> >>>> Window data -- FFT -- manipulate in freq domain -- IFFT -- add in >>>> time domain >>> >>> >>> >>> >>> Why window? the artifacts caused by a rectangular window should cancel >>> in the overlap. >>> >>> Jerry >> >> >> >> Some of my analysis will be in frequency domain and comparing >> frequency domain of multiple sequential "samples". >> >> I'm grouping for a well formulated question. >> >> This has much to do with my other post titled >> >> As "Nyquist" is to "sample rate" "????" is to "sample >> period/duration/width/?" ? >> > > It kind of depends on your overlap percentage and the amount of ripple > you can tollerate back in the time domain. It also depends on how > coloured the data is. Whitening the data prior to windowing should help > a bit as well. >
You lost me;] I've been told not to use label "newbie". I'm surely "neophyte" ;]
Matt Timmermans wrote:

> "Bank-to-Turn" <Bank-to-Turn@mchsi.com> wrote in message > news:dv60l09drh6oa4ufck4ie8j61u2pighdl9@4ax.com... > >>On Mon, 20 Sep 2004 21:36:20 -0400, "Matt Timmermans" >><mt0000@sympatico.nospam-remove.ca> wrote: >> >> >>>>- Window each block with a sine window. Be sure the sine period is >>>>exactly >>>>twice the block length, i.e., put the window zeros on the last sample and >>>>sample -1 of each block. >> >>I suspect that you meant that one zero-crossing of the sine window >>should occur at the initial point in the block, and that the next >>zero crossing (in the opposite direction) of the sine window >>should occur one point beyond the end of the block. Correct? > > > No. It doesn't really matter, but if I have to zero-out a sample, I'd rather > zero-out the one at the end > > >>I read the accompanying thread that you referenced. Nowhere in >>this discussion or that thread do you mention the fact that, after >>applying the window and before applying the FFT, the block must be >>zeropadded with at least as many zeroes as there are points in the >>impulse response of the filter that you are applying. This is >>necessary to avoid circular-convolution effects. >> >>Or do I not fully understand what you are doing here? > > > It's not about FFT convolution. It's about direct (possibly nonlinear) > spectral manipulation. >
I suspect last paragraph is key. I do not know enough to ask intelligent question. where do I go from here?
Richard Owlett <rowlett@atlascomm.net> writes:

> Randy Yates wrote: > > > Jerry Avins <jya@ieee.org> writes: > > > > >>Randy Yates wrote: > >> > >>[SNIP!] > > I'm really confused. If Richard is addressing a completely different > > > problem, then why wouldn't you have stated that explicitly? The words > > "overlap and add" only refer to one specific thing that I know of - if > > that's not what he's trying to do, then someone needs to elucidate. > > As OP i suspect I've added 2 +2 and come up with a prime ;( > > I need a better understanding of when to window and when not. > In either case, I see Lyons Chapt 3 in my future (again, yet, forever? ) > > Similarly for "overlap and add". > > I begin with hours of recorded audio data. > I take a 'chunk" of 'appropriate' duration. > I perform an FFT. > > The next step MAY be seen as a filter. > On a "bin by bin" basis I multiply [bin(n)] by [coeff(n)] > > Perform IFFT on that 'chunk' > > I append some chunkette to previous chunkette's > > Have I done to DSP what I just did to English?
Hi Richard, Instead of telling us what you've implemented and then trying to guess what that implementation is doing to your data, why don't we back up to the 5000-foot level and find out what your goal is? What are you *trying* to accomplish? Are you trying to implement a filter? Are you trying to get a good estimate of the spectrum of your data? (Did that sound flippant/irreverent? I didn't mean for it to.) -- Randy Yates Sony Ericsson Mobile Communications Research Triangle Park, NC, USA randy.yates@sonyericsson.com, 919-472-1124
Randy Yates wrote:
> [snip] > (Did that sound flippant/irreverent? I didn't mean for it to.)
Not at all. Seems like a reprasing of my comment that not only do I not know what I'm talking about, I'm not sure of subject ;)
"Richard Owlett" <rowlett@atlascomm.net> wrote in message 
news:10l160r7oi8ptd4@corp.supernews.com...
>> It's not about FFT convolution. It's about direct (possibly nonlinear) >> spectral manipulation. >> > > I suspect last paragraph is key. > I do not know enough to ask intelligent question. > > where do I go from here?
That depends. When you say "manipulate in the frequency domain", what application do you have in mind?