0
$\begingroup$

Edit: Please treat code here as python-esque pseudo-code; it would syntactically fall closest to MATLAB or Python+numpy+scipy users.

If I have a signal in frames, and I want to put it back together - I just add each frame back into into a growing vector at a distance of hop from the end. More specifically, I use hop * frame_index.

Now I understand that this is naive; I believe ideally, I would satisfy a cola condition based on the type(window), len(window), and len(hop).

If I have frames, and just want to put them back together (and in particular I don't need the spectral benefits of other windows - I don't plan to go spectral) - Am I right to understand that a rectangular window always satisfies cola, so, that's all I should need here.

BUT, for a rectangular window, I would expect some gain in power for the n_overlap samples in each window - because the redundant samples get doubled. I thought this is why you needed a hann or hamm etc.

So my big question here is: Is this understanding flawed? and if not, then how would I go about performing 2 or 3 time varying operations on a signal that each work better for different window and hop sizes.

Side-Quest: When I look into reconstructing from frames, I always come back to putting an STFT back together, or OLA convolution. Is there some convolution approach that just puts the signal back together perfectly from its frames - It makes sense that something like this could exist, but I don't fully understand how.

$\endgroup$
4
  • $\begingroup$ It looks like you are referring to a specific software package or application here, without letting us know what it is. It may be best if you could express your question in math, in which case the answer will be universal. If not that, then tell us more about what software you're using. $\endgroup$
    – TimWescott
    Jan 21 at 17:31
  • $\begingroup$ Thanks for pointing out - I've made an edit to indicate that it's mostly pseudocode. I don't mind a mathematical answer if you have one. It's just easier for me to express the idea here in pseudocode. $\endgroup$
    – Aditya TB
    Jan 21 at 17:53
  • 1
    $\begingroup$ If you don't need to go spectral, just use rectangle window which is always satisfied with COLA constraint (no overlap or 50% overlap). I don't quite understand your big question. $\endgroup$
    – ZR Han
    Jan 22 at 1:56
  • $\begingroup$ I think the big question really is - If I want to implement an OLA function that can take frames of any possible combination of window and hop size, and put it back together perfectly - then am I basically asking for the world? I guess, at best, a possible implementation would choose a window that satisfies cola, based on window and hop and go from there, and just fails when cola can't be satisfied at all by any window. Or have I understood it all wrong and it is in fact actually possible by just using a rectangular window. $\endgroup$
    – Aditya TB
    Jan 22 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.