From a0a073fb11e3f44cfb6f71f549dffa4c29499fb1 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 30 Nov 2016 18:41:43 +0100 Subject: [PATCH] python/demos/demo_timestretch_online.py: use 512, fix block counter --- python/demos/demo_timestretch_online.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/demos/demo_timestretch_online.py b/python/demos/demo_timestretch_online.py index 1ae1773b..df703653 100755 --- a/python/demos/demo_timestretch_online.py +++ b/python/demos/demo_timestretch_online.py @@ -11,7 +11,7 @@ from aubio import source, sink, pvoc, cvec 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 @@ while True: 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 -- 2.11.0