History

python/demos/demo_timestretch_online.py: use 512, fix block counter

Paul Brossier committed 9 years ago

Commit a0a073f1 parent 8a49bb91 file · +4 −2Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/demos/demo_timestretch_online.py+4−2
@@ -11,7 +11,7 @@ from aubio import source, sink, pvoc, cvec · 10 unmodified lines
1111 from aubio import unwrap2pi, float_type
1212 import numpy as np
1313
14−win_s = 1024
14+win_s = 512
1515 hop_s = win_s // 8 # 87.5 % overlap
1616
1717 warmup = win_s // hop_s - 1
@@ -92,8 +92,10 @@ while True: · 74 unmodified lines
9292 old_grain.norm = np.copy(cur_grain.norm)
9393 old_grain.phas = np.copy(cur_grain.phas)
9494
95− block_read += 1
95+ # until end of file
9696 if read < hop_s: break
97+ # increment block counter
98+ block_read += 1
9799
98100 for t in range(warmup + 2): # purge the last frames from the phase vocoder
99101 new_grain.norm[:] = 0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t