this post was submitted on 17 Dec 2024
127 points (98.5% liked)

Programmer Humor

32716 readers
587 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 47 points 5 days 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 13 points 5 days ago (1 children)

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

[–] Skua@kbin.earth 12 points 4 days 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 4 days ago (1 children)

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

[–] Skua@kbin.earth 4 points 4 days 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 10 points 4 days 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!!

[–] NomenCumLitteris@lemmy.ml 5 points 4 days 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

[–] JulyTheMonth@lemmy.ml 8 points 5 days ago

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

[–] tunetardis@lemmy.ca 5 points 4 days 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.

[–] RustyNova@lemmy.world 5 points 5 days ago

Now do brainpower

[–] lesnout27 2 points 4 days ago

nice! I ll look into this