Mercurial > hg > nnls-chroma
diff chromamethods.cpp @ 140:8ff2aa01df4d darwintunes
Johan's changes:
* removing slash notation substitution in the case of Harte's syntax
* remove obsolete chorddict.cpp
author | Matthias Mauch <matthias.mauch@eecs.qmul.ac.uk> |
---|---|
date | Tue, 19 Jun 2012 15:40:09 +0100 |
parents | 75a46075bf4e |
children | c5eb728a8725 0d70058c2bce |
line wrap: on
line diff
--- a/chromamethods.cpp Thu May 10 11:32:05 2012 +0100 +++ b/chromamethods.cpp Tue Jun 19 15:40:09 2012 +0100 @@ -31,8 +31,6 @@ #include <boost/iostreams/stream.hpp> #include <boost/lexical_cast.hpp> -#include "chorddict.cpp" - using namespace std; using namespace boost; @@ -355,7 +353,7 @@ "A (bass)","Bb (bass)","B (bass)","C (bass)","C# (bass)","D (bass)","Eb (bass)","E (bass)","F (bass)","F# (bass)","G (bass)","Ab (bass)", "A","Bb","B","C","C#","D","Eb","E","F","F#","G","Ab"}; - const char* bassnames[13][12] ={ + const char* bassnames[12][12] ={ {"A","","B","C","C#","D","","E","","F#","G","G#"}, {"Bb","","C","Db","D","Eb","","F","","G","Ab","A"}, {"B","","C#","D","D#","E","","F#","","G#","A","A#"}, @@ -367,8 +365,7 @@ {"F","","G","Ab","A","Bb","","C","","D","Eb","E"}, {"F#","","G#","A","A#","B","","C#","","D#","E","E#"}, {"G","","A","Bb","B","C","","D","","E","F","F#"}, - {"Ab","","Bb","Cb","C","Db","","Eb","","F","Gb","G"}, - {"1","","2","b3","3","4","","5","","6","b7","7"} + {"Ab","","Bb","Cb","C","Db","","Eb","","F","Gb","G"} }; bool hasExternalDictinoary = true; @@ -408,7 +405,6 @@ vector<string> loadedChordNames; vector<float> loadedChordDict; if (hasExternalDictinoary && chordDictFile.is_open()) { - cerr << "-----------------> " << tempChordNames.size() << endl; tempChordDict.clear(); tempChordNames.clear(); while (std::getline(chordDictFile, line)) { // loop over lines in chord.dict file @@ -435,6 +431,7 @@ tempChordNames.push_back(chordType); } } + cerr << "-----------------> " << tempChordNames.size() << endl; } @@ -448,8 +445,6 @@ if (tempChordDict[24*iType+(kSemitone) % 12] > 0.99) { if (harte_syntax == 0.0) { slashNotation = bassnames[iSemitone][kSemitone]; - } else { - slashNotation = bassnames[12][kSemitone]; } } }