I'm learning to play piano and have started reading sheet music.
As far as I have seen the G-clef and F-clef are always on the same lines.
Is this always the case? So will the middle line of the upper staff always be B?
I'm learning to play piano and have started reading sheet music.
As far as I have seen the G-clef and F-clef are always on the same lines.
Is this always the case? So will the middle line of the upper staff always be B?
From wikipedia
In order to facilitate writing for different tessituras, any of the clefs may theoretically be placed on any of the lines of the stave. The further down on the stave a clef is placed, the higher the tessitura it is for; conversely, the higher up the clef, the lower the tessitura.
Simply put, the clef is moved mainly to illustrate comfortable ranges to be associated with their respective musical instruments.
That's what the clefs are there for: to tell you what notes the five lines of the staff (that's what we call each "bar", as you put it) represent. The clefs are necessary because a blank staff of five lines lacks context: which notes do those five lines represent?
As someone just starting to read piano music, you probably have only seen sheet music in which all the staves are paired, with a G clef and an F clef. In fact, not all piano music has both a G (or treble) clef and an F (or bass) clef. Here's an example:
Sometimes the composer will even change the clef of a staff mid-line if that part is easier to write and read in a different clef. And non-piano music doesn't pair the staves at all; if you're writing violin music, for example, there's no need to have two staves per line, and there's no use for a bass clef:
The modern G clef and F clef are basically fixed in usage. The C clef, in contrast, was used in a lot of different positions. Two of these are still common, the alto clef on the middle line, used for viola and viola da gamba regularly, and the tenor clef on the second line for high passages of violoncello, bassoon and trombone. (Further positions of the C key as well as exotic ones for F and G key can be found in the clef article of wikipedia).
Piano music does not really use anything but G and F clefs, extending the range with ottava markers. For occasional two-handed high or low passages, you might see two G clefs, or two F clefs or for crossed hand passages the clefs may even be swapped. Other than that, it is G over F.
Bach and the other composers of the baroque period very often use the soprano clef, which is a G-clef resting on the bottom line. So, the answer to your question is no, the G-clef is not always on the same line.
In most of the recent learning materials for beginner, the clef positions are probably fixed, but, if placed on the different line, they can be used to shift (transpose) the actual note positions as represented by the stave (assuming the "usual" position).
It seems that it used to be more common in the past than it is now.