Commit 0b72f9f
committed
Merge branch 'pitch-detect'
* pitch-detect:
LIB: minor performance optimization for pitch detection
LIB: FFT: make test program initialization for new arrays faster
GLUI: MorphWavSourceView: fix unused lambda capture warning
GLUI: InstEditNote: cleanup pitch detection worker thread initialization
LIB: cleanup variable names in pitch detection algorithm
GLUI: InstEditNote: update comments for detect note related objects
GLUI: InstEditNote: only start pitch detection timer if thread is active
LIB: provide a reference to the original pitch detection paper
LIB: use static / anon namespace for pitch detection helpers
TESTS: .gitignore for testpitchdetect
GLUI: InstEditNote: add "Cancel" button for pitch detection
GLUI: NoteWidget: provide visual "blinking" feedback for pitch detection
GLUI: avoid deep copy of Sample wav_data in pitch detection thread
TESTS: testpitchdetect: add tests for WavData -> midi note pitch detection
TESTS: testpitchdetect: add unit tests for pitch detect twm
LIB: provide pitch detection twm function for unit tests
GLUI: do nothing if pitch detection failed
GLUI: fix crashes by better InstEditWindow Instrument ownership rules
SRC: smenc: handle pitch detection error
LIB: detect_pitch: return -1 if pitch detection fails
GLUI: display progress bar during pitch detection
LIB: report progress from pitch detection function
GLUI: support pitch detection in instrument editor in background thread
LIB: support stopping pitch detection before it is done (kill_function)
LIB: cleanup pitch detection code a little bit
LIB: make pitch detection work properly on multi channel input data
SRC: smenc: add options to automatically detect fundamental freq / note
TESTS: use pitch detection code from library
LIB: add pitch detection code to library
TESTS: testpitchdetect: optimize freq err -> midi note loop
TESTS: testpitchdetect: fix out-of-bounds write due to bad FFT array
TESTS: testpitchdetect: avoid full grid search (performance)
This could possibly lead to suboptimal results, however for the test material
used to validate the correctness of the algorithm, the results are still the
very good.
TESTS: testpitchdetect: simplify error computation, remove extra pow()
TESTS: testpitchdetect: use fast vector sin (performance)
TESTS: testpitchdetect: improve accuracy for some cases
- use finer grid for initial twm pitch estimate
- estimate note as double
- ignore outliers in additional note estimation pass
TESTS: testpitchdetect: extend search range to 5kHz for fundamental
TESTS: testpitchdetect: use all selected partials for error_m2p
TESTS: testpitchdetect: use mag sum weighted frequency errors
TESTS: testpitchdetect: only use stronger partials for pitch detection
TESTS: testpitchdetect: fix error_p2m computation
TESTS: testpitchdetect: automatically detect window size to use
TESTS: testpitchdetect: try to find most likely midi note from freqs
TESTS: testpitchdetect: improve golden section search performance
TESTS: testpitchdetect: use golden section search
TESTS: testpitchdetect: use local minimum + refinement to find best freq
TESTS: testpitchdetect: implement basic two-way-mismatch pitch detection
TESTS: testpitchdetect: started to implement pitch detection
Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>File tree
12 files changed
+872
-45
lines changed- glui
- lib
- src
- tests
12 files changed
+872
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
20 | 91 | | |
21 | 92 | | |
22 | 93 | | |
| |||
49 | 120 | | |
50 | 121 | | |
51 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
52 | 126 | | |
53 | 127 | | |
54 | 128 | | |
| |||
59 | 133 | | |
60 | 134 | | |
61 | 135 | | |
| 136 | + | |
| 137 | + | |
62 | 138 | | |
63 | 139 | | |
64 | 140 | | |
| |||
126 | 202 | | |
127 | 203 | | |
128 | 204 | | |
129 | | - | |
| 205 | + | |
| 206 | + | |
130 | 207 | | |
131 | 208 | | |
132 | 209 | | |
| |||
138 | 215 | | |
139 | 216 | | |
140 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
141 | 224 | | |
142 | 225 | | |
143 | 226 | | |
| |||
236 | 319 | | |
237 | 320 | | |
238 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
239 | 339 | | |
240 | 340 | | |
241 | 341 | | |
242 | 342 | | |
243 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
244 | 349 | | |
245 | 350 | | |
246 | | - | |
| 351 | + | |
247 | 352 | | |
248 | 353 | | |
249 | 354 | | |
| |||
255 | 360 | | |
256 | 361 | | |
257 | 362 | | |
258 | | - | |
| 363 | + | |
259 | 364 | | |
260 | 365 | | |
261 | 366 | | |
| |||
273 | 378 | | |
274 | 379 | | |
275 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
276 | 435 | | |
277 | | - | |
| 436 | + | |
278 | 437 | | |
279 | 438 | | |
280 | | - | |
281 | | - | |
282 | 439 | | |
283 | 440 | | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
284 | 444 | | |
285 | 445 | | |
286 | | - | |
| 446 | + | |
287 | 447 | | |
288 | | - | |
| 448 | + | |
289 | 449 | | |
290 | 450 | | |
291 | 451 | | |
| |||
294 | 454 | | |
295 | 455 | | |
296 | 456 | | |
| 457 | + | |
| 458 | + | |
297 | 459 | | |
298 | 460 | | |
299 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
| |||
138 | 144 | | |
139 | 145 | | |
140 | 146 | | |
141 | | - | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
145 | 151 | | |
146 | 152 | | |
147 | | - | |
| 153 | + | |
148 | 154 | | |
149 | 155 | | |
150 | 156 | | |
| |||
411 | 417 | | |
412 | 418 | | |
413 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
414 | 423 | | |
415 | 424 | | |
416 | 425 | | |
| |||
480 | 489 | | |
481 | 490 | | |
482 | 491 | | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | 492 | | |
487 | 493 | | |
488 | 494 | | |
| |||
556 | 562 | | |
557 | 563 | | |
558 | 564 | | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | 565 | | |
563 | 566 | | |
564 | 567 | | |
| |||
604 | 607 | | |
605 | 608 | | |
606 | 609 | | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
| |||
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | 688 | | |
692 | 689 | | |
693 | 690 | | |
| |||
1018 | 1015 | | |
1019 | 1016 | | |
1020 | 1017 | | |
1021 | | - | |
1022 | | - | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1023 | 1033 | | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
| 1034 | + | |
1029 | 1035 | | |
1030 | 1036 | | |
1031 | 1037 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | | - | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
0 commit comments