author | waspe <waspe> | 2004-01-24 13:44:29 (UTC) |
---|---|---|
committer | waspe <waspe> | 2004-01-24 13:44:29 (UTC) |
commit | 5f333c6832ff429a00498e6a36be950525541a2a (patch) (unidiff) | |
tree | 035616d3cc11622f6d9b14245372362620327a46 /noncore/multimedia/tonleiter/tonleiterdatahelper.cpp | |
parent | d542ba6a426f9868d521dbd9eb502184086535fc (diff) | |
download | opie-5f333c6832ff429a00498e6a36be950525541a2a.zip opie-5f333c6832ff429a00498e6a36be950525541a2a.tar.gz opie-5f333c6832ff429a00498e6a36be950525541a2a.tar.bz2 |
new color scheme on fretboard, maekes each ocatave appear in different color
Diffstat (limited to 'noncore/multimedia/tonleiter/tonleiterdatahelper.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/tonleiter/tonleiterdatahelper.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp index 156dba5..d904a71 100644 --- a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp +++ b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp | |||
@@ -77,7 +77,16 @@ int Instrument::string(int id) | |||
77 | int Instrument::noOfOctaves() | 77 | int Instrument::noOfOctaves() |
78 | { | 78 | { |
79 | int lowest=strings[0]; | 79 | return (int) ceil((highestNote()-lowestNote())/12.0); |
80 | int highest=strings[strings.count()-1]+frets; | 80 | } |
81 | return (int) ceil((highest-lowest)/12.0); | 81 | //**************************************************************************** |
82 | int Instrument::lowestNote() | ||
83 | { | ||
84 | return strings[0]; | ||
85 | |||
86 | } | ||
87 | //**************************************************************************** | ||
88 | int Instrument::highestNote() | ||
89 | { | ||
90 | return strings[strings.count()-1]+frets; | ||
82 | } | 91 | } |
83 | //**************************************************************************** | 92 | //**************************************************************************** |