author | waspe <waspe> | 2003-12-02 19:03:50 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-12-02 19:03:50 (UTC) |
commit | 64304e555fc3e06aa69fa2f4a514ee55b7aa98bc (patch) (unidiff) | |
tree | 3ce47189f43f18cccd42d326cf52977b339c744d /noncore/multimedia/tonleiter/tonleiterdatahelper.cpp | |
parent | 7b74f202db22d458c43b2063ae128bf79b0e9777 (diff) | |
download | opie-64304e555fc3e06aa69fa2f4a514ee55b7aa98bc.zip opie-64304e555fc3e06aa69fa2f4a514ee55b7aa98bc.tar.gz opie-64304e555fc3e06aa69fa2f4a514ee55b7aa98bc.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'noncore/multimedia/tonleiter/tonleiterdatahelper.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/tonleiter/tonleiterdatahelper.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp index 5714cea..156dba5 100644 --- a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp +++ b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp | |||
@@ -1,5 +1,7 @@ | |||
1 | #include "tonleiterdatahelper.h" | 1 | #include "tonleiterdatahelper.h" |
2 | 2 | ||
3 | #include <math.h> | ||
4 | |||
3 | using namespace Data; | 5 | using namespace Data; |
4 | 6 | ||
5 | int Note::getOctaveOfNote(int note) | 7 | int Note::getOctaveOfNote(int note) |
@@ -76,7 +78,7 @@ int Instrument::noOfOctaves() | |||
76 | { | 78 | { |
77 | int lowest=strings[0]; | 79 | int lowest=strings[0]; |
78 | int highest=strings[strings.count()-1]+frets; | 80 | int highest=strings[strings.count()-1]+frets; |
79 | return (int)((highest-lowest)/12.0); | 81 | return (int) ceil((highest-lowest)/12.0); |
80 | } | 82 | } |
81 | //**************************************************************************** | 83 | //**************************************************************************** |
82 | //**************************************************************************** | 84 | //**************************************************************************** |