comparison src/Silvet.cpp @ 69:9c7e6086192d

Run again, with files normalised as in the MIREX tests
author Chris Cannam
date Tue, 29 Apr 2014 12:05:52 +0100
parents 3e7e3c610fae
children 7133f78ccbf6 62b7be1226d5 e282930cfca7
comparison
equal deleted inserted replaced
68:4ea3ef5c696a 69:9c7e6086192d
505 for (int j = 0; j < processingNotes; ++j) { 505 for (int j = 0; j < processingNotes; ++j) {
506 m_postFilter[j]->push(pitches[j]); 506 m_postFilter[j]->push(pitches[j]);
507 filtered.push_back(m_postFilter[j]->get()); 507 filtered.push_back(m_postFilter[j]->get());
508 } 508 }
509 509
510 int postFilterLatency = int(m_postFilter[0]->getSize() / 2);
511
510 // Threshold for level and reduce number of candidate pitches 512 // Threshold for level and reduce number of candidate pitches
511 513
512 int polyphony = 5; 514 int polyphony = 5;
513 double threshold = 4.8; 515 double threshold = 4.8;
514 516
587 589
588 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;
589 591
590 Feature nf; 592 Feature nf;
591 nf.hasTimestamp = true; 593 nf.hasTimestamp = true;
592 nf.timestamp = RealTime::fromSeconds(columnDuration * start); 594 nf.timestamp = RealTime::fromSeconds
595 (columnDuration * (start - postFilterLatency));
593 nf.hasDuration = true; 596 nf.hasDuration = true;
594 nf.duration = RealTime::fromSeconds(columnDuration * duration); 597 nf.duration = RealTime::fromSeconds
598 (columnDuration * duration);
595 nf.values.push_back(noteFrequency(note)); 599 nf.values.push_back(noteFrequency(note));
596 nf.values.push_back(velocity); 600 nf.values.push_back(velocity);
597 nf.label = noteName(note); 601 nf.label = noteName(note);
598 noteFeatures.push_back(nf); 602 noteFeatures.push_back(nf);
599 } 603 }