Grand Staff?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Grand Staff?

syntopicon
Is there any way to make the notation more realistic, that is, notes with stems in a grand staff?  And not green?

also, is there some way to make chunks of the score appear as static blocks, and not scrolling, the way performers reading from sheet music would see it?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Grand Staff?

david
syntopicon wrote
Is there any way to make the notation more realistic, that is, notes with stems in a grand staff?  And not green?
Hi syntopicon

After finding PB last night I can only say I am blown away by it's abilities when connected to a digital piano. My partner who plays pinao, could only complain about the colours of PB's score display (as well as not writing the music with proper annotations)

Being a PHP/MySQL developer and XHTML Designer by trade i decidd that I'd look at the source to PB. Well after staying up all night giving myself a crash course in C++ and QT, i've at least managed to change the colours to represent more commonly written sheet music (ie, Black staffs, and notes). (See image below)



To make the changes in the source, you will need to edit Cfg.h, GlView.cpp and Draw.cpp then rebuild PB. As a courtesy, I have uploaded a copy of my build that you can replace your current build with or extract from the .zip and run. I had to include all new QT4 dll files as I built PB using the latest version of QT. You can download the zip file (5.6mb) from: HERE

As for the technical side of things, below are the code changes I have made.

In cfg.h from Line #94 replace:
    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);}
with
/* Changing the screen Colors to White Background with black music notes etc..

    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 CColour staveColour()           {return CColour(0, 0, 0);} // black
    static CColour staveColourDim()        {return CColour(0.5, 0.5, 0.5);} // grey
    static CColour noteColour()            {return CColour(0, 0, 0);} // black
    static CColour noteColourDim()         {return CColour(0.5, 0.5, 0.5);} // grey
    //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(1.0, 1.0, 1.0);} // white
    static CColour barMarkerColour()       {return CColour(0.8, 0.8, 0.8);} // light grey
    static CColour beatMarkerColour()      {return CColour(0.9, 0.9, 0.9);} // light grey
    static CColour pianoGoodColour()      {return playedGoodColour();}
    static CColour pianoBadColour()       {return CColour(1.0, 0.0, 0.0);}
    static CColour noteNameColour()       {return CColour(0, 0, 0);}
Draw.cpp @ Line #533(To change from that ugly blue bar to a single thin green line) Change:
 case PB_SYMBOL_playingZone:
            {
                float topY = CStavePos(PB_PART_right, m_beatMarkerHeight).getPosY();
                float bottomY = CStavePos(PB_PART_left, -m_beatMarkerHeight).getPosY();
                float early = Cfg::playZoneEarly() * HORIZONTAL_SPACING_FACTOR;
                float late = Cfg::playZoneLate() * HORIZONTAL_SPACING_FACTOR;
                //glColor3f (0.7, 1.0, 0.7);
                glColor3f (0.0, 0.0, 0.3);
                glRectf(x-late, topY, x + early, bottomY);
                glLineWidth (2.0);
                glColor3f (0.0, 0.0, 0.8);
                oneLine(x, topY, x, bottomY );
                glLineWidth (1.0);
                glColor3f (0.0, 0.0, 0.6);
                oneLine(x-late, topY, x-late, bottomY );
                oneLine(x+early, topY, x+early, bottomY );
            }
with
/* Changing the position bar to a single green line

 case PB_SYMBOL_playingZone:
            {
                float topY = CStavePos(PB_PART_right, m_beatMarkerHeight).getPosY();
                float bottomY = CStavePos(PB_PART_left, -m_beatMarkerHeight).getPosY();
                float early = Cfg::playZoneEarly() * HORIZONTAL_SPACING_FACTOR;
                float late = Cfg::playZoneLate() * HORIZONTAL_SPACING_FACTOR;
                //glColor3f (0.7, 1.0, 0.7);
                glColor3f (0.0, 0.0, 0.3);
                glRectf(x-late, topY, x + early, bottomY);
                glLineWidth (2.0);
                glColor3f (0.0, 0.0, 0.8);
                oneLine(x, topY, x, bottomY );
                glLineWidth (1.0);
                glColor3f (0.0, 0.0, 0.6);
                oneLine(x-late, topY, x-late, bottomY );
                oneLine(x+early, topY, x+early, bottomY );
            }


 */
         case PB_SYMBOL_playingZone:
            {
                float topY = CStavePos(PB_PART_right, m_beatMarkerHeight).getPosY();
                float bottomY = CStavePos(PB_PART_left, -m_beatMarkerHeight).getPosY();
                float early = Cfg::playZoneEarly() * HORIZONTAL_SPACING_FACTOR;
                float late = Cfg::playZoneLate() * HORIZONTAL_SPACING_FACTOR;
                //glColor3f (0.7, 1.0, 0.7);
                glColor3f (1.0, 1.0, 1.0); //Changed to white (transparent)
                glRectf(x-late, topY, x + early, bottomY);
                glLineWidth (2.0);
                glColor3f (0.1, 0.9, 0.1); //changed to green
                oneLine(x, topY, x, bottomY );
                glLineWidth (1.0);
                glColor3f (1.0, 1.0, 1.0); //Changed to white (transparent)
                oneLine(x-late, topY, x-late, bottomY );
                oneLine(x+early, topY, x+early, bottomY );
            }
GlView.cpp @ line #188 change
  CDraw::drColour (CColour(1.0, 1.0, 1.0));
with
    //CDraw::drColour (CColour(1.0, 1.0, 1.0));
    CDraw::drColour (CColour(0, 0, 0)); //Changed to Black
GlView.cpp @ line #221 change
    glColor3f(1.0,1.0,1.0);
with
    //glColor3f(1.0,1.0,1.0);
    glColor3f(0,0,0); //Changed to Black
GlView.cpp @ line #254 change
    glColor3f(1.0,1.0,1.0);
with
    //glColor3f(1.0,1.0,1.0);
    glColor3f(0,0,0); //Changed to Black
Reply | Threaded
Open this post in threaded view
|

Re: Grand Staff?

Louis B.
Administrator
Hi 

Thanks for your encouragement and for the code update,

Do you think that those new colours should be added to PB as an option? Please let me know if they work OK for you and your partner or do you find you switching back to the green on black? If it is OK then I would like to include this as an configuration option.

Black notes on white background do not work for me for the following reasons. On older monitors (including on my net book) with slow display update rates the black notes look very blurred when they move. Using the single green colour I was also trying to use the eye ability to persist a flash of light (i.e. the green note)

If you would like to work on this more so that we can get both sets of colours in PB then please let me know. Also please could you ensure that you always work with the latest code from svn.

I have some interesting changes to check in svn on "rhythm tapping" using a single piano key which is suitable for beginners.

Thanks

Louis 



On Mon, Jan 10, 2011 at 1:22 AM, david [via Piano Booster] <[hidden email]> wrote:
syntopicon wrote:
Is there any way to make the notation more realistic, that is, notes with stems in a grand staff?  And not green?
Hi syntopicon

After finding PB last night I can only say I am blown away by it's abilities when connected to a digital piano. My partner who plays pinao, could only complain about the colours of PB's score display (as well as not writing the music with proper annotations)

Being a PHP/MySQL developer and XHTML Designer by trade i decidd that I'd look at the source to PB. Well after staying up all night giving myself a crash course in C++ and QT, i've at least managed to change the colours to represent more commonly written sheet music (ie, Black staffs, and notes). (See image below)



To make the changes in the source, you will need to edit Cfg.h, GlView.cpp and Draw.cpp then rebuild PB. As a courtesy, I have uploaded a copy of my build that you can replace your current build with or extract from the .zip and run. I had to include all new QT4 dll files as I built PB using the latest version of QT. You can download the zip file (5.6mb) from: HERE

As for the technical side of things, below are the code changes I have made.

In cfg.h from Line #94 replace:
    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);}
with
/* Changing the screen Colors to White Background with black music notes etc..

    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 CColour staveColour()           {return CColour(0, 0, 0);} // black
    static CColour staveColourDim()        {return CColour(0.5, 0.5, 0.5);} // grey
    static CColour noteColour()            {return CColour(0, 0, 0);} // black
    static CColour noteColourDim()         {return CColour(0.5, 0.5, 0.5);} // grey
    //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(1.0, 1.0, 1.0);} // white
    static CColour barMarkerColour()       {return CColour(0.8, 0.8, 0.8);} // light grey
    static CColour beatMarkerColour()      {return CColour(0.9, 0.9, 0.9);} // light grey
    static CColour pianoGoodColour()      {return playedGoodColour();}
    static CColour pianoBadColour()       {return CColour(1.0, 0.0, 0.0);}
    static CColour noteNameColour()       {return CColour(0, 0, 0);}
Draw.cpp @ Line #533(To change from that ugly blue bar to a single thin green line) Change:
 case PB_SYMBOL_playingZone:
            {
                float topY = CStavePos(PB_PART_right, m_beatMarkerHeight).getPosY();
                float bottomY = CStavePos(PB_PART_left, -m_beatMarkerHeight).getPosY();
                float early = Cfg::playZoneEarly() * HORIZONTAL_SPACING_FACTOR;
                float late = Cfg::playZoneLate() * HORIZONTAL_SPACING_FACTOR;
                //glColor3f (0.7, 1.0, 0.7);
                glColor3f (0.0, 0.0, 0.3);
                glRectf(x-late, topY, x + early, bottomY);
                glLineWidth (2.0);
                glColor3f (0.0, 0.0, 0.8);
                oneLine(x, topY, x, bottomY );
                glLineWidth (1.0);
                glColor3f (0.0, 0.0, 0.6);
                oneLine(x-late, topY, x-late, bottomY );
                oneLine(x+early, topY, x+early, bottomY );
            }
with
/* Changing the position bar to a single green line

 case PB_SYMBOL_playingZone:
            {
                float topY = CStavePos(PB_PART_right, m_beatMarkerHeight).getPosY();
                float bottomY = CStavePos(PB_PART_left, -m_beatMarkerHeight).getPosY();
                float early = Cfg::playZoneEarly() * HORIZONTAL_SPACING_FACTOR;
                float late = Cfg::playZoneLate() * HORIZONTAL_SPACING_FACTOR;
                //glColor3f (0.7, 1.0, 0.7);
                glColor3f (0.0, 0.0, 0.3);
                glRectf(x-late, topY, x + early, bottomY);
                glLineWidth (2.0);
                glColor3f (0.0, 0.0, 0.8);
                oneLine(x, topY, x, bottomY );
                glLineWidth (1.0);
                glColor3f (0.0, 0.0, 0.6);
                oneLine(x-late, topY, x-late, bottomY );
                oneLine(x+early, topY, x+early, bottomY );
            }


 */
         case PB_SYMBOL_playingZone:
            {
                float topY = CStavePos(PB_PART_right, m_beatMarkerHeight).getPosY();
                float bottomY = CStavePos(PB_PART_left, -m_beatMarkerHeight).getPosY();
                float early = Cfg::playZoneEarly() * HORIZONTAL_SPACING_FACTOR;
                float late = Cfg::playZoneLate() * HORIZONTAL_SPACING_FACTOR;
                //glColor3f (0.7, 1.0, 0.7);
                glColor3f (1.0, 1.0, 1.0); //Changed to white (transparent)
                glRectf(x-late, topY, x + early, bottomY);
                glLineWidth (2.0);
                glColor3f (0.1, 0.9, 0.1); //changed to green
                oneLine(x, topY, x, bottomY );
                glLineWidth (1.0);
                glColor3f (1.0, 1.0, 1.0); //Changed to white (transparent)
                oneLine(x-late, topY, x-late, bottomY );
                oneLine(x+early, topY, x+early, bottomY );
            }
GlView.cpp @ line #188 change
  CDraw::drColour (CColour(1.0, 1.0, 1.0));
with
    //CDraw::drColour (CColour(1.0, 1.0, 1.0));
    CDraw::drColour (CColour(0, 0, 0)); //Changed to Black
GlView.cpp @ line #221 change
    glColor3f(1.0,1.0,1.0);
with
    //glColor3f(1.0,1.0,1.0);
    glColor3f(0,0,0); //Changed to Black
GlView.cpp @ line #254 change
    glColor3f(1.0,1.0,1.0);
with
    //glColor3f(1.0,1.0,1.0);
    glColor3f(0,0,0); //Changed to Black



View message @ http://piano-booster.2625608.n2.nabble.com/Grand-Staff-tp3922505p5905667.html
To start a new topic under Piano Booster Development, email [hidden email]
To unsubscribe from Piano Booster Development, click here.

Reply | Threaded
Open this post in threaded view
|

Re: Grand Staff?

david
Hi Louis,

I'd be delighted to help you with this :) Please understand though that PB is my first ever C++ projects and experience using QT.

I would also like to extend to you an offer or fre ebsite hosting for PB on my own personal dedicatd servers in Canada.. I can also help wih registering a domain name such as pianbooster.org

-Dave
Reply | Threaded
Open this post in threaded view
|

Re: Grand Staff?

Louis B.
Administrator
Hi David,

That would be really great,

First I need you to confirm that black notes on white work ok on your setup. (They did not work ok on my setup hence the green notes). I don't want to add this option if it is not good enough.

The first stage is to move every colour into config,h with a comipile switch (#ifdef) to select the colour theme. After that we will get runtime theme changing working.

Please get the latest code from svn. I use totoisesvn. For now please send me a patch and I will add your changes to the source tree.

Regarding your offer on the website, I prefer the current sf host as it is always supported without having to remember to pay for the host. However the current webpage is in svn and help with that would be great

Thanks Louis

Reply | Threaded
Open this post in threaded view
|

Re: Grand Staff?

Laserbeak43
Hate to bring up such an old thread, but I'm excited. going to get the latest source. hopefully this code is still relevant.
Reply | Threaded
Open this post in threaded view
|

Re: Grand Staff?

romul
In reply to this post by david