comparison src/Silvet.cpp @ 186:9d70d687e4eb noteagent

Tidy column counting
author Chris Cannam
date Wed, 28 May 2014 15:05:43 +0100
parents 78212f764251
children 1697457458b7
comparison
equal deleted inserted replaced
185:78212f764251 186:9d70d687e4eb
532 if (!present[i]) { 532 if (!present[i]) {
533 // silent column 533 // silent column
534 for (int j = 0; j < pack.templateNoteCount; ++j) { 534 for (int j = 0; j < pack.templateNoteCount; ++j) {
535 m_postFilter[j]->push(0.0); 535 m_postFilter[j]->push(0.0);
536 } 536 }
537 continue; 537 } else {
538 } 538
539 539 postProcess(localPitches[i], localBestShifts[i],
540 postProcess(localPitches[i], localBestShifts[i], 540 wantShifts, shiftCount);
541 wantShifts, shiftCount);
542 541
543 FeatureList noteFeatures = obtainNotes(); 542 FeatureList noteFeatures = obtainNotes();
544 543
545 for (FeatureList::const_iterator fi = noteFeatures.begin(); 544 for (FeatureList::const_iterator fi = noteFeatures.begin();
546 fi != noteFeatures.end(); ++fi) { 545 fi != noteFeatures.end(); ++fi) {
547 fs[m_notesOutputNo].push_back(*fi); 546 fs[m_notesOutputNo].push_back(*fi);
548 } 547 }
548 }
549
550 ++m_columnCountOut;
549 } 551 }
550 552
551 return fs; 553 return fs;
552 } 554 }
553 555
675 if (confidence > 1.0) confidence = 1.0; 677 if (confidence > 1.0) confidence = 1.0;
676 678
677 AgentHypothesis::Observation obs(freq, t, confidence); 679 AgentHypothesis::Observation obs(freq, t, confidence);
678 m_agentFeeder->feed(obs); 680 m_agentFeeder->feed(obs);
679 } 681 }
680
681 m_columnCountOut ++;
682 } 682 }
683 683
684 Vamp::Plugin::FeatureList 684 Vamp::Plugin::FeatureList
685 Silvet::obtainNotes() 685 Silvet::obtainNotes()
686 { 686 {