X-Git-Url: https://code.delx.au/virtualtones/blobdiff_plain/e0efeea407809897396731f760ff60e361351d83..cb268b4b10d164509f5c02d4719dfb00dd9d61e9:/instrument.cpp diff --git a/instrument.cpp b/instrument.cpp index b4e7296..546100e 100644 --- a/instrument.cpp +++ b/instrument.cpp @@ -1,10 +1,12 @@ // instrument.cpp - An instrument widget -// Written by James Bunton +// Written by James Bunton // Licensed under the GPL, see COPYING.txt for more details #include "instrument.h" +using namespace Qt; + Instrument::Instrument(QWidget *parent) : QWidget(parent, 0) @@ -96,7 +98,7 @@ QString Instrument::midi2string(int num) for(octave = 0; num >= 12; octave++) { num -= 12; } - return QString(midnotes[num] + " - Octave: " + QString::number(octave - 6)); // Middle C is then "C - Octave: 3" + return QString(midnotes[num] + " - Octave: " + QString::number(octave - 2)); // Middle C is then "C - Octave: 3" } bool Instrument::checkSharp(int note) @@ -112,5 +114,3 @@ bool Instrument::checkSharp(int note) return false; } - -