ref: a0a073fb11e3f44cfb6f71f549dffa4c29499fb1
parent: 8a49bb9e88d0d1a0b551fb1d383ee6cf29b7dc00
author: Paul Brossier <piem@piem.org>
date: Wed Nov 30 13:41:43 EST 2016
python/demos/demo_timestretch_online.py: use 512, fix block counter
--- a/python/demos/demo_timestretch_online.py
+++ b/python/demos/demo_timestretch_online.py
@@ -11,7 +11,7 @@
from aubio import unwrap2pi, float_type
import numpy as np
-win_s = 1024
+win_s = 512
hop_s = win_s // 8 # 87.5 % overlap
warmup = win_s // hop_s - 1
@@ -92,8 +92,10 @@
old_grain.norm = np.copy(cur_grain.norm)
old_grain.phas = np.copy(cur_grain.phas)
- block_read += 1
+ # until end of file
if read < hop_s: break
+ # increment block counter
+ block_read += 1
for t in range(warmup + 2): # purge the last frames from the phase vocoder
new_grain.norm[:] = 0