Show true US Imperial running-dog color
$ sed --in-place s/colour/color/g $(git grep -l colour) $ sed --in-place s/Colour/Color/g $(git grep -l Colour)
This commit is contained in:
parent
cfd4352e7f
commit
3838ca9028
|
@ -41,7 +41,7 @@ Piano Booster main screen
|
|||
|
||||
*PianoBooster* has been designed to allow you to play along on a midi piano
|
||||
keyboard with the scrolling notes shown on the screen. The notes you press on
|
||||
the keyboard appear as coloured lines on the musical stave, the colour of which
|
||||
the keyboard appear as colored lines on the musical stave, the color of which
|
||||
depends whether you have pressed the right or wrong note.
|
||||
|
||||
A different musical instrument sound is used for your playing depending whether
|
||||
|
|
|
@ -52,7 +52,7 @@ Adjust the tick rate in mSec, the default being 4 (12 windows)
|
|||
.SH "USAGE"
|
||||
Piano Booster is a fun way of playing along with a musical accompaniment and at the same time learning the basics of reading musical notation. The difference between playing along to a CD or a standard midi file is that Piano Booster listens and follows what you are playing on a midi piano keyboard.
|
||||
|
||||
The program has been designed to allow you to play along on a midi piano keyboard with the scrolling notes shown on the screen. The notes you press on the keyboard appear as coloured lines on the musical stave, the colour of which depends whether you have pressed the right or wrong note.
|
||||
The program has been designed to allow you to play along on a midi piano keyboard with the scrolling notes shown on the screen. The notes you press on the keyboard appear as colored lines on the musical stave, the color of which depends whether you have pressed the right or wrong note.
|
||||
|
||||
A different musical instrument sound is used for your playing depending whether you are playing the right or wrong notes. This feature also allows Piano Booster to be used with printed sheet music so you can hear if you are playing the right notes while at the same time keeping your eyes on the printed score. The music accompaniment will automatically wait for you to find and play the correct notes in the piece.
|
||||
|
||||
|
|
42
src/Cfg.h
42
src/Cfg.h
|
@ -41,13 +41,13 @@
|
|||
#endif
|
||||
|
||||
|
||||
class CColour
|
||||
class CColor
|
||||
{
|
||||
public:
|
||||
CColour() { red = green = blue = 0; }
|
||||
CColor() { red = green = blue = 0; }
|
||||
|
||||
|
||||
CColour(double r, double g, double b)
|
||||
CColor(double r, double g, double b)
|
||||
{
|
||||
red = static_cast<float>(r);
|
||||
green = static_cast<float>(g);
|
||||
|
@ -55,9 +55,9 @@ public:
|
|||
}
|
||||
float red, green, blue;
|
||||
|
||||
bool operator==(CColour colour)
|
||||
bool operator==(CColor color)
|
||||
{
|
||||
if (red == colour.red && green == colour.green && blue == colour.blue)
|
||||
if (red == color.red && green == color.green && blue == color.blue)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -87,24 +87,24 @@ public:
|
|||
static int chordMaxLength() {return 20;} // the max time between the start and end of a cord
|
||||
|
||||
|
||||
static CColour menuColour() {return CColour(0.1, 0.6, 0.6);}
|
||||
static CColour menuSelectedColour(){return CColour(0.7, 0.7, 0.1);}
|
||||
static CColor menuColor() {return CColor(0.1, 0.6, 0.6);}
|
||||
static CColor menuSelectedColor(){return CColor(0.7, 0.7, 0.1);}
|
||||
|
||||
|
||||
static CColour staveColour() {return CColour(0.1, 0.7, 0.1);} // green
|
||||
static CColour staveColourDim() {return CColour(0.15, 0.40, 0.15);} // grey
|
||||
static CColour noteColour() {return CColour(0.1, 0.9, 0.1);} // green
|
||||
static CColour noteColourDim() {return CColour(0.25, 0.45, 0.25);} // green
|
||||
//static CColour playedGoodColour() {return CColour(0.6, 0.6, 1.0);} // grey
|
||||
static CColour playedGoodColour() {return CColour(0.5, 0.6, 1.0);} // purple 0.6, 0.6, 1.0
|
||||
static CColour playedBadColour() {return CColour(0.8, 0.3, 0.8);} // orange 0.7, 0.0, 0.0
|
||||
static CColour playedStoppedColour() {return CColour(1.0, 0.8, 0.0);} // bright orange
|
||||
static CColour backgroundColour() {return CColour(0.0, 0.0, 0.0);} // black
|
||||
static CColour barMarkerColour() {return CColour(0.3, 0.25, 0.25);} // grey
|
||||
static CColour beatMarkerColour() {return CColour(0.25, 0.2, 0.2);} // grey
|
||||
static CColour pianoGoodColour() {return playedGoodColour();}
|
||||
static CColour pianoBadColour() {return CColour(1.0, 0.0, 0.0);}
|
||||
static CColour noteNameColour() {return CColour(1.0, 1.0, 1.0);}
|
||||
static CColor staveColor() {return CColor(0.1, 0.7, 0.1);} // green
|
||||
static CColor staveColorDim() {return CColor(0.15, 0.40, 0.15);} // grey
|
||||
static CColor noteColor() {return CColor(0.1, 0.9, 0.1);} // green
|
||||
static CColor noteColorDim() {return CColor(0.25, 0.45, 0.25);} // green
|
||||
//static CColor playedGoodColor() {return CColor(0.6, 0.6, 1.0);} // grey
|
||||
static CColor playedGoodColor() {return CColor(0.5, 0.6, 1.0);} // purple 0.6, 0.6, 1.0
|
||||
static CColor playedBadColor() {return CColor(0.8, 0.3, 0.8);} // orange 0.7, 0.0, 0.0
|
||||
static CColor playedStoppedColor() {return CColor(1.0, 0.8, 0.0);} // bright orange
|
||||
static CColor backgroundColor() {return CColor(0.0, 0.0, 0.0);} // black
|
||||
static CColor barMarkerColor() {return CColor(0.3, 0.25, 0.25);} // grey
|
||||
static CColor beatMarkerColor() {return CColor(0.25, 0.2, 0.2);} // grey
|
||||
static CColor pianoGoodColor() {return playedGoodColor();}
|
||||
static CColor pianoBadColor() {return CColor(1.0, 0.0, 0.0);}
|
||||
static CColor noteNameColor() {return CColor(1.0, 1.0, 1.0);}
|
||||
|
||||
static void setDefaults() {
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -321,16 +321,16 @@ void CConductor::setActiveHand(whichPart_t hand)
|
|||
int note;
|
||||
int i;
|
||||
|
||||
// Reset the note colours
|
||||
// Reset the note colors
|
||||
for(i = 0; i < m_savedWantedChord.length(); i++)
|
||||
{
|
||||
note = m_savedWantedChord.getNote(i).pitch();
|
||||
m_scoreWin->setPlayedNoteColour(note, Cfg::noteColour(), m_chordDeltaTime);
|
||||
m_scoreWin->setPlayedNoteColor(note, Cfg::noteColor(), m_chordDeltaTime);
|
||||
}
|
||||
for(i = 0; i < m_wantedChord.length(); i++)
|
||||
{
|
||||
note = m_wantedChord.getNote(i).pitch();
|
||||
m_scoreWin->setPlayedNoteColour(note, Cfg::playedStoppedColour(), m_chordDeltaTime);
|
||||
m_scoreWin->setPlayedNoteColor(note, Cfg::playedStoppedColor(), m_chordDeltaTime);
|
||||
}
|
||||
findSplitPoint();
|
||||
forceScoreRedraw();
|
||||
|
@ -714,8 +714,8 @@ void CConductor::pianistInput(CMidiEvent inputNote)
|
|||
pianistTiming = m_pianistTiming;
|
||||
else
|
||||
pianistTiming = NOT_USED;
|
||||
m_scoreWin->setPlayedNoteColour(inputNote.note(),
|
||||
(!m_followPlayingTimeOut)? Cfg::playedGoodColour():Cfg::playedBadColour(),
|
||||
m_scoreWin->setPlayedNoteColor(inputNote.note(),
|
||||
(!m_followPlayingTimeOut)? Cfg::playedGoodColor():Cfg::playedBadColor(),
|
||||
m_chordDeltaTime, pianistTiming);
|
||||
|
||||
if (validatePianistChord() == true)
|
||||
|
@ -756,7 +756,7 @@ void CConductor::pianistInput(CMidiEvent inputNote)
|
|||
else // Hitting bad notes within the zone (so register them)
|
||||
{
|
||||
// Register the wrong note in the ratings calculation (if not as missed notes, I don't believe it's factored in)
|
||||
missedNotesColour(Cfg::pianoBadColour());
|
||||
missedNotesColor(Cfg::pianoBadColor());
|
||||
m_rating.lateNotes(m_wantedChord.length() - m_goodPlayedNotes.length());
|
||||
setEventBits(EVENT_BITS_forceRatingRedraw);
|
||||
fetchNextChord(); // Skip through the wrong note and continue to the next
|
||||
|
@ -771,8 +771,8 @@ void CConductor::pianistInput(CMidiEvent inputNote)
|
|||
pianistTiming = m_pianistTiming;
|
||||
else
|
||||
pianistTiming = NOT_USED;
|
||||
m_scoreWin->setPlayedNoteColour(inputNote.note(),
|
||||
(!m_followPlayingTimeOut)? Cfg::playedGoodColour():Cfg::playedBadColour(),
|
||||
m_scoreWin->setPlayedNoteColor(inputNote.note(),
|
||||
(!m_followPlayingTimeOut)? Cfg::playedGoodColor():Cfg::playedBadColor(),
|
||||
m_chordDeltaTime, pianistTiming);
|
||||
|
||||
if (validatePianistChord() == true)
|
||||
|
@ -814,8 +814,8 @@ void CConductor::pianistInput(CMidiEvent inputNote)
|
|||
bool hasNote = m_goodPlayedNotes.removeNote(inputNote.note());
|
||||
|
||||
if (hasNote)
|
||||
m_scoreWin->setPlayedNoteColour(inputNote.note(),
|
||||
(!m_followPlayingTimeOut)? Cfg::noteColour():Cfg::playedStoppedColour(),
|
||||
m_scoreWin->setPlayedNoteColor(inputNote.note(),
|
||||
(!m_followPlayingTimeOut)? Cfg::noteColor():Cfg::playedStoppedColor(),
|
||||
m_chordDeltaTime);
|
||||
|
||||
outputSavedNotesOff();
|
||||
|
@ -921,7 +921,7 @@ void CConductor::followPlaying()
|
|||
{
|
||||
if (m_chordDeltaTime > m_cfg_playZoneLate )
|
||||
{
|
||||
missedNotesColour(Cfg::playedStoppedColour());
|
||||
missedNotesColor(Cfg::playedStoppedColor());
|
||||
fetchNextChord();
|
||||
m_rating.lateNotes(m_wantedChord.length() - m_goodPlayedNotes.length());
|
||||
setEventBits( EVENT_BITS_forceRatingRedraw);
|
||||
|
@ -957,7 +957,7 @@ void CConductor::findImminentNotesOff()
|
|||
}
|
||||
}
|
||||
|
||||
void CConductor::missedNotesColour(CColour colour)
|
||||
void CConductor::missedNotesColor(CColor color)
|
||||
{
|
||||
int i;
|
||||
CNote note;
|
||||
|
@ -965,7 +965,7 @@ void CConductor::missedNotesColour(CColour colour)
|
|||
{
|
||||
note = m_wantedChord.getNote(i);
|
||||
if (m_goodPlayedNotes.searchChord(note.pitch(),m_transpose) == false)
|
||||
m_scoreWin->setPlayedNoteColour(note.pitch() + m_transpose, colour, m_chordDeltaTime);
|
||||
m_scoreWin->setPlayedNoteColor(note.pitch() + m_transpose, color, m_chordDeltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1009,7 +1009,7 @@ void CConductor::realTimeEngine(int mSecTicks)
|
|||
m_rating.lateNotes(m_wantedChord.length() - m_goodPlayedNotes.length());
|
||||
setEventBits( EVENT_BITS_forceRatingRedraw);
|
||||
|
||||
missedNotesColour(Cfg::playedStoppedColour());
|
||||
missedNotesColor(Cfg::playedStoppedColor());
|
||||
findImminentNotesOff();
|
||||
// Don't keep any saved notes off if there are no notes down
|
||||
if (m_piano->pianistAllNotesDown() == 0)
|
||||
|
|
|
@ -253,7 +253,7 @@ private:
|
|||
void updatePianoSounds();
|
||||
|
||||
void followPlaying();
|
||||
void missedNotesColour(CColour colour);
|
||||
void missedNotesColor(CColor color);
|
||||
|
||||
int calcBoostVolume(int chan, int volume);
|
||||
|
||||
|
|
92
src/Draw.cpp
92
src/Draw.cpp
|
@ -56,9 +56,9 @@ void CDraw::drawStaveExtentsion(CSymbol symbol, float x, int noteWidth, bool pl
|
|||
whichPart_t hand = symbol.getStavePos().getHand();
|
||||
|
||||
if (playable)
|
||||
drColour(Cfg::staveColour());
|
||||
drColor(Cfg::staveColor());
|
||||
else
|
||||
drColour(Cfg::staveColourDim());
|
||||
drColor(Cfg::staveColorDim());
|
||||
|
||||
glLineWidth (Cfg::staveThickness());
|
||||
glBegin(GL_LINES);
|
||||
|
@ -97,7 +97,7 @@ void CDraw::drawNoteName(int midiNote, float x, float y, int type)
|
|||
|
||||
staveLookup_t item = CStavePos::midiNote2Name(midiNote);
|
||||
|
||||
drColour(Cfg::noteNameColour());
|
||||
drColor(Cfg::noteNameColor());
|
||||
|
||||
glLineWidth (1.0);
|
||||
|
||||
|
@ -329,7 +329,7 @@ void CDraw::checkAccidental(CSymbol symbol, float x, float y)
|
|||
|
||||
if (accidental != 0)
|
||||
{
|
||||
//drColour (Cfg::lineColour());
|
||||
//drColor (Cfg::lineColor());
|
||||
if (accidental == 1)
|
||||
drawSymbol(CSymbol(PB_SYMBOL_sharp, symbol.getStavePos()), x - xGap, y);
|
||||
else if (accidental == -1)
|
||||
|
@ -340,7 +340,7 @@ void CDraw::checkAccidental(CSymbol symbol, float x, float y)
|
|||
}
|
||||
|
||||
|
||||
bool CDraw::drawNote(CSymbol* symbol, float x, float y, CSlot* slot, CColour colour, bool playable)
|
||||
bool CDraw::drawNote(CSymbol* symbol, float x, float y, CSlot* slot, CColor color, bool playable)
|
||||
{
|
||||
const float stemLength = 34.0;
|
||||
float noteWidth = 6.0;
|
||||
|
@ -348,11 +348,11 @@ bool CDraw::drawNote(CSymbol* symbol, float x, float y, CSlot* slot, CColour col
|
|||
//ppLogTrace("PB_SYMBOL_noteHead x %f y %f", x, y);
|
||||
if (!CChord::isNotePlayable(symbol->getNote(), 0))
|
||||
{
|
||||
colour = Cfg::noteColourDim();
|
||||
color = Cfg::noteColorDim();
|
||||
playable = false;
|
||||
}
|
||||
drawStaveExtentsion(*symbol, x, 16, playable);
|
||||
drColour(colour);
|
||||
drColor(color);
|
||||
bool solidNoteHead = false;
|
||||
bool showNoteStem = false;
|
||||
int stemFlagCount = 0;
|
||||
|
@ -436,15 +436,15 @@ bool CDraw::drawNote(CSymbol* symbol, float x, float y, CSlot* slot, CColour col
|
|||
|
||||
void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
||||
{
|
||||
CColour colour = symbol.getColour();
|
||||
CColor color = symbol.getColor();
|
||||
bool playable = true;
|
||||
|
||||
if (m_displayHand != symbol.getHand() && m_displayHand != PB_PART_both)
|
||||
{
|
||||
if (colour == Cfg::noteColour())
|
||||
colour = Cfg::noteColourDim();
|
||||
if (colour == Cfg::staveColour())
|
||||
colour = Cfg::staveColourDim();
|
||||
if (color == Cfg::noteColor())
|
||||
color = Cfg::noteColorDim();
|
||||
if (color == Cfg::staveColor())
|
||||
color = Cfg::staveColorDim();
|
||||
playable = false;
|
||||
}
|
||||
|
||||
|
@ -452,7 +452,7 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
|||
{
|
||||
case PB_SYMBOL_gClef: // The Treble Clef
|
||||
y += 4;
|
||||
drColour(colour);
|
||||
drColor(color);
|
||||
glLineWidth (3.0);
|
||||
glBegin(GL_LINE_STRIP);
|
||||
glVertex2f( -0.011922 + x, -16.11494 + y); // 1
|
||||
|
@ -510,7 +510,7 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
|||
break;
|
||||
|
||||
case PB_SYMBOL_fClef: // The Base Clef
|
||||
drColour(colour);
|
||||
drColor(color);
|
||||
glLineWidth (3.0);
|
||||
glBegin(GL_LINE_STRIP);
|
||||
glVertex2f( -15.370325 + x, -17.42068 + y); // 1
|
||||
|
@ -562,7 +562,7 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
|||
//ppLogTrace("PB_SYMBOL_noteHead x %f y %f", x, y);
|
||||
if (!CChord::isNotePlayable(symbol.getNote(), 0))
|
||||
{
|
||||
colour = Cfg::noteColourDim();
|
||||
color = Cfg::noteColorDim();
|
||||
playable = false;
|
||||
}
|
||||
drawStaveExtentsion(symbol, x, 16, playable);
|
||||
|
@ -570,51 +570,51 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
|||
// See forum post at link below from PianoBooster forum user Kory.
|
||||
// http://piano-booster.2625608.n2.nabble.com/Pianobooster-port-to-arm-linux-or-Android-td7572459.html
|
||||
// http://piano-booster.2625608.n2.nabble.com/Pianobooster-port-to-arm-linux-or-Android-td7572459.html#a7572676
|
||||
if (m_settings->colouredNotes() && colour == Cfg::noteColour()) //KORY added
|
||||
if (m_settings->coloredNotes() && color == Cfg::noteColor()) //KORY added
|
||||
{
|
||||
int note = symbol.getNote() % MIDI_OCTAVE;
|
||||
switch (note)
|
||||
{
|
||||
case 0: //note::PitchLabel::C:
|
||||
colour = CColour(1.0, 0.0, 0.0); //Red
|
||||
color = CColor(1.0, 0.0, 0.0); //Red
|
||||
break;
|
||||
case 1: //note::PitchLabel::C♯:
|
||||
colour = CColour(1.0, 0.25, 0.0); //Red
|
||||
color = CColor(1.0, 0.25, 0.0); //Red
|
||||
break;
|
||||
case 2: //note::PitchLabel::D:
|
||||
colour = CColour(1.0, 0.5, 0.0); //Orange
|
||||
color = CColor(1.0, 0.5, 0.0); //Orange
|
||||
break;
|
||||
case 3: //note::PitchLabel::D♯:
|
||||
colour = CColour(1.0, 0.75, 0.0); //Orange
|
||||
color = CColor(1.0, 0.75, 0.0); //Orange
|
||||
break;
|
||||
case 4: //note::PitchLabel::E:
|
||||
colour = CColour(1.0, 1.0, 0.0); //Yellow
|
||||
color = CColor(1.0, 1.0, 0.0); //Yellow
|
||||
break;
|
||||
case 5: //note::PitchLabel::F:
|
||||
colour = CColour(0.0, 1.0, 0.0); //Green
|
||||
color = CColor(0.0, 1.0, 0.0); //Green
|
||||
break;
|
||||
case 6: //note::PitchLabel::F♯:
|
||||
colour = CColour(0.0, 0.5, 0.5); //Green
|
||||
color = CColor(0.0, 0.5, 0.5); //Green
|
||||
break;
|
||||
case 7: //note::PitchLabel::G:
|
||||
colour = CColour(0.0, 0.0, 1.0); //Blue
|
||||
color = CColor(0.0, 0.0, 1.0); //Blue
|
||||
break;
|
||||
case 8: //note::PitchLabel::G♯:
|
||||
colour = CColour(0.290, 0.0, 0.903); //Blue
|
||||
color = CColor(0.290, 0.0, 0.903); //Blue
|
||||
break;
|
||||
case 9: //note::PitchLabel::A:
|
||||
colour = CColour(0.580, 0.0, 0.827); //Dark Violet #9400D3
|
||||
color = CColor(0.580, 0.0, 0.827); //Dark Violet #9400D3
|
||||
break;
|
||||
case 10: //note::PitchLabel::A♯:
|
||||
colour = CColour(0.790, 0.0, 0.903); //Dark Violet #9400D3
|
||||
color = CColor(0.790, 0.0, 0.903); //Dark Violet #9400D3
|
||||
break;
|
||||
case 11: //note::PitchLabel::B:
|
||||
colour = CColour(1.0, 0.0, 1.0); //Magenta
|
||||
color = CColor(1.0, 0.0, 1.0); //Magenta
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
drColour(colour);
|
||||
drColor(color);
|
||||
glBegin(GL_POLYGON);
|
||||
glVertex2f(-7.0 + x, 2.0 + y); // 1
|
||||
glVertex2f(-5.0 + x, 4.0 + y); // 2
|
||||
|
@ -633,12 +633,12 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
|||
/*
|
||||
// shows the MIDI Duration (but not very useful)
|
||||
glLineWidth(4.0);
|
||||
drColour(CColour(0.3, 0.4, 0.4));
|
||||
drColor(CColor(0.3, 0.4, 0.4));
|
||||
glBegin(GL_LINE_STRIP);
|
||||
glVertex2f(x, y);
|
||||
glVertex2f(x + CMidiFile::ppqnAdjust(symbol.getMidiDuration()) * HORIZONTAL_SPACING_FACTOR, y);
|
||||
glEnd();
|
||||
drColour(colour);
|
||||
drColor(color);
|
||||
*/
|
||||
|
||||
checkAccidental(symbol, x, y);
|
||||
|
@ -646,8 +646,8 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
|||
|
||||
case PB_SYMBOL_drum:
|
||||
if (!CChord::isNotePlayable(symbol.getNote(), 0))
|
||||
colour = Cfg::noteColourDim();
|
||||
drColour(colour);
|
||||
color = Cfg::noteColorDim();
|
||||
drColor(color);
|
||||
glLineWidth (3.0);
|
||||
glBegin(GL_LINES);
|
||||
glVertex2f( 5.0 + x,-5.0 + y);
|
||||
|
@ -709,16 +709,16 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
|||
case PB_SYMBOL_barLine:
|
||||
x += BEAT_MARKER_OFFSET * HORIZONTAL_SPACING_FACTOR; // the beat markers where entered early so now move them correctly
|
||||
glLineWidth (4.0);
|
||||
drColour ((m_displayHand == PB_PART_left) ? Cfg::staveColourDim() : Cfg::staveColour());
|
||||
drColor ((m_displayHand == PB_PART_left) ? Cfg::staveColorDim() : Cfg::staveColor());
|
||||
oneLine(x, CStavePos(PB_PART_right, 4).getPosYRelative(), x, CStavePos(PB_PART_right, -4).getPosYRelative());
|
||||
drColour ((m_displayHand == PB_PART_right) ? Cfg::staveColourDim() : Cfg::staveColour());
|
||||
drColor ((m_displayHand == PB_PART_right) ? Cfg::staveColorDim() : Cfg::staveColor());
|
||||
oneLine(x, CStavePos(PB_PART_left, 4).getPosYRelative(), x, CStavePos(PB_PART_left, -4).getPosYRelative());
|
||||
break;
|
||||
|
||||
case PB_SYMBOL_barMarker:
|
||||
x += BEAT_MARKER_OFFSET * HORIZONTAL_SPACING_FACTOR; // the beat markers where entered early so now move them correctly
|
||||
glLineWidth (5.0);
|
||||
drColour(Cfg::barMarkerColour());
|
||||
drColor(Cfg::barMarkerColor());
|
||||
oneLine(x, CStavePos(PB_PART_right, m_beatMarkerHeight).getPosYRelative(), x, CStavePos(PB_PART_left, -m_beatMarkerHeight).getPosYRelative());
|
||||
glDisable (GL_LINE_STIPPLE);
|
||||
break;
|
||||
|
@ -726,7 +726,7 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
|||
case PB_SYMBOL_beatMarker:
|
||||
x += BEAT_MARKER_OFFSET * HORIZONTAL_SPACING_FACTOR; // the beat markers where entered early so now move them correctly
|
||||
glLineWidth (4.0);
|
||||
drColour(Cfg::beatMarkerColour());
|
||||
drColor(Cfg::beatMarkerColor());
|
||||
oneLine(x, CStavePos(PB_PART_right, m_beatMarkerHeight).getPosYRelative(), x, CStavePos(PB_PART_left, -m_beatMarkerHeight).getPosYRelative());
|
||||
glDisable (GL_LINE_STIPPLE);
|
||||
break;
|
||||
|
@ -753,7 +753,7 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
|||
default:
|
||||
|
||||
if (symbol.getType() >= PB_SYMBOL_noteHead)
|
||||
playable = drawNote(&symbol, x, y, slot, colour, playable);
|
||||
playable = drawNote(&symbol, x, y, slot, color, playable);
|
||||
else
|
||||
ppDEBUG(("ERROR drawSymbol unhandled symbol\n"));
|
||||
break;
|
||||
|
@ -765,7 +765,7 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
|||
if ( pianistX != NOT_USED)
|
||||
{
|
||||
pianistX = x + pianistX * HORIZONTAL_SPACING_FACTOR;
|
||||
drColour(CColour(1.0, 1.0, 1.0));
|
||||
drColor(CColor(1.0, 1.0, 1.0));
|
||||
glLineWidth (2.0);
|
||||
glBegin(GL_LINES);
|
||||
glVertex2f( 4.0 + pianistX, 4.0 + y);
|
||||
|
@ -807,8 +807,8 @@ void CDraw::drawStaves(float startX, float endX)
|
|||
|
||||
glLineWidth (Cfg::staveThickness());
|
||||
|
||||
/* select colour for all lines */
|
||||
drColour ((m_displayHand != PB_PART_left) ? Cfg::staveColour() : Cfg::staveColourDim());
|
||||
/* select color for all lines */
|
||||
drColor ((m_displayHand != PB_PART_left) ? Cfg::staveColor() : Cfg::staveColorDim());
|
||||
glBegin(GL_LINES);
|
||||
|
||||
for (i = -4; i <= 4; i+=2 )
|
||||
|
@ -817,7 +817,7 @@ void CDraw::drawStaves(float startX, float endX)
|
|||
glVertex2f (startX, pos.getPosY());
|
||||
glVertex2f (endX, pos.getPosY());
|
||||
}
|
||||
drColour ((m_displayHand != PB_PART_right) ? Cfg::staveColour() : Cfg::staveColourDim());
|
||||
drColor ((m_displayHand != PB_PART_right) ? Cfg::staveColor() : Cfg::staveColorDim());
|
||||
for (i = -4; i <= 4; i+=2 )
|
||||
{
|
||||
CStavePos pos = CStavePos(PB_PART_left, i);
|
||||
|
@ -848,13 +848,13 @@ void CDraw::drawKeySignature(int key)
|
|||
{
|
||||
if (i < arraySize(sharpLookUpRight))
|
||||
{
|
||||
drColour ((m_displayHand != PB_PART_left) ? Cfg::noteColour() : Cfg::noteColourDim());
|
||||
drColor ((m_displayHand != PB_PART_left) ? Cfg::noteColor() : Cfg::noteColorDim());
|
||||
pos = CStavePos(PB_PART_right, sharpLookUpRight[i]);
|
||||
drawSymbol( CSymbol(PB_SYMBOL_sharp, pos), Cfg::keySignatureX() + gapX*i );
|
||||
}
|
||||
if (i < arraySize(sharpLookUpLeft))
|
||||
{
|
||||
drColour ((m_displayHand != PB_PART_right) ? Cfg::noteColour() : Cfg::noteColourDim());
|
||||
drColor ((m_displayHand != PB_PART_right) ? Cfg::noteColor() : Cfg::noteColorDim());
|
||||
pos = CStavePos(PB_PART_left, sharpLookUpLeft[i]);
|
||||
drawSymbol( CSymbol(PB_SYMBOL_sharp, pos), Cfg::keySignatureX() + gapX*i );
|
||||
}
|
||||
|
@ -864,13 +864,13 @@ void CDraw::drawKeySignature(int key)
|
|||
{
|
||||
if (i < arraySize(flatLookUpRight))
|
||||
{
|
||||
drColour ((m_displayHand != PB_PART_left) ? Cfg::noteColour() : Cfg::noteColourDim());
|
||||
drColor ((m_displayHand != PB_PART_left) ? Cfg::noteColor() : Cfg::noteColorDim());
|
||||
pos = CStavePos(PB_PART_right, flatLookUpRight[i]);
|
||||
drawSymbol( CSymbol(PB_SYMBOL_flat, pos), Cfg::keySignatureX() + gapX*i );
|
||||
}
|
||||
if (i < arraySize(flatLookUpLeft))
|
||||
{
|
||||
drColour ((m_displayHand != PB_PART_right) ? Cfg::noteColour() : Cfg::noteColourDim());
|
||||
drColor ((m_displayHand != PB_PART_right) ? Cfg::noteColor() : Cfg::noteColorDim());
|
||||
pos = CStavePos(PB_PART_left, flatLookUpLeft[i]);
|
||||
drawSymbol( CSymbol(PB_SYMBOL_flat, pos), Cfg::keySignatureX() + gapX*i );
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ public:
|
|||
m_forceCompileRedraw = 1;
|
||||
}
|
||||
static whichPart_t getDisplayHand() {return m_displayHand;}
|
||||
static void drColour(CColour colour) { glColor3f(colour.red, colour.green, colour.blue);}
|
||||
static void drColor(CColor color) { glColor3f(color.red, color.green, color.blue);}
|
||||
static void forceCompileRedraw(int value = 1) { m_forceCompileRedraw = value; }
|
||||
|
||||
protected:
|
||||
|
@ -150,7 +150,7 @@ protected:
|
|||
private:
|
||||
Q_OBJECT
|
||||
void drawStaveNoteName(CSymbol symbol, float x, float y);
|
||||
bool drawNote(CSymbol* symbol, float x, float y, CSlot* slot, CColour colour, bool playable);
|
||||
bool drawNote(CSymbol* symbol, float x, float y, CSlot* slot, CColor color, bool playable);
|
||||
|
||||
void checkAccidental(CSymbol symbol, float x, float y);
|
||||
void drawStaveExtentsion(CSymbol symbol, float x, int noteWidth, bool playable);
|
||||
|
|
|
@ -55,7 +55,7 @@ CGLView::CGLView(QtWindow* parent, CSettings* settings)
|
|||
m_forceBarRedraw = 0;
|
||||
m_allowedTimerEvent = true;
|
||||
|
||||
m_backgroundColour = QColor(0, 0, 0);
|
||||
m_backgroundColor = QColor(0, 0, 0);
|
||||
|
||||
m_song = new CSong();
|
||||
m_score = new CScore(m_settings);
|
||||
|
@ -155,14 +155,14 @@ void CGLView::drawTimeSignature()
|
|||
|
||||
x = Cfg::timeSignatureX();
|
||||
|
||||
CDraw::drColour ((CDraw::getDisplayHand() != PB_PART_left) ? Cfg::noteColour() : Cfg::noteColourDim());
|
||||
CDraw::drColor ((CDraw::getDisplayHand() != PB_PART_left) ? Cfg::noteColor() : Cfg::noteColorDim());
|
||||
|
||||
y = CStavePos(PB_PART_right, 0).getPosY() + 5;
|
||||
renderText(x,y, 0, bufferTop, m_timeSigFont);
|
||||
y = CStavePos(PB_PART_right, -3).getPosY() - 2;
|
||||
renderText(x,y, 0, bufferBottom, m_timeSigFont);
|
||||
|
||||
CDraw::drColour ((CDraw::getDisplayHand() != PB_PART_right) ? Cfg::noteColour() : Cfg::noteColourDim());
|
||||
CDraw::drColor ((CDraw::getDisplayHand() != PB_PART_right) ? Cfg::noteColor() : Cfg::noteColorDim());
|
||||
|
||||
y = CStavePos(PB_PART_left, 0).getPosY() + 5;
|
||||
renderText(x,y, 0, bufferTop, m_timeSigFont);
|
||||
|
@ -181,7 +181,7 @@ void CGLView::drawAccurracyBar()
|
|||
|
||||
|
||||
float accuracy;
|
||||
CColour colour;
|
||||
CColor color;
|
||||
|
||||
float y = Cfg::getAppHeight() - 14;
|
||||
const float x = 120;
|
||||
|
@ -191,15 +191,15 @@ void CGLView::drawAccurracyBar()
|
|||
m_rating->calculateAccuracy();
|
||||
|
||||
accuracy = m_rating->getAccuracyValue();
|
||||
colour = m_rating->getAccuracyColour();
|
||||
CDraw::drColour (colour);
|
||||
color = m_rating->getAccuracyColor();
|
||||
CDraw::drColor (color);
|
||||
glRectf(x, y - lineWidth, x + width * accuracy, y + lineWidth);
|
||||
CDraw::drColour (Cfg::backgroundColour());
|
||||
CDraw::drColor (Cfg::backgroundColor());
|
||||
glRectf(x + width * accuracy, y - lineWidth, x + width, y + lineWidth);
|
||||
|
||||
|
||||
glLineWidth (1);
|
||||
CDraw::drColour (CColour(1.0, 1.0, 1.0));
|
||||
CDraw::drColor (CColor(1.0, 1.0, 1.0));
|
||||
glBegin(GL_LINE_LOOP);
|
||||
glVertex2f (x, y + lineWidth);
|
||||
glVertex2f (x+ width, y + lineWidth);
|
||||
|
@ -260,8 +260,8 @@ void CGLView::drawBarNumber()
|
|||
float y = Cfg::getAppHeight() - m_titleHeight - 34;
|
||||
float x = 30;
|
||||
|
||||
//CDraw::drColour (Cfg::backgroundColour());
|
||||
//CDraw::drColour (Cfg::noteColourDim());
|
||||
//CDraw::drColor (Cfg::backgroundColor());
|
||||
//CDraw::drColor (Cfg::noteColorDim());
|
||||
//glRectf(x+30+10, y-2, x + 80, y + 16);
|
||||
glColor3f(1.0,1.0,1.0);
|
||||
renderText(x, y, 0, tr("Bar:") + " " + QString::number(m_song->getBarNumber()), m_timeRatingFont);
|
||||
|
@ -322,8 +322,8 @@ void CGLView::mouseMoveEvent(QMouseEvent *event)
|
|||
|
||||
void CGLView::initializeGL()
|
||||
{
|
||||
CColour colour = Cfg::backgroundColour();
|
||||
glClearColor (colour.red, colour.green, colour.blue, 0.0);
|
||||
CColor color = Cfg::backgroundColor();
|
||||
glClearColor (color.red, color.green, color.blue, 0.0);
|
||||
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
|
||||
glShadeModel (GL_FLAT);
|
||||
//glEnable(GL_TEXTURE_2D); // Enable Texture Mapping
|
||||
|
|
|
@ -72,7 +72,7 @@ private:
|
|||
void updateMidiTask();
|
||||
|
||||
|
||||
QColor m_backgroundColour;
|
||||
QColor m_backgroundColor;
|
||||
QtWindow* m_qtWindow; // The parent Window
|
||||
CSettings* m_settings;
|
||||
CSong* m_song;
|
||||
|
|
|
@ -290,7 +290,7 @@ void CNotation::findNoteSlots()
|
|||
else
|
||||
symbolType = PB_SYMBOL_noteHead;
|
||||
CSymbol symbol(symbolType, hand, midi.note());
|
||||
symbol.setColour(Cfg::noteColour());
|
||||
symbol.setColor(Cfg::noteColor());
|
||||
symbol.setMidiDuration(midi.getDuration());
|
||||
|
||||
// check if this note has occurred in this bar before
|
||||
|
|
|
@ -88,12 +88,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void setNoteColour(int note, CColour colour )
|
||||
void setNoteColor(int note, CColor color )
|
||||
{
|
||||
for (int i = 0; i < m_length; i++)
|
||||
{
|
||||
if (note == m_symbols[i].getNote() || note == 0)
|
||||
m_symbols[i].setColour(colour);
|
||||
m_symbols[i].setColor(color);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -102,11 +102,11 @@ void CPiano::drawPianoInputNoteNames()
|
|||
}
|
||||
}
|
||||
|
||||
void CPiano::drawPianoInputLines(CChord* chord, CColour colour, int lineLength)
|
||||
void CPiano::drawPianoInputLines(CChord* chord, CColor color, int lineLength)
|
||||
{
|
||||
int i;
|
||||
|
||||
drColour(colour);
|
||||
drColor(color);
|
||||
|
||||
CStavePos stavePos;
|
||||
|
||||
|
@ -295,10 +295,10 @@ void CPiano::drawPianoInput()
|
|||
int lineLength = (showNoteName) ? PIANO_LINE_LENGTH_SHORT : PIANO_LINE_LENGTH_LONG;
|
||||
|
||||
if (m_goodChord.length() > 0)
|
||||
drawPianoInputLines(&m_goodChord, Cfg::pianoGoodColour(), lineLength);
|
||||
drawPianoInputLines(&m_goodChord, Cfg::pianoGoodColor(), lineLength);
|
||||
|
||||
if (m_badChord.length() > 0)
|
||||
drawPianoInputLines(&m_badChord, Cfg::pianoBadColour(), lineLength);
|
||||
drawPianoInputLines(&m_badChord, Cfg::pianoBadColor(), lineLength);
|
||||
|
||||
if (showNoteName)
|
||||
drawPianoInputNoteNames();
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
|
||||
private:
|
||||
void spaceNoteBunch(unsigned int bottomIndex, unsigned int topIndex);
|
||||
void drawPianoInputLines(CChord* chord, CColour colour, int lineLength);
|
||||
void drawPianoInputLines(CChord* chord, CColor color, int lineLength);
|
||||
void drawPianoInputNoteNames();
|
||||
void spaceNoteNames();
|
||||
void addNoteNameItem(float posY, int pitch, int type);
|
||||
|
@ -85,7 +85,7 @@ private:
|
|||
savedNoteOffChord_t m_savedChordLookUp[20];
|
||||
unsigned int m_noteNameListLength;
|
||||
|
||||
CChord m_goodChord; // The coloured note lines that appear on the score when the pianist plays
|
||||
CChord m_goodChord; // The colored note lines that appear on the score when the pianist plays
|
||||
CChord m_badChord;
|
||||
bool m_rhythmTapping;
|
||||
};
|
||||
|
|
|
@ -396,14 +396,14 @@ void QtWindow::createActions()
|
|||
}
|
||||
connect(m_viewPianoKeyboard, SIGNAL(triggered()), this, SLOT(onViewPianoKeyboard()));
|
||||
|
||||
m_colouredNotes = new QAction(tr("Color Coded Notes"), this);
|
||||
m_colouredNotes->setToolTip(tr("Color Code Notes in Score"));
|
||||
m_colouredNotes->setCheckable(true);
|
||||
m_colouredNotes->setChecked(false);
|
||||
if (m_settings->value("View/ColouredNotes").toString()=="on"){
|
||||
m_colouredNotes->setChecked(true);
|
||||
m_coloredNotes = new QAction(tr("Color Coded Notes"), this);
|
||||
m_coloredNotes->setToolTip(tr("Color Code Notes in Score"));
|
||||
m_coloredNotes->setCheckable(true);
|
||||
m_coloredNotes->setChecked(false);
|
||||
if (m_settings->value("View/ColoredNotes").toString()=="on"){
|
||||
m_coloredNotes->setChecked(true);
|
||||
}
|
||||
connect(m_colouredNotes, SIGNAL(triggered()), this, SLOT(onColouredNotes()));
|
||||
connect(m_coloredNotes, SIGNAL(triggered()), this, SLOT(onColoredNotes()));
|
||||
|
||||
m_setupPreferencesAct = new QAction(tr("&Preferences ..."), this);
|
||||
m_setupPreferencesAct->setToolTip(tr("Settings"));
|
||||
|
@ -465,7 +465,7 @@ void QtWindow::createMenus()
|
|||
m_viewMenu->addAction(m_sidePanelStateAct);
|
||||
m_viewMenu->addAction(m_fullScreenStateAct);
|
||||
m_viewMenu->addAction(m_viewPianoKeyboard);
|
||||
m_viewMenu->addAction(m_colouredNotes);
|
||||
m_viewMenu->addAction(m_coloredNotes);
|
||||
|
||||
m_songMenu = menuBar()->addMenu(tr("&Song"));
|
||||
m_songMenu->setToolTipsVisible(true);
|
||||
|
|
|
@ -130,8 +130,8 @@ private slots:
|
|||
showNormal();
|
||||
}
|
||||
|
||||
void onColouredNotes () {
|
||||
m_settings->colouredNotes(m_colouredNotes->isChecked());
|
||||
void onColoredNotes () {
|
||||
m_settings->coloredNotes(m_coloredNotes->isChecked());
|
||||
}
|
||||
|
||||
void enableFollowTempo()
|
||||
|
@ -218,7 +218,7 @@ private:
|
|||
QAction *m_setupKeyboardAct;
|
||||
QAction *m_sidePanelStateAct;
|
||||
QAction *m_viewPianoKeyboard;
|
||||
QAction *m_colouredNotes;
|
||||
QAction *m_coloredNotes;
|
||||
QAction *m_fullScreenStateAct;
|
||||
QAction *m_setupPreferencesAct;
|
||||
QAction *m_songDetailsAct;
|
||||
|
|
|
@ -64,15 +64,15 @@ void CRating::calculateAccuracy()
|
|||
float value;
|
||||
float stepUp;
|
||||
float stepDown;
|
||||
CColour colour;
|
||||
CColor color;
|
||||
} accuracyItem_t;
|
||||
const accuracyItem_t accuracyTable[] =
|
||||
{
|
||||
{1.00, 0.01, -0.08, CColour(0.5, 0.5, 1.0)}, // Only the colour is used on the top score
|
||||
{0.75, 0.01, -0.07, CColour(0.7, 0.3, 1.0)},
|
||||
{0.50, 0.01, -0.05, CColour(1.0, 0.6, 0.4)},
|
||||
{0.25, 0.01, -0.03, CColour(1.0, 0.3, 1.0)},
|
||||
{0.0 , 0.015, -0.02, CColour(1.0, 0.4, 0.2)}
|
||||
{1.00, 0.01, -0.08, CColor(0.5, 0.5, 1.0)}, // Only the color is used on the top score
|
||||
{0.75, 0.01, -0.07, CColor(0.7, 0.3, 1.0)},
|
||||
{0.50, 0.01, -0.05, CColor(1.0, 0.6, 0.4)},
|
||||
{0.25, 0.01, -0.03, CColor(1.0, 0.3, 1.0)},
|
||||
{0.0 , 0.015, -0.02, CColor(1.0, 0.4, 0.2)}
|
||||
};
|
||||
|
||||
size_t i;
|
||||
|
@ -97,7 +97,7 @@ void CRating::calculateAccuracy()
|
|||
{
|
||||
if (m_currentAccuracy >= accuracyTable[i].value || i+1 == arraySize(accuracyTable))
|
||||
{
|
||||
m_currentColour = accuracyTable[i].colour;
|
||||
m_currentColor = accuracyTable[i].color;
|
||||
if (m_currentAccuracy >= accuracyTable[ 1 ].value) // the second row in the table
|
||||
m_goodAccuracyFlag = true;
|
||||
break;
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
void calculateAccuracy();
|
||||
|
||||
float getAccuracyValue(){ return m_currentAccuracy; }
|
||||
CColour getAccuracyColour() { return m_currentColour; }
|
||||
CColor getAccuracyColor() { return m_currentColor; }
|
||||
bool isAccuracyGood() { return m_goodAccuracyFlag; }
|
||||
|
||||
private:
|
||||
|
@ -70,7 +70,7 @@ private:
|
|||
int m_wrongNoteCount;
|
||||
float m_currentAccuracy;
|
||||
float m_factor;
|
||||
CColour m_currentColour;
|
||||
CColor m_currentColor;
|
||||
bool m_goodAccuracyFlag;
|
||||
|
||||
};
|
||||
|
|
|
@ -73,7 +73,7 @@ void CScore::drawScroll(bool refresh)
|
|||
{
|
||||
float topY = CStavePos(PB_PART_right, MAX_STAVE_INDEX).getPosY();
|
||||
float bottomY = CStavePos(PB_PART_left, MIN_STAVE_INDEX).getPosY();
|
||||
drColour (Cfg::backgroundColour());
|
||||
drColor (Cfg::backgroundColor());
|
||||
glRectf(Cfg::scrollStartX(), topY, Cfg::getAppWidth(), bottomY);
|
||||
}
|
||||
|
||||
|
@ -135,9 +135,9 @@ void CScore::drawPianoKeyboard(){
|
|||
|
||||
float xKeySize = this->xKeySize / 1.5;
|
||||
|
||||
CDraw::drColour (CColour(0.0, 0.0, 0.0));
|
||||
if(state[k]==1) CDraw::drColour(stopped ? Cfg::playedStoppedColour() : Cfg::noteColour());
|
||||
if(state[k]==2) CDraw::drColour(Cfg::playedBadColour());
|
||||
CDraw::drColor (CColor(0.0, 0.0, 0.0));
|
||||
if(state[k]==1) CDraw::drColor(stopped ? Cfg::playedStoppedColor() : Cfg::noteColor());
|
||||
if(state[k]==2) CDraw::drColor(Cfg::playedBadColor());
|
||||
glBegin(GL_QUADS);
|
||||
glVertex2f(0, yBlackSize);
|
||||
glVertex2f(xKeySize, yBlackSize);
|
||||
|
@ -154,9 +154,9 @@ void CScore::drawPianoKeyboard(){
|
|||
glScalef(1, 1.4, 1);
|
||||
glTranslatef(Cfg::staveStartX() + xPlaceSize * i++, yStart, 0.0);
|
||||
|
||||
CDraw::drColour (CColour(1.0, 1.0, 1.0));
|
||||
if(state[k]==1) CDraw::drColour(stopped ? Cfg::playedStoppedColour() : Cfg::noteColour());
|
||||
if(state[k]==2) CDraw::drColour(Cfg::playedBadColour());
|
||||
CDraw::drColor (CColor(1.0, 1.0, 1.0));
|
||||
if(state[k]==1) CDraw::drColor(stopped ? Cfg::playedStoppedColor() : Cfg::noteColor());
|
||||
if(state[k]==2) CDraw::drColor(Cfg::playedBadColor());
|
||||
glBegin(GL_QUADS);
|
||||
glVertex2f(0, ySize);
|
||||
glVertex2f(xKeySize, ySize);
|
||||
|
@ -231,7 +231,7 @@ void CScore::drawScore()
|
|||
m_scoreDisplayListId = glGenLists (1);
|
||||
|
||||
glNewList (m_scoreDisplayListId, GL_COMPILE_AND_EXECUTE);
|
||||
drColour (Cfg::staveColour());
|
||||
drColor (Cfg::staveColor());
|
||||
|
||||
drawSymbol(CSymbol(PB_SYMBOL_gClef, CStavePos(PB_PART_right, -1)), Cfg::clefX()); // The Treble Clef
|
||||
drawSymbol(CSymbol(PB_SYMBOL_fClef, CStavePos(PB_PART_left, 1)), Cfg::clefX());
|
||||
|
|
|
@ -102,10 +102,10 @@ public:
|
|||
|
||||
CPiano* getPianoObject() { return m_piano;}
|
||||
|
||||
void setPlayedNoteColour(int note, CColour colour, int wantedDelta, int pianistTimming = NOT_USED)
|
||||
void setPlayedNoteColor(int note, CColor color, int wantedDelta, int pianistTimming = NOT_USED)
|
||||
{
|
||||
if (m_activeScroll>=0)
|
||||
m_scroll[m_activeScroll]->setPlayedNoteColour(note, colour, wantedDelta, pianistTimming);
|
||||
m_scroll[m_activeScroll]->setPlayedNoteColor(note, color, wantedDelta, pianistTimming);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -206,9 +206,9 @@ bool CScroll::validPianistChord(int index)
|
|||
return false;
|
||||
}
|
||||
|
||||
int CScroll::findWantedChord(int note, CColour colour, int wantedDelta)
|
||||
int CScroll::findWantedChord(int note, CColor color, int wantedDelta)
|
||||
{
|
||||
if (colour == Cfg::playedBadColour()) // fixme should be an enum
|
||||
if (color == Cfg::playedBadColor()) // fixme should be an enum
|
||||
return m_wantedIndex;
|
||||
{
|
||||
while ( m_wantedIndex + 1 < m_scrollQueue->length())
|
||||
|
@ -225,14 +225,14 @@ int CScroll::findWantedChord(int note, CColour colour, int wantedDelta)
|
|||
return m_wantedIndex;
|
||||
}
|
||||
|
||||
void CScroll::setPlayedNoteColour(int note, CColour colour, int wantedDelta, int pianistTimming)
|
||||
void CScroll::setPlayedNoteColor(int note, CColor color, int wantedDelta, int pianistTimming)
|
||||
{
|
||||
int index;
|
||||
if (m_wantedIndex >= m_scrollQueue->length())
|
||||
return;
|
||||
index = findWantedChord(note, colour, wantedDelta);
|
||||
index = findWantedChord(note, color, wantedDelta);
|
||||
note -= m_transpose;
|
||||
m_scrollQueue->indexPtr(index)->setNoteColour(note, colour);
|
||||
m_scrollQueue->indexPtr(index)->setNoteColor(note, color);
|
||||
if (pianistTimming != NOT_USED)
|
||||
{
|
||||
pianistTimming = deltaAdjust(pianistTimming) * DEFAULT_PPQN / CMidiFile::getPulsesPerQuarterNote();
|
||||
|
@ -263,7 +263,7 @@ bool CScroll::getKeyboardInfo(int *notes)
|
|||
CSlot* slot = &info;
|
||||
for(int j=0; j<slot->length(); ++j) {
|
||||
if(slot->getSymbol(j).getType() < PB_SYMBOL_noteHead) continue;
|
||||
if(slot->getSymbol(j).getColour() == Cfg::playedStoppedColour()) {
|
||||
if(slot->getSymbol(j).getColor() == Cfg::playedStoppedColor()) {
|
||||
stoppedScrollIdx = i;
|
||||
break;
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ bool CScroll::getKeyboardInfo(int *notes)
|
|||
CSlot* slot = &info;
|
||||
for(int j=0; j<slot->length(); ++j) {
|
||||
if(slot->getSymbol(j).getType() < PB_SYMBOL_noteHead) continue;
|
||||
slot->getSymbolPtr(j)->setColour(Cfg::playedGoodColour());
|
||||
slot->getSymbolPtr(j)->setColor(Cfg::playedGoodColor());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -293,10 +293,10 @@ bool CScroll::getKeyboardInfo(int *notes)
|
|||
for(int j=0; j<slot->length(); ++j) {
|
||||
if(slot->getSymbol(j).getType() < PB_SYMBOL_noteHead) continue;
|
||||
|
||||
if(slot->getSymbol(j).getColour() == Cfg::noteColour() ||
|
||||
slot->getSymbol(j).getColour() == Cfg::playedStoppedColour())
|
||||
if(slot->getSymbol(j).getColor() == Cfg::noteColor() ||
|
||||
slot->getSymbol(j).getColor() == Cfg::playedStoppedColor())
|
||||
*(note++) = slot->getSymbol(j).getNote();
|
||||
if(slot->getSymbol(j).getColour() == Cfg::playedStoppedColour()) stopped = true;
|
||||
if(slot->getSymbol(j).getColor() == Cfg::playedStoppedColor()) stopped = true;
|
||||
}
|
||||
if(note != notes) return stopped;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
void scrollDeltaTime(int ticks);
|
||||
void transpose(int transpose);
|
||||
void refresh();
|
||||
void setPlayedNoteColour(int note, CColour colour, int wantedDelta, int pianistTimming);
|
||||
void setPlayedNoteColor(int note, CColor color, int wantedDelta, int pianistTimming);
|
||||
void setChannel(int chan)
|
||||
{
|
||||
m_notation->setChannel( chan );
|
||||
|
@ -96,7 +96,7 @@ private:
|
|||
bool insertSlots();
|
||||
void removeSlots();
|
||||
void removeEarlyTimingMakers();
|
||||
int findWantedChord(int note, CColour colour, int wantedDelta);
|
||||
int findWantedChord(int note, CColor color, int wantedDelta);
|
||||
|
||||
int m_id; // There are lots of these class running but each class has a unique id
|
||||
CNotation *m_notation;
|
||||
|
|
|
@ -66,7 +66,7 @@ CSettings::CSettings(QtWindow *mainWindow) : QSettings(CSettings::IniFormat, CSe
|
|||
m_advancedMode = false;
|
||||
m_pianistActive = false;
|
||||
m_noteNamesEnabled = value("Score/NoteNames", true ).toBool();
|
||||
m_colouredNotes = value("Score/ColouredNotes", true ).toBool();
|
||||
m_coloredNotes = value("Score/ColoredNotes", true ).toBool();
|
||||
m_tutorPagesEnabled = value("Tutor/TutorPages", true ).toBool();
|
||||
CNotation::setCourtesyAccidentals(value("Score/CourtesyAccidentals", false ).toBool());
|
||||
m_followThroughErrorsEnabled = value("Score/FollowThroughErrors", false ).toBool();
|
||||
|
@ -104,9 +104,9 @@ void CSettings::setNoteNamesEnabled(bool value) {
|
|||
setValue("Score/NoteNames", value );
|
||||
}
|
||||
|
||||
void CSettings::setColouredNotes(bool value) {
|
||||
m_colouredNotes = value;
|
||||
setValue("Score/ColouredNotes", value );
|
||||
void CSettings::setColoredNotes(bool value) {
|
||||
m_coloredNotes = value;
|
||||
setValue("Score/ColoredNotes", value );
|
||||
}
|
||||
|
||||
void CSettings::setTutorPagesEnabled(bool value) {
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
|
||||
/// Saves in the .ini file whether the user wants to show the note names
|
||||
void setNoteNamesEnabled(bool value);
|
||||
void setColouredNotes(bool value);
|
||||
void setColoredNotes(bool value);
|
||||
void setTutorPagesEnabled(bool value);
|
||||
void setFollowThroughErrorsEnabled(bool value);
|
||||
|
||||
|
@ -68,13 +68,13 @@ public:
|
|||
return m_noteNamesEnabled;
|
||||
}
|
||||
|
||||
/// returns true if the user wants to see colour-coded notes
|
||||
bool colouredNotes(){
|
||||
return m_colouredNotes;
|
||||
/// returns true if the user wants to see color-coded notes
|
||||
bool coloredNotes(){
|
||||
return m_coloredNotes;
|
||||
}
|
||||
|
||||
void colouredNotes(bool b){
|
||||
m_colouredNotes = b;
|
||||
void coloredNotes(bool b){
|
||||
m_coloredNotes = b;
|
||||
}
|
||||
|
||||
/// returns true if the user wants Follow Skill to ignore errors
|
||||
|
@ -159,7 +159,7 @@ private:
|
|||
GuiSidePanel* m_guiSidePanel;
|
||||
GuiTopBar* m_guiTopBar;
|
||||
bool m_noteNamesEnabled;
|
||||
bool m_colouredNotes;
|
||||
bool m_coloredNotes;
|
||||
bool m_tutorPagesEnabled;
|
||||
bool m_advancedMode;
|
||||
bool m_followThroughErrorsEnabled;
|
||||
|
|
10
src/Symbol.h
10
src/Symbol.h
|
@ -91,12 +91,12 @@ public:
|
|||
init();
|
||||
}
|
||||
|
||||
CSymbol(musicalSymbol_t type, CStavePos stavePos, CColour colour = Cfg::noteColour())
|
||||
CSymbol(musicalSymbol_t type, CStavePos stavePos, CColor color = Cfg::noteColor())
|
||||
{
|
||||
init();
|
||||
m_symbolType = type;
|
||||
m_stavePos = stavePos;
|
||||
m_colour = colour;
|
||||
m_color = color;
|
||||
m_hand = stavePos.getHand();
|
||||
}
|
||||
|
||||
|
@ -131,8 +131,8 @@ public:
|
|||
//@brief get the Stave Position
|
||||
CStavePos getStavePos(){return m_stavePos;}
|
||||
|
||||
void setColour(CColour colour){ m_colour = colour;}
|
||||
CColour getColour(){return m_colour;}
|
||||
void setColor(CColor color){ m_color = color;}
|
||||
CColor getColor(){return m_color;}
|
||||
void setPianistTiming(int timing){ m_pianistTiming = timing;}
|
||||
int getPianistTiming(){ return m_pianistTiming; }
|
||||
|
||||
|
@ -184,7 +184,7 @@ private:
|
|||
int m_midiDuration;
|
||||
whichPart_t m_hand;
|
||||
|
||||
CColour m_colour;
|
||||
CColor m_color;
|
||||
int m_pianistTiming;
|
||||
int m_index; // the number of the note per hand starting from the bottom.
|
||||
int m_total; // the number of the notes per hand;
|
||||
|
|
Loading…
Reference in New Issue