summaryrefslogtreecommitdiff
path: root/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/tonleiter/tonleiterdatahelper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/tonleiter/tonleiterdatahelper.cpp4
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,8 +1,10 @@
#include "tonleiterdatahelper.h"
+#include <math.h>
+
using namespace Data;
int Note::getOctaveOfNote(int note)
{
int remain=note%12;
return (note-remain)/12;
@@ -73,13 +75,13 @@ int Instrument::string(int id)
}
//****************************************************************************
int Instrument::noOfOctaves()
{
int lowest=strings[0];
int highest=strings[strings.count()-1]+frets;
- return (int)((highest-lowest)/12.0);
+ return (int) ceil((highest-lowest)/12.0);
}
//****************************************************************************
//****************************************************************************
Scale::Scale()
{
name="UNDEFINED";