From: Paul Brossier Date: Fri, 29 Apr 2016 18:07:10 +0000 (+0200) Subject: src/spectral/phasevoc.c: perfect reconstruction for overlap = 50% without modifications X-Git-Tag: 0.4.4~300^2~195 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=c2a39af80b04ff60e0c4681eb6e9941983fbec12;p=aubio.git src/spectral/phasevoc.c: perfect reconstruction for overlap = 50% without modifications --- diff --git a/src/spectral/phasevoc.c b/src/spectral/phasevoc.c index ea149c8e..da3bfd13 100644 --- a/src/spectral/phasevoc.c +++ b/src/spectral/phasevoc.c @@ -66,7 +66,10 @@ void aubio_pvoc_rdo(aubio_pvoc_t *pv,cvec_t * fftgrain, fvec_t * synthnew) { /* unshift */ fvec_ishift(pv->synth); /* windowing */ - fvec_weight(pv->synth, pv->w); + // if overlap = 50%, do not apply window (identity) + if (pv->hop_s * 2 < pv->win_s) { + fvec_weight(pv->synth, pv->w); + } /* additive synthesis */ aubio_pvoc_addsynth(pv, synthnew); } @@ -124,6 +127,8 @@ aubio_pvoc_t * new_aubio_pvoc (uint_t win_s, uint_t hop_s) { pv->scale = 2./3.; } else if (win_s == hop_s * 8) { pv->scale = 1./3.; + } else if (win_s == hop_s * 2) { + pv->scale = 1.; } else { pv->scale = .5; }