ref: c2a39af80b04ff60e0c4681eb6e9941983fbec12
parent: 215b33c94cfa35a27be7a11f692bee1b473e2efd
author: Paul Brossier <piem@piem.org>
date: Fri Apr 29 16:07:10 EDT 2016
src/spectral/phasevoc.c: perfect reconstruction for overlap = 50% without modifications
--- a/src/spectral/phasevoc.c
+++ b/src/spectral/phasevoc.c
@@ -66,7 +66,10 @@
/* 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 @@
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;
}