The mel scale is an object from psychoacoustics. I only know about it from a short and fairly unclear wikipedia article. The scale is supposed to have uniformly spaced intervals.
We'll start with the mel formula:
mels = 2595 * log_10(1 + (frequency / 700))
Mels are supposed to be the unit of psychoacoustic melodic inerval size, and they're supposed to be additive: 100 to 150 mels should be the same interval as 150 to 200 mels.
There's a sound clip on the wikipedia page which demonstrates a mel scale from 200 mels up to 1500 mels, by increments of 50. We can figure that out. For mels in [200, 250, 300, 350, ..., 1500], we want to know the associated frequencies. For this, we just need to invert the mel formula:
frequency = 700 * (10^(mels / 2595) - 1)
and play a tone at the frequency corresponding to each mel in the list. Here are the first few, with frequencies and cents rounded to integers:
200 mels : 135 hz @ 0 cents over 200 mels
250 mels : 173 hz @ 426 cents over 200 mels
300 mels : 213 hz @ 782 cents over 200 mels
350 mels : 254 hz @ 1089 cents over 200 mels
400 mels : 298 hz @ 1360 cents over 200 mels
450 mels : 343 hz @ 1605 cents over 200 mels
500 mels : 390 hz @ 1829 cents over 200 mels
550 mels : 440 hz @ 2035 cents over 200 mels
600 mels : 492 hz @ 2227 cents over 200 mels
650 mels : 546 hz @ 2408 cents over 200 mels
700 mels : 602 hz @ 2578 cents over 200 mels
I confess that this has a compelling kind of equi-distant sound to it, which is why I'm trying to understand it better. You can see that this doesn't reach the octave, but it gets quite close to two octaves at 650 mels. So 200 mels to 650 mels is close to two octaves.
This scale included 400 mels, and mels and frequencies are in 1 to 1 correspondence, so if we start a new scale at 400 mels and move up by units of 50 mels again, we get the same upper frequencies:
400 mels : 298 hz @ 0 cents over 400 mels
450 mels : 343 hz @ 245 cents over 400 mels
500 mels : 390 hz @ 468 cents over 400 mels
550 mels : 440 hz @ 675 cents over 400 mels
600 mels : 492 hz @ 867 cents over 400 mels
650 mels : 546 hz @ 1047 cents over 400 mels
700 mels : 602 hz @ 1218 cents over 400 mels
But now we do almost get an octave - 700 mels is 1218 cents over 400 mels.
Depending on which mel you start on, you'll get different frequency ratios as options: your scale might have the octave, or the 2nd octave, or maybe both or neither.
Now, I don't actually see any description of the one true mel scale on the Wikipedia page. It's not clear to me that you have to start anywhere or move by any given increment. For example, a chart lists frequencies for mels from 0 mels to 3250 mels, by units of 250 mels. This is totally different from the scale in the audio clip. And that's fine.
Let's pretend, until someone tells us otherwise, that any sequence of mels that moves by a consistent amount is a mel scale - any arithmetic progression is fine. Given this loose definition, I think we can find multiple mel scales which hit the octave exactly from any given starting point - they'll just differ in the number of steps. Let's try 440 hertz as a starting point.
Using the original mel formula, we can find mels for 440 hz and 880 hz
549.6386753811498 mels = 440 hz
917.4857268097301 mels = 880 hz
and now we decide on our number of divisions. How about 12? Let's see what a chromatic mel scale looks like. Our step size will be
(917.4857268097301 mels - 549.6386753811498 mels) / 12 = 30.653920952381686 mels
I did the calculation with lots of decimal places, but here is the scale printed with mels and hz rounded to integers for readability:
550 mels = 440 hz
580 mels = 471 hz
611 mels = 504 hz
642 mels = 537 hz
672 mels = 571 hz
703 mels = 606 hz
734 mels = 642 hz
764 mels = 679 hz
795 mels = 717 hz
826 mels = 756 hz
856 mels = 796 hz
887 mels = 838 hz
917 mels = 880 hz
Let's ignore the mels for a minute and examine the cents for the frequency ratios of this scale.
440 hz @ 0 c
471 hz @ 119 c
504 hz @ 234 c
537 hz @ 345 c
571 hz @ 451 c
606 hz @ 554 c
642 hz @ 654 c
679 hz @ 751 c
717 hz @ 846 c
756 hz @ 938 c
796 hz @ 1027 c
838 hz @ 1115 c
880 hz @ 1200 c
All of these cents are calculated for frequency ratios over 440 hz.
This scale is crazy! Almost everything is 30 to 50 cents off from 12 tone equal temperament, but it still sounds fairly normal! Also, everything is sharper than it should be in 12-TET, besides P1 and P8. Here are the cents for relative intervals between scale degrees:
[119, 115, 111, 106, 103, 100, 97, 95, 92, 89, 88, 85]
The relative intervals in cents are getting smaller, and this is true for any mel scale.
Here is a just intonation scale that matches the 440 hz chromatic mel scale pretty closely:
[P1, SpA1, SpM2, AsGrm3, Sb4, As4, Sb5, Sp5, AsGrm6, AsM6, PrGrm7, SpGrM7, P8] # [1/1, 15/14, 8/7, 11/9, 35/27, 11/8, 35/24, 54/35, 44/27, 55/32, 65/36, 40/21, 2/1]
And even the major-scale subset of this sounds good and smooth and weirdly not at all spicy:
P1 # 1/1
SpM2 # 8/7
Sb4 # 35/27
As4 # 11/8
Sp5 # 54/35
AsM6 # 55/32
SpGrM7 # 40/21
P8 # 2/1
I think the chromatic mel scale sounds cool even if you don't play it over P1 at 440 hz, but that's the only place I feel we're really licensed to play it with an expectation of psychoacoustic equality. For example, if we simply extended the scale up from 880 hz with the same step size,
880 hz @ 1200 c
924 hz @ 1284 c
968 hz @ 1366 c
1014 hz @ 1446 c
1062 hz @ 1525 c
1110 hz @ 1602 c
1160 hz @ 1678 c
1211 hz @ 1753 c
1264 hz @ 1827 c
1318 hz @ 1900 c
1374 hz @ 1971 c
1431 hz @ 2042 c
1490 hz @ 2111 c
1550 hz @ 2180 c
1612 hz @ 2248 c
1676 hz @ 2315 c
1742 hz @ 2382 c
1809 hz @ 2447 c
We wouldn't hit the next octave at 2400 cents. So playing the 440 hz chromatic mel scale over 880 hz doesn't match up with mel scale theory: the transposed scale would hit the octave, and it shouldn't.
I think this also means that we could come up with different 12-tone chromatic mel scales just by starting on different frequencies besides 440 hz. Lets' try.
[0, 135, 260, 378, 489, 593, 693, 787, 877, 963, 1045, 1124] c : 50 hz
[0, 111, 220, 326, 430, 532, 632, 730, 827, 922, 1016, 1109] c : 1100 hz
[0, 107, 212, 316, 418, 519, 619, 718, 817, 914, 1010, 1105] c : 2150 hz
[0, 105, 208, 311, 413, 514, 614, 713, 812, 910, 1007, 1104] c : 3200 hz
[0, 104, 207, 309, 410, 511, 611, 710, 809, 908, 1006, 1103] c : 4250 hz
[0, 103, 205, 307, 408, 509, 609, 709, 808, 906, 1005, 1102] c : 5300 hz
[0, 103, 205, 306, 407, 508, 608, 707, 806, 905, 1004, 1102] c : 6350 hz
[0, 102, 204, 305, 406, 507, 607, 706, 806, 905, 1003, 1102] c : 7400 hz
Here are some mel scales, presented in cents, starting on some different frequencies from 50 hz up to 7,400 hz. The higher you go, it the closer we're getting to 12-tone equal temperament, but, like, the highest pitch on an 88 key piano is 4,186 hz, so we're kind of leaving the normal musical range at this point. We have to start the scale 103,437 hz before everything gets rounded exactly perfectly to 12-TET cent values in my code.
I think the basic take away is that mel scales can look a lot like equal temperament, but mel scale theory mostly says that, in the normal musical range, your relative chromatic scale steps shouldn't be logarithmically equal to be perceptually equal. But also, to use mel scales, you just have to give up on pure octaves if you want perceptual melodic equality: you can get a single octave with a scale in the normal musical range, maybe two or three octaves over your fundamental by coincidence or careful design, but you're not going to have octave-equivalence for all your scale degrees as a musical feature.
Let's look at that a little more. Suppose you want a mel scale that spans two pure octaves and divides the range into 24 steps. That's enough to do a significant amount of music making. Here are some scales for different starting frequencies:
[0, 176, 337, 487, 627, 757, 880, 997, 1107, 1213, 1313, 1409, 1502, 1591, 1676, 1759, 1839, 1916, 1991, 2064, 2135, 2203, 2271, 2336, 2400] c : 100 hz
[0, 160, 309, 450, 582, 708, 828, 942, 1051, 1156, 1257, 1355, 1449, 1540, 1629, 1715, 1798, 1880, 1959, 2037, 2112, 2187, 2259, 2330, 2400] c : 200 hz
[0, 150, 291, 425, 553, 675, 792, 905, 1013, 1118, 1219, 1317, 1413, 1505, 1596, 1684, 1770, 1854, 1937, 2018, 2097, 2175, 2251, 2326, 2400] c : 300 hz
[0, 143, 278, 408, 532, 651, 766, 877, 985, 1089, 1191, 1290, 1386, 1480, 1571, 1661, 1749, 1835, 1920, 2003, 2085, 2166, 2245, 2323, 2400] c : 400 hz
[0, 137, 269, 395, 516, 633, 747, 857, 964, 1068, 1169, 1268, 1365, 1460, 1553, 1644, 1733, 1821, 1907, 1992, 2076, 2159, 2240, 2321, 2400] c : 500 hz
[0, 133, 261, 384, 504, 619, 731, 841, 947, 1051, 1152, 1251, 1349, 1444, 1537, 1629, 1720, 1809, 1897, 1983, 2069, 2153, 2236, 2319, 2400] c : 600 hz
[0, 130, 255, 376, 494, 608, 719, 827, 933, 1037, 1138, 1238, 1335, 1431, 1525, 1618, 1709, 1799, 1888, 1976, 2063, 2148, 2233, 2317, 2400] c : 700 hz
[0, 127, 250, 369, 485, 599, 709, 817, 922, 1025, 1127, 1226, 1324, 1420, 1515, 1608, 1700, 1791, 1881, 1970, 2058, 2144, 2230, 2316, 2400] c : 800 hz
Depending on your starting frequency, the scale step closest to a pure octave over your fundamental - the one closest to 1200 cents - might be ^10 for a scale starting on 100 hz or ^12 for a scale starting on 800 hz.
So mel scales aren't derived from harmonics and don't play well with conventional notions of small integer harmony, like octaves and perfect fifths. But I wonder if we could come up with an instrument that had an inharmonic timbre which was better suited to playing polyphonic music over mel scales.
My guess is that the timbre would change between low notes and high notes - more spread out overtones than a harmonic instrument on the low range, more concentrated overtones than a harmonic instrument on the high range. But I'm not quite picturing the whole thing.
Designing scales to match timbres and timbres to match scales is a different bit of psychoacoustics. I mainly know about it from Will Sethares. I'm going to talk through it a little bit, both for exposition and to remind myself of how it works.
You start with a spectral description of a timbre - the placement and strength of partials. Now you can compare two notes of this instrument against each other, in frequency space, at different harmonic interval offsets, and see how the partials coincide or nearly miss each other or fall far from each other. And then there's a function that quantifies how much dissonance you have at each point of harmonic separation, based on how close each pair of partials is, along with some theory about ear acoustics - particularly the acoustic phenomena of beating and roughness. This will give you a dissonance curve with a complex shape; lots of gentle bows and sharp troughs. The minima of the dissonance function generally occur at ratios of the partials of the instrument.
All of this math justifies a simple procedure:
If you're designing a scale to match a timbre, you select scale degrees that are ratios of the instruments partials.
If you're designing a timbre to match a scale, you give the instrument partials at products of scale degrees.
So to design a timbre that matches a mel scale, we want partials that fall at products of scale degrees.
Now that I think about it, this is all obviously for instruments that don't change timbre with fundamental frequency.
I think I want to do it the more complicated way though - if the scale changes a lot with range, then so should the timbre. This will probably be a future post. See you later.
Ohhhh, heh heh heh. It's the mel scale like the Richter scale. It's just the formula. Dumb. Mine's better.