Live data from Hacker News

Basic Music Theory in ~200 Lines of Python

mvanga.com

21–30 of 192 posts

Re: Basic Music Theory in ~200 Lines of Python

#23

This is great but if we could go back in time and influence the naming conventions so that the 12 semitones were called A-L or just numbered 1 to 12, and if the intervals were named after the actual semitone distance (a 'fifth' is actually seven semitones) the whole thing would be soooo much less jargonny. With all that bumf removed, the patterns of the 'scales' and 'chords' would be foregrounded and thats the actual…

I'm too excited not to comment on here specifically, although I have another comment in this thread already. I made a proposal for this in my book which isn't out yet but basically I'm using only consonants for these.. so that I can link a vowel for a separate encoding.. so in order of notes where their set notation is 0 1 2 3 4 5 6 7 8 9 10 11, B D F G J K L M N P R S.

It's an idea, and possibly somewhat arbitrary, but it's a proposal at least and it will connect to other things well due to uniformity. Then there's my python code which takes a scale.. and writes nonsense with shakespeare verse using words beginning with the letters that spell them. Then words can be used to learn melodies.

But what I was really thinking about more is like depending on the vowel after that letter you will form different chord qualities.. The first most important being the unison, or 'a'.. so to play a major scale with single notes you would say Ba Fa Ja Ka Ma Pa Sa.

But to say the seventh chords that the major scale implies you'd say: BatEk FabEt JabEt KaTEk MatEt PabEt Sabat, which would be a a way of saying: DMa7 Emi7 F♯mi7 GMa7 A7 Bmi7 C♯⌀ - but way less syllables

⌀ is pronounced "half diminished" or "half diminished seventh" which is a mi7(♭5) which would be pronounced "minor seven flat five" for those who don't know.

The insanity of modern music theory is the superimposition of the number 7 (A B C D E F G) onto the number 12 (the number of notes).. everything in the system is skewed by this fundamental wonky shape. But I'll remind everyone that 12/2=6 and 12/3=4 and from these facts more logical systems can be envisioned, as opposed what's 12 notes with 7 names. 12/7=? A number that seems not to have relevance to the comprehension of music patterns.. BESIDE the fact we are forced to think like that with things that conform to 12/7 like sheet music, note names, or piano key locations...

But nature and even a guitar fretboard has less concept of the obsession with the number 7 by design.

Re: Basic Music Theory in ~200 Lines of Python

#24

This is great but if we could go back in time and influence the naming conventions so that the 12 semitones were called A-L or just numbered 1 to 12, and if the intervals were named after the actual semitone distance (a 'fifth' is actually seven semitones) the whole thing would be soooo much less jargonny. With all that bumf removed, the patterns of the 'scales' and 'chords' would be foregrounded and thats the actual…

Agreed. I whinge about this all the time. The C-based system is convenient for piano players but it's a mess for guitar players, violinists, and other instruments where there are no

There have been many attempts at a chromatic music notation, but nothing has caught on so far [1].

Things are a little better with solfege -- there is "chromatic fixed do" solfege, where every note has its own name, rather than only having a name for the "white notes," which leaves you to mentally calculate the sharps and flats.

It's a minority thing--maybe 5-10% in Europe? Even regular fixed "do" is rare in English-speaking countries, so I would assume the chromatic fixed "do" is almost unheard of in the US, Britain, etc.

At any rate, there're are at least seeds of hope for a chromatic fixed-do solfege to catch on more. I use it for my own learning.

[1] http://musicnotation.org/

Re: Basic Music Theory in ~200 Lines of Python

#25

Anyone wanting to take things back a step further to first principles may enjoy this (shameless plug - I wrote it) Deriving the piano keyboard from biological principles using clustering (Jupyter) https://fiftysevendegreesofrad.github.io/JupyterNotes/piano....

> If you hear a sound of frequency f and others of frequency 2f, 3f, etc then there's a good chance these sounds come from the same object, due to the physical principle of resonance. And so our perception of sound evolved to reflect this... Wow that's interesting enough to share as a standalone post, so I took the liberty! Thanks for the link!

The quoted sentence seems false to me. Most physical objects do not have naturally harmonic vibration spectra. The vibration modes are not integer multiples ofthe fundamental (except for a vibrating string). Only the finely tuned western instruments do. So this is a somewhat backwards argument.

Re: Basic Music Theory in ~200 Lines of Python

#26
post #14

This is great but if we could go back in time and influence the naming conventions so that the 12 semitones were called A-L or just numbered 1 to 12, and if the intervals were named after the actual semitone distance (a 'fifth' is actually seven semitones) the whole thing would be soooo much less jargonny. With all that bumf removed, the patterns of the 'scales' and 'chords' would be foregrounded and thats the actual…

Agreed. The patterns are the most interesting bits. Actually, just the fact that there exist patterns is pretty amazing. It's unfortunately hard to see them through the notation and that made it very unintuitive for me for the longest time. Unfortunately the momentum that Western music notation has, with a few centuries of tradition behind it, means one has to work within that system. There was an interesting discuss…

re: the patterns, see discussion here https://news.ycombinator.com/item?id=26860627

and my comment here https://news.ycombinator.com/item?id=26861415

Re: Basic Music Theory in ~200 Lines of Python

#27
post #24

This is great but if we could go back in time and influence the naming conventions so that the 12 semitones were called A-L or just numbered 1 to 12, and if the intervals were named after the actual semitone distance (a 'fifth' is actually seven semitones) the whole thing would be soooo much less jargonny. With all that bumf removed, the patterns of the 'scales' and 'chords' would be foregrounded and thats the actual…

Agreed. I whinge about this all the time. The C-based system is convenient for piano players but it's a mess for guitar players, violinists, and other instruments where there are no There have been many attempts at a chromatic music notation, but nothing has caught on so far [1]. Things are a little better with solfege -- there is "chromatic fixed do" solfege, where every note has its own name, rather than only havin…

I find the paino-roll notation on DAWs to be a lot more intuitive. Not much good for perfomers of course, but it helped me understand things better. Each semitone is given the same amount of space.

Re: Basic Music Theory in ~200 Lines of Python

#28

Anyone wanting to take things back a step further to first principles may enjoy this (shameless plug - I wrote it) Deriving the piano keyboard from biological principles using clustering (Jupyter) https://fiftysevendegreesofrad.github.io/JupyterNotes/piano....

As someone who might use these with kids: I think the problem with both of these is lack of, well, sound.

To get things, people need to hear sounds, not just see note names and pictures.

Re: Basic Music Theory in ~200 Lines of Python

#29

This is great but if we could go back in time and influence the naming conventions so that the 12 semitones were called A-L or just numbered 1 to 12, and if the intervals were named after the actual semitone distance (a 'fifth' is actually seven semitones) the whole thing would be soooo much less jargonny. With all that bumf removed, the patterns of the 'scales' and 'chords' would be foregrounded and thats the actual…

There probably is a better or more general notation system, but specifically for western music it is actually pretty efficient and logical once you start working with it a bit. Just don't put too much weight on the names and think in intervals. You have a scale made up of 7 notes/intervals with the "fifth" simply being the fifth note in the scale. Same with third, etc. The specific flavor (major/minor) of e.g. the third you're playing usually depends on the mode, but it is still a "third" and serves the same-ish function. Extending the names i think would actually be more confusing. I'd argue it already puts the patterns of scales and chords in the foreground.

Re: Basic Music Theory in ~200 Lines of Python

#30

Earlier quoted context omitted.

> If you hear a sound of frequency f and others of frequency 2f, 3f, etc then there's a good chance these sounds come from the same object, due to the physical principle of resonance. And so our perception of sound evolved to reflect this... Wow that's interesting enough to share as a standalone post, so I took the liberty! Thanks for the link!

The quoted sentence seems false to me. Most physical objects do not have naturally harmonic vibration spectra. The vibration modes are not integer multiples ofthe fundamental (except for a vibrating string). Only the finely tuned western instruments do. So this is a somewhat backwards argument.

> Most physical objects do not have naturally harmonic vibration spectra.

What is your basis for saying this?

A large number of physical objects, solids as well as hollow can be approximated as systems of springs, surfaces and tensile elements, which all have some frequency response. It isn't rare at all for a physical system to have a very sharp resonant peak in its frequency response, to the point that you'll often find mechanisms to dampen that response so the structure will survive certain inputs.

Post reply on HN