diff chromamethods.cpp @ 89:7af5312e66f8 matthiasm-plugin

new boost N parameter in chordino, chord dictionary loaded on initialisation (not construction) of plugin
author Matthias Mauch <mail@matthiasmauch.net>
date Wed, 01 Dec 2010 23:08:55 +0900
parents f568555390f1
children b095d83585c9
line wrap: on
line diff
--- a/chromamethods.cpp	Wed Dec 01 21:18:49 2010 +0900
+++ b/chromamethods.cpp	Wed Dec 01 23:08:55 2010 +0900
@@ -277,7 +277,7 @@
     return path;
 }
 
-vector<string> chordDictionary(vector<float> *mchorddict, vector<vector<int> > *m_chordnotes) {    
+vector<string> chordDictionary(vector<float> *mchorddict, vector<vector<int> > *m_chordnotes, float boostN) {    
     
     typedef tokenizer<char_separator<char> > Tok;
     char_separator<char> sep(",; ","=");
@@ -304,7 +304,7 @@
 
     iostreams::stream<iostreams::file_source> chordDictFile(chordDictFilename);
     string line;
-    int iElement = 0;
+    // int iElement = 0;
     int nChord = 0;
 	
     vector<string> loadedChordNames;
@@ -368,10 +368,10 @@
                     loadedChordNames.push_back(os.str());                
                     
                     m_chordnotes->push_back(tempchordnotes);
-                    for (int iNote = 0; iNote < tempchordnotes.size(); ++iNote) {
-                        cerr << tempchordnotes[iNote] << " ";
-                    }
-                    cerr << endl;
+                    // for (int iNote = 0; iNote < tempchordnotes.size(); ++iNote) {
+                    //     cerr << tempchordnotes[iNote] << " ";
+                    // }
+                    // cerr << endl;
                 }
             }
         }
@@ -382,8 +382,8 @@
         vector<int> tempchordvector;
         m_chordnotes->push_back(tempchordvector);
         float exponent = 2.0;
-        float boostN = 1.1;
-        
+        // float m_boostN = 1.1;
+        // cerr << " N BOOST : " << boostN << endl << endl;
         for (int iChord = 0; iChord < loadedChordDict.size()/24; iChord++) {
             float sum = 0;
             float stand = 0;