Diffstat (limited to 'noncore/multimedia/tonleiter/tonleiterdatahelper.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/tonleiter/tonleiterdatahelper.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp index d904a71..285d2c1 100644 --- a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp +++ b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp | |||
@@ -25,25 +25,25 @@ int Note::getNoteFromName(QString name,int octave) | |||
25 | { | 25 | { |
26 | notevalue=a; | 26 | notevalue=a; |
27 | break; | 27 | break; |
28 | } | 28 | } |
29 | } | 29 | } |
30 | return notevalue+12*octave; | 30 | return notevalue+12*octave; |
31 | } | 31 | } |
32 | //**************************************************************************** | 32 | //**************************************************************************** |
33 | int Note::octaveOfBaseNote(int base,int note) | 33 | int Note::octaveOfBaseNote(int base,int note) |
34 | { | 34 | { |
35 | int normnote = (note>=base) ? note-base : (12-base)+note; | 35 | int normnote = (note>=base) ? note-base : (12-base)+note; |
36 | int octave=getOctaveOfNote(normnote); | 36 | int octave=getOctaveOfNote(normnote); |
37 | //qDebug("note %d of %d base is norm %d -> ocatve %d",note,base,normnote,octave); | 37 | //odebug << "note " << note << " of " << base << " base is norm " << normnote << " -> ocatve " << octave << "" << oendl; |
38 | return octave; | 38 | return octave; |
39 | } | 39 | } |
40 | //**************************************************************************** | 40 | //**************************************************************************** |
41 | //**************************************************************************** | 41 | //**************************************************************************** |
42 | Instrument::Instrument() | 42 | Instrument::Instrument() |
43 | { | 43 | { |
44 | name="UNDEFINED"; | 44 | name="UNDEFINED"; |
45 | frets=0; | 45 | frets=0; |
46 | } | 46 | } |
47 | //**************************************************************************** | 47 | //**************************************************************************** |
48 | Instrument::Instrument(QString name,int frets,QValueList<int> strings) | 48 | Instrument::Instrument(QString name,int frets,QValueList<int> strings) |
49 | :name(name),frets(frets),strings(strings) | 49 | :name(name),frets(frets),strings(strings) |
@@ -122,23 +122,23 @@ QString Scale::scaleName() | |||
122 | { | 122 | { |
123 | return name; | 123 | return name; |
124 | } | 124 | } |
125 | //**************************************************************************** | 125 | //**************************************************************************** |
126 | bool Scale::noteInScale(int base,int note) | 126 | bool Scale::noteInScale(int base,int note) |
127 | { | 127 | { |
128 | int octave=Note::getOctaveOfNote(note); | 128 | int octave=Note::getOctaveOfNote(note); |
129 | note-=12*octave; | 129 | note-=12*octave; |
130 | int normnote = (note>=base) ? note-base : (12-base)+note; | 130 | int normnote = (note>=base) ? note-base : (12-base)+note; |
131 | 131 | ||
132 | if(halftones.contains(normnote)>0) | 132 | if(halftones.contains(normnote)>0) |
133 | { | 133 | { |
134 | //qDebug("OK : base : %d, note %d -> norm %d",base,note,normnote); | 134 | //odebug << "OK : base : " << base << ", note " << note << " -> norm " << normnote << "" << oendl; |
135 | return true; | 135 | return true; |
136 | } | 136 | } |
137 | else | 137 | else |
138 | { | 138 | { |
139 | //qDebug("BAD : base : %d, note %d -> norm %d",base,note,normnote); | 139 | //odebug << "BAD : base : " << base << ", note " << note << " -> norm " << normnote << "" << oendl; |
140 | return false; | 140 | return false; |
141 | } | 141 | } |
142 | } | 142 | } |
143 | //**************************************************************************** | 143 | //**************************************************************************** |
144 | //**************************************************************************** | 144 | //**************************************************************************** |