Mercurial > hg > tony
comparison src/Analyser.cpp @ 198:bb391844e2aa
Switching pitch candidate no longer wraps around: you can't go higher than the highest or lower than the lowest (though you can go either "up" or "down" if none of the alternate candidates has been selected yet, regardless of whether the candidates are higher or lower than the actual pitch track)
author | Chris Cannam |
---|---|
date | Wed, 05 Mar 2014 11:39:28 +0000 |
parents | 73fafd70996e |
children | 0ba33d6c0a71 |
comparison
equal
deleted
inserted
replaced
197:73fafd70996e | 198:bb391844e2aa |
---|---|
370 } | 370 } |
371 | 371 |
372 emit layersChanged(); | 372 emit layersChanged(); |
373 } | 373 } |
374 | 374 |
375 bool | |
376 Analyser::haveHigherPitchCandidate() const | |
377 { | |
378 if (m_reAnalysisCandidates.empty()) return false; | |
379 return (m_currentCandidate < 0 || | |
380 (m_currentCandidate + 1 < (int)m_reAnalysisCandidates.size())); | |
381 } | |
382 | |
383 bool | |
384 Analyser::haveLowerPitchCandidate() const | |
385 { | |
386 if (m_reAnalysisCandidates.empty()) return false; | |
387 return (m_currentCandidate < 0 || m_currentCandidate >= 1); | |
388 } | |
389 | |
375 void | 390 void |
376 Analyser::switchPitchCandidate(Selection sel, bool up) | 391 Analyser::switchPitchCandidate(Selection sel, bool up) |
377 { | 392 { |
378 if (m_reAnalysisCandidates.empty()) return; | 393 if (m_reAnalysisCandidates.empty()) return; |
379 | 394 |