Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -11,7 +11,7 @@ from aubio import source, sink, pvoc, cvec · 10 unmodified lines | ||
| 11 | 11 | from aubio import unwrap2pi, float_type |
| 12 | 12 | import numpy as np |
| 13 | 13 | |
| 14 | −win_s = 1024 | |
| 14 | +win_s = 512 | |
| 15 | 15 | hop_s = win_s // 8 # 87.5 % overlap |
| 16 | 16 | |
| 17 | 17 | warmup = win_s // hop_s - 1 |
| @@ -92,8 +92,10 @@ while True: · 74 unmodified lines | ||
| 92 | 92 | old_grain.norm = np.copy(cur_grain.norm) |
| 93 | 93 | old_grain.phas = np.copy(cur_grain.phas) |
| 94 | 94 | |
| 95 | − block_read += 1 | |
| 95 | + # until end of file | |
| 96 | 96 | if read < hop_s: break |
| 97 | + # increment block counter | |
| 98 | + block_read += 1 | |
| 97 | 99 | |
| 98 | 100 | for t in range(warmup + 2): # purge the last frames from the phase vocoder |
| 99 | 101 | new_grain.norm[:] = 0 |