this post was submitted on 17 Dec 2024
139 points (98.6% liked)

Programmer Humor

32743 readers
677 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

The rendered output looks like this:

It even sounds half-decent.

I would also like to congratulate German for having the most fucked up notation system, according to the LilyPond documentation. πŸ™ƒ

Source code

top 12 comments
sorted by: hot top controversial new old
[–] Skua@kbin.earth 49 points 1 week ago (1 children)

I really dislike that German system, but for those that want an explanation:

Traditional European music theory evolved towards using sets of seven notes out of twelve in an octave. We eventually labelled those notes A through to G. Originally A was the lowest note available in common notation and we built our instruments accordingly (see the lowest and highest note on most pianos even today), but we then take a particular liking to the scale that starts on C using this system.

Even though this worked really well most of the time, in each seven note scale there was one standard combination that was pretty harsh (the diminished chord, such as the B chord in C major). To get around this, people just kind of accepted that B could be in two different places - the usual position if that sounded better, the flattened one (one twelfth of the octave lower) if that worked better. The system of sharps and flats wasn't standard yet - nor was the modern staff system at all, for that matter - and it was only really this note that it mattered for most of the time, so the solution was to write the letter B in two different ways depending on which one you meant. There was a round B and a square B.

And then Germany gets really good at making printing presses. This is very useful for spreading copies of musical notation, but it does present a problem: your press probably doesn't have two ways to write the letter B. So what do you do instead? Use another letter for one of them. H is the eighth letter, and it even looks kinda like the square B anyway, so that becomes the standard practice.

One fun quirk of this is that it permitted Johann Sebastian Bach to write his last name in musical form, which he went on to do in a whole bunch of his compositions

[–] lugal@sopuli.xyz 14 points 1 week ago (1 children)

Iirc the sharp and flat sign also origin in these 2 Bs, right?

[–] Skua@kbin.earth 13 points 1 week ago (1 children)

As I understand it, yes. The b rotundum and b quadratum. I actually have no idea where the natural sign comes from though, now that I think about it

[–] lugal@sopuli.xyz 4 points 1 week ago (1 children)

According to this video, the natural sign has the same origin as the sharp

[–] Skua@kbin.earth 4 points 1 week ago

What I'm taking from this is that if we had invented Western musical notation in 2016 we would undoubtably have used πŸ…±for everything

[–] HeartyOfGlass@lemm.ee 13 points 1 week ago

I love Lilypond! I wrote all of my pieces in that in college. Hated Finale & Sibelius. It's been ages since I've messed with it, but gosh it's nice to see in the wild!!

[–] JulyTheMonth@lemmy.ml 9 points 1 week ago

It looks like they wanted to encorporated as many faces as possible in their syntax.

[–] tunetardis@lemmy.ca 7 points 1 week ago

Interesting. I had never heard of LilyPond before. I do a lot of music scoring using abc notation and even wrote myself a GUI to help with that, but it's interesting to see that there is another script language for generating sheet music.

[–] NomenCumLitteris@lemmy.ml 7 points 1 week ago

!! I love LilyPond. Found in back in 2010 when I installed Ubuntu for the first time and wanted an alternative to Finale...first OSS software I probably knowingly used. I felt like a real coder typing my music. Frescobaldi is a nice compliment to LilyPond. I still use LilyPond to this day

[–] RustyNova@lemmy.world 5 points 1 week ago

Now do brainpower

[–] lesnout27@feddit.org 2 points 1 week ago

nice! I ll look into this