Mercurial > hg > nnls-chroma
changeset 113:5bcba43e2317 monophonicness
no sound now leads to all 1 chroma for chord estimation
author | Matthias Mauch <mail@matthiasmauch.net> |
---|---|
date | Tue, 29 Mar 2011 17:53:02 +0100 |
parents | 846b552ea3b0 |
children | 3f104bceac99 |
files | Chordino.cpp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Chordino.cpp Tue Mar 29 15:12:19 2011 +0100 +++ b/Chordino.cpp Tue Mar 29 17:53:02 2011 +0100 @@ -501,6 +501,12 @@ } } + if (*max_element(origchroma.begin(), origchroma.end()) == 0) { + for (int i = 0; i < (int)chroma.size(); i++) { + chroma[i] = 1; + } + } + chromaList.push_back(currentChromas); // local chord estimation