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
11from aubio import unwrap2pi, float_type11from aubio import unwrap2pi, float_type
12import numpy as np12import numpy as np
13 13
14win_s = 102414win_s = 512
15hop_s = win_s // 8 # 87.5 % overlap15hop_s = win_s // 8 # 87.5 % overlap
16 16
17warmup = win_s // hop_s - 117warmup = win_s // hop_s - 1
@@ -92,8 +92,10 @@ while True: · 74 unmodified lines
92 old_grain.norm = np.copy(cur_grain.norm)92 old_grain.norm = np.copy(cur_grain.norm)
93 old_grain.phas = np.copy(cur_grain.phas)93 old_grain.phas = np.copy(cur_grain.phas)
94 94
95 block_read += 195 # until end of file
96 if read < hop_s: break96 if read < hop_s: break
97 # increment block counter
98 block_read += 1
97 99
98for t in range(warmup + 2): # purge the last frames from the phase vocoder100for t in range(warmup + 2): # purge the last frames from the phase vocoder
99 new_grain.norm[:] = 0101 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