diff chromamethods.cpp @ 87:f568555390f1 consonance

refined chord note output
author matthiasm
date Sun, 28 Nov 2010 23:49:30 +0900
parents e5c16976513d
children 7af5312e66f8
line wrap: on
line diff
--- a/chromamethods.cpp	Sun Nov 28 23:10:57 2010 +0900
+++ b/chromamethods.cpp	Sun Nov 28 23:49:30 2010 +0900
@@ -342,6 +342,7 @@
                             slashNotation = bassnames[iSemitone][kSemitone];
                         }
                     }
+                    if (slashNotation=="") tempchordnotes.push_back(MIDI_basenote + (iSemitone+12) % 12);
                     for (unsigned kSemitone = 0; kSemitone < 12; kSemitone++) { // bass pitch classes
                         // cerr << ((kSemitone - iSemitone + 12) % 12) << endl;
                         float bassValue = 0;
@@ -351,7 +352,7 @@
                         } else {
                             if (tempPCVector[((kSemitone - iSemitone + 12) % 12) + 12] == 1) bassValue = 0.5;
                         }
-                        loadedChordDict.push_back(bassValue);
+                        loadedChordDict.push_back(bassValue);                        
                     }
                     for (unsigned kSemitone = 0; kSemitone < 12; kSemitone++) { // chord pitch classes
                         loadedChordDict.push_back(tempPCVector[((kSemitone - iSemitone + 12) % 12) + 12]);
@@ -364,7 +365,8 @@
                         os << notenames[12+iSemitone] << chordType << "/" << slashNotation;
                     }
                     // cerr << os.str() << endl;
-                    loadedChordNames.push_back(os.str());
+                    loadedChordNames.push_back(os.str());                
+                    
                     m_chordnotes->push_back(tempchordnotes);
                     for (int iNote = 0; iNote < tempchordnotes.size(); ++iNote) {
                         cerr << tempchordnotes[iNote] << " ";