r/programming • • Aug 20 '26

Music theory for programmers

https://runjs.app/blog/music-theory-for-programmers
509 Upvotes

41 comments sorted by

View all comments

Show parent comment

1

u/loup-vaillant Aug 22 '26

[...] The clefs never move [...]

This is not correct. Staffs/staves do move around.

You sure you did not misunderstand what you just quoted? I said the clefs never move. The curly sign at the left of the staff if I wasn't clear.

In a sense this is obvious: with few exceptions (transpositions, tenors who only read the treble clef...) the F clef always refers to F3, the C clef always refers to C4, and the G clef always refers to G4.

Take the tenor and alto clefs for instance. They appear to be placed differently on the staff (3rd and 4th lines respectively), but that's an illusion, a convenience so we can draw our 5 staff lines uninterrupted across a whole page. But both refer to C4, in the middle (6th) line of the grand staff.

And many instruments uses multiple staves: the cello, the bass clarinet, etc.

I play the cello, so I'm well aware. Let's take that as an example.

Most of the time I read the bass clef. My staff is thus made of the 5 bottom lines of the grand staff: G2, B2, D3, F3, and A3. The 6 top lines, from C4 to F5, are not drawn. When I switch to the tenor clef, we delete the bottom two lines, G2 and B2, and add two lines on top, C3 and E3.

Now editors would murder me if I asked them to actually engrave their scores like that, but you get the idea.