projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
215b33c
)
src/spectral/phasevoc.c: perfect reconstruction for overlap = 50% without modifications
author
Paul Brossier
<piem@piem.org>
Fri, 29 Apr 2016 18:07:10 +0000
(20:07 +0200)
committer
Paul Brossier
<piem@piem.org>
Fri, 29 Apr 2016 18:07:10 +0000
(20:07 +0200)
src/spectral/phasevoc.c
patch
|
blob
|
history
diff --git
a/src/spectral/phasevoc.c
b/src/spectral/phasevoc.c
index
ea149c8
..
da3bfd1
100644
(file)
--- 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;
}