How to efficiently compute a sliding FFT/DFT with a variable window?
When using the sliding DFT instead of an FFT, you can actually have a different window length per bin. This is because each bin is computed separately anyway. The only constraint is that each window length must be a multiple of its bin wavelength (or half of its bin wavelength if you modify the transform a little). For example, you can do a constant-Q sliding DFT by using the same factor for each bin, and spacing the bins appropriately. More complex variants are possible but require a lot of tweaking, depending on what you want to do with the result. The different windows should be aligned at their center.

I once found a paper about this (after coming up with essentially the same thing myself); it's called "Sliding with a constant Q" and can be googled. For resynthesis, alternatively to the method described in that paper, the trivial resynthesis algorithm for the sliding DFT (essentially just summing everything) also works for variable window lengths.