Esempio n. 1
0
int generator::getNoteIndex(const Chord& tonicChord, const Note& note){
	for (int i = 1; i <= 7; i++){
		if ((getNoteFrequencyByIndex(tonicChord, i) - note.getFrequency()) % 12 == 0){
			return i + ((note.getFrequency() - getNoteFrequencyByIndex(tonicChord, i)) / 12) * 7;
		}
	}
	return 1;
}
Esempio n. 2
0
bool Note::operator>(Note rechts){
  return frequency > rechts.getFrequency();
}