Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A study of musical scales (2017) (ianring.com)
225 points by rwnspace on Aug 23, 2018 | hide | past | favorite | 41 comments


The problem with this is is that it accepts the twelve-tone equal temperament system as a sort of absolute frame of reference, rather than the compromise/approximation that it is.

Musical scales are not just check-box menu choices out of twelve-tone equal temperament.


When I first learned about music theory, it surprised me how common this is. I liked the idea of scales that made certain intervals sound nice in terms of simple fractions, and wrote a computer program to search for them. I found an interesting scale and posted it to the music stackexchange: https://imgur.com/a/iBwxC4T

It caused a long discussion between the people there, and I learned a lot, but my post was eventually deleted. Somebody posted a follow-up question trying to figure out what the terms were really supposed to mean, but it doesn't seem to me they ever managed to agree: https://music.stackexchange.com/questions/66620


I think a tuning is a set of intervals which an instrument is configured to play. A tuning is also a temperament if it is a compromise of another tuning in order to make the configuration technically feasible (or for other convenience reasons). A scale is then some combination of notes within a tuning or temperament? I don't know, it seemed like they were more concerned with nitpicking words than answering your actual question, which was interesting and not hard to understand.


That seems like a reasonable definition. In my view, temperaments only apply to keyboard and electronic instruments. String instruments are tuned so the open strings are in perfect intervals, then we just cope with it. Wind instruments are all over the place, depending on how you blow and how loud. I saw a viola da gamba with double frets, and the gambist told me it was so he could manage different temperaments. An orchestra is untempered, for all practical purposes.

I think that a scale and its temperaments are in addition to being an artistic choice, also a technology. Prior to electronic music and professional technicians, a tuning system had to be something that a musician could carry out themselves, possibly quite frequently. The 12 tone system is the simplest consonant system, possibly making it the easiest and quickest to tune.


Wow, another interesting parallel between music and programming - senselessly overzealous arguments.


Exactly. I would like to see this done using integer ratios to define the frequency intervals.

You can still use the octave as a 'start' and 'end' point for the scale to make things simple (although there's no axiom anywhere that says this has to be the case, it's just a good candidate because it's the simplest and most easily recognizable interval, aside from the unison).

Since you'd be dealing with a potentially infinite number of intervals, you can start with the 'simplest' 20 or so (using lowest possible integer values to create the distinct ratios). Some would argue that the simplest 40 can be considered musical although that would get you into some seriously dissonant territory, not to mention the amount of possibilities you would have available at that point.


That's the first thing that the author states.

I'll bet you know more music than me, but maybe that puts me more into the target audience. It's a very interesting way to explore essentially the whole of western music. I did some similar "modeling" when I was learning, too, mostly because it's an effective way for me to commit things to memory. I remember struggling with using tones/scale degrees or intervals as a basis, just as the author describes.

It might not be universal and suitable for high-level academic use, but I don't think there's a problem with it.


The problem is that the twelve-tone system was designed for a very specific "use case", in the context of a certain kind of music: classical/Baroque revolving around major and minor scales, modulating around the cycle of fifths. For anything else, it is basically a misuse. Mass produced equal temperament instruments are used all over the world and basically turn the local music into shlocky pop.


The specific use case for equal temperament is more or less how do make a fixed tuning instrument sound "good enough", without resorting to a very large amount of keys or buttons to adjust the tuning so the chords sound right. Although it was developed around Western music, I don't think that Western scales per se are necessarily the constraining factor.

Certainly just intonation sounds more pure on a fixed tuning instrument if you play within the constraints of the tuning ratios chosen. Step outside those constraints, and the sound is usually pretty awful.

12TET also has some "musical usefulness" on its own. The system introduced a sort of tonal ambiguity in modulation -- the commas that normally result in a more just / Pythagorean type style (https://en.wikipedia.org/wiki/Comma_(music)) get "blurred", and this is a characteristic musicians can exploit. Furthermore, in my experience, for sounds with lots of overtones (sawtooth synth waves, distorted guitars, etc.), that slightly detuned third in a 12TET trichord ends up sounding "thicker" for a lack of a better word, with the detuned beating more adding to the texture. This is best heard on a synthesizer where it's easy to flip between two tunings: to me, that, say, 1980s "power chord sawtooth stab" type of sound just doesn't sound as "thick" in just tuning, in my opinion. (In fact, when programming a synthesizer, people often slightly detune oscillators for this exact same reason!)

Nonetheless, it would be interesting if more "adaptive" type just intonation type systems came out that more approximate what non-fixed pitch instruments do (adjusting the notes to a "correct" your tuning during any modulation). Pure sounding triads also are useful, and you really can't do it super exact with 12TET, it's always "good enough". :) Hermode tuning is the only major one I know of, it is implemented in some synthesizers and DAWs. I haven't tried it yet -- my bet is you still would be a bit constrained (no dramatic 20th century classical type of chromatic modulation or the like), but you'll gain some freedom to modulate compared to a fixed just tuning setting.


> The problem is that the twelve-tone system was designed for a very specific "use case"

This isn't really correct though. Twelve is used because it has certain properties of divisibility that make life easier for the musician.

When the wavelengths of two notes form simple mathematical ratios, they have a stability that sounds nice, and this makes it easier to construct intervals and chords.

Wouldn't choosing a non-twelve division be more of a limit?

<disclaimer, I'm merely an amateur musician>


Twelve is used because it has certain properties of divisibility that make life easier for the musician.

Not true. It's used because (in short) when you try to construct a scale from octaves and fifths, finding a certain number of octaves that are close to another number of fifths (which comes to finding continued fraction approximants to 117/200, i.e. log 3/log 2 - 1) there are very few contenders, and only 12 notes per octave has neither too few nor too many for our tastes. It's based on the coincidence that 7 octaves is very nearly 12 fifths, i.e. 2^7~(3/2)^12.

Also, the idea that symmetry sounds nice is intuitively appealing, but nothing sounds better to us, more pleasing, than the (highly irregular) major scale, or scarier, more ominous than diminished and augmented chords - musically, a square and equilateral triangle. Or more disorienting than a whole tone scale - a hexagon.


> Also, the idea that symmetry sounds nice is intuitively appealing, but nothing sounds better to us, more pleasing, than the (highly irregular) major scale, or scarier, more ominous than diminished and augmented chords - musically, a square and equilateral triangle. Or more disorienting than a whole tone scale - a hexagon.

Yes, the perceived consonance has less to do with the simplicity/symmetry of the concept used to construct the scale and more to do with the 'simplicity' of the denominators of the ratios that make up the intervals. The smaller (simpler) the denominators involved, the more pleasing/consonant the sound will be (provided that they're integer ratios). Frequency ratios like 3/2 and 4/3 are among the simplest possible and are both present in the major scale but absent in the latter two examples.


Hmm that's not quite what I was saying - symmetry in scales in actually unpleasant, asymmetry pleasant. It seems that with these symmetrical scales/chords, the ear suffers vertigo, cognitive dissonance, because it can't hear a tonal centre. With e.g. a major scale, the asymmetry makes it obvious what key you're in.


I see what you mean. Still I would argue that both tritones and minor thirds only appear to possess the symmetrical property as a result of temperament. It doesn't exist 'in nature' as such.

The frequency ratios that they represent, 7/5 and 6/5, respectively, don't lend themselves to the same type of symmetry. If you have a tritone, 7/5, you would need a 10/7 ratio to make the octave, which would be a different interval (although close).

With a minor third (6/5), if you were to stack the intervals starting from let's say 500 Hz, you would go to 600, 720, 864, and 1036.8, and you'd be off 36.8 Hz from the octave.


Sorry, I made a mistake: I specifically wanted to make that remark about the equal temperament tuning, not twelve tones in general.


> wavelengths of two notes form simple mathematical ratios, they have a stability that sounds nice

O.o that is called resonance and it sounds harmonious.


The issue I have is that, by ignoring the just scales that equal temperament is an approximation of, you ignore the fundamental mathematical foundations of tonal music. Without that, there are a lot of things you can't say about equal temperament, and the things that remain are kind of superficial.


I tried listening to a 15-tone ET piano piece ones. Sure, maybe I'm not worthy, and too limited in my musical understanding (although I have been a musicians since the age of 6 and i'm now 43), but it just sounded like a piano out of tune. 12-tet is more than enough to experiment with for the rest of my life


You have been listening to 12-tet literally your entire life, so microtonal music is inevitably going to sound strange.

Having said that, 15-tet is pretty rancid. 22-tet can be much more consonant.

Try this, which is in just intonation:

https://www.youtube.com/watch?v=1uZUQqOLyPQ

It's contemporary but still sort-of accessible for many people.


Yes, also this one, which is for microtonal piano (also in JI): https://www.youtube.com/watch?v=ZkaGm8B8CZI


Well. I loved the piece you linked! 22-TET does not sound nearly as dissonant to my ears as 15 does. Thank you for sharing.


Part of it could be due to conditioning but part of it is due to the fact that 15 TET is just another type of compromise, one that actually puts the perfect fifth even more out of tune than 12 TET, even though some of the other intervals are less tempered.

I'm sure you've heard about this: https://en.wikipedia.org/wiki/Just_intonation

Most people brush off the concept because of a lack of accessible music, and because a lot of musicians writing the music, well, let's just say they lack a sense of popular sentiment. I don't think it discredits the theory, which is based in physics. Potentially, tuning intervals by ratios can be used to write the same style of music we are used to (without tempered intervals) just as well as providing harmonies that we don't have access to in our prevalent (Western) tuning system.


WOW. As a former Music Theory 2 and Music Theory 3 student in college this is awesome. I am also very disappointed in myself for not trying to do something like this and failing earlier in my life.

There is really a lot more that could be gained from this work. I am sensing someone's PhD project.


Nice work! If I could make one suggestion it would be to use hex instead of decimal. It would make the numbers easier to remember (shorter) and I think it would be easier to recognize patterns (Ie. whole scale is 0x333 and major scale 0xAB3).


For something that puts this to action--Wolfram made a random music generator in 2005 with a ton of scales.

http://tones.wolfram.com


I bet this would be #1 comment if something in the process used neural networks and if it wasn't from Wolfram.

Anyway, pretty cool generator.


Nearly jumped out of my seat when I saw this! Look at how similar our approaches are: http://welliam.github.io/molts/ (apologies for how poorly written it is, it's been a few years!)

Not that it's a super novel concept, but we both used this for the modes of limited transposition. For me it was an efficient way of generating MOLTs for any equal temperament scale.


It's been awhile since I've had the chance to dig into more advanced music theory but this is such an interesting framing of all of the possibilities present in both named and unnamed scales and the relationship of notes. The idea to lay it out mathematically like this and how you frame your overall thinking about scales is great. Bach would appreciate this work.

Also reminds me a bit of how folks like Jacob Collier think about harmonies and new ways to arrive at different notes. The more you can internalize these kinds of mathematics, the more you can improvise in new and different ways.

Well done! Really enjoyed this.


Absolutely amazing. I'm a coder and a musician and I've been complaining to myself about a certain tendency to repetition in my compositions lately, this is amazing stuff to break patterns.


For some reason, probably coincidence mangled with early-stage dementia, I found this article remarkably similar to https://spectrum.ieee.org/computing/software/the-desperate-q...


pretty good, this has motivated me to do an online post about my own take at similar issues. However I do not assume 12-tet, just the ocatave, so it's slightly different.


This is fascinating! Unfortunately I don't understand even half of it, I've been wanting to learn music theory for some time

I should go back and learn to play a musical instrument


There's not much "music theory" here aside from the knowledge that there are 12 notes which repeat in octaves. He mentions a few modes (phrygian, etc) but that's not particularly esoteric. The rest is relating those ideas to simple mathematical constructs and seeing what comes out.


To understand propriety/coherence (about 2/3 of the way down the page) you'll also need to have an understanding of enharmonics, and perhaps some context on why it's important to be able to know whether an interval is e.g. an augmented 3rd or a perfect fourth.


I have to agree with TaupeRanger here. This certainly has (almost) nothing to do with playing an instrument. It has little to do with music theory in the traditional sense. This is for the programmer/mathematician side of your brain, primarily. For the musician side, get a little electronic keyboard, poke around at it, and buy an introductory music theory book.


Very, very impressive. I don't have time to read everything right now, but just skimming everything this is an incredible resource, even for a non-programmer


Really good content.


And form.


Thank you very much, this is some fantastic content!


Thanks, I hugely enjoyed this.


Thank you




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: