comparison src/Silvet.cpp @ 77:4422cf710cf4 timing

Some testing results
author Chris Cannam
date Tue, 06 May 2014 11:21:28 +0100
parents f3bf6503e6c6
children 5314d3361dfb
comparison
equal deleted inserted replaced
76:f3bf6503e6c6 77:4422cf710cf4
524 map<int, double> active; 524 map<int, double> active;
525 ValueIndexMap::const_iterator si = strengths.end(); 525 ValueIndexMap::const_iterator si = strengths.end();
526 while (int(active.size()) < polyphony) { 526 while (int(active.size()) < polyphony) {
527 --si; 527 --si;
528 if (si->first < threshold) break; 528 if (si->first < threshold) break;
529 // cerr << si->second << " : " << si->first << endl; 529 cerr << si->second << " : " << si->first << endl;
530 active[si->second] = si->first; 530 active[si->second] = si->first;
531 if (si == strengths.begin()) break; 531 if (si == strengths.begin()) break;
532 } 532 }
533 533
534 // Minimum duration pruning, and conversion to notes. We can only 534 // Minimum duration pruning, and conversion to notes. We can only
585 } 585 }
586 586
587 int velocity = maxStrength * 2; 587 int velocity = maxStrength * 2;
588 if (velocity > 127) velocity = 127; 588 if (velocity > 127) velocity = 127;
589 589
590 // cerr << "Found a genuine note, starting at " << columnDuration * start << " with duration " << columnDuration * duration << endl; 590 cerr << "Found a genuine note, starting at " << columnDuration * start << " with duration " << columnDuration * duration << endl;
591 591
592 Feature nf; 592 Feature nf;
593 nf.hasTimestamp = true; 593 nf.hasTimestamp = true;
594 nf.timestamp = RealTime::fromSeconds 594 nf.timestamp = RealTime::fromSeconds
595 (columnDuration * (start - postFilterLatency)); 595 (columnDuration * (start - postFilterLatency));