Mothra[11] Harmony

Someone asked around generally for help harmonizing the mothra[11] scale, but didn't describe it. I couldn't find a description online at the time but still offered to help if they'd give me something to go on. But they didn't. Two months later I thought of it again and did another search. This time, I found this description of mothra[11] in relative steps of 31-EDO: 

    [5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 1].

I don't care much about xenharmonic scales like these, but it kind of stuck in my craw that the person wouldn't describe the scale they wanted help with, so now I'm going to analyze it really well out of spite.

If we accumulate the relative scale steps we get absolute steps: 

    [0, 5, 6, 11, 12, 17, 18, 23, 24, 29, 30, 31]

And harmonizing that is dirt simple; almost every scale degree has a root position septimal triad as a diatonic option:

^0: [P1, SpM3, P5]

^5: [P1, Sbm3, P5]

^6: [P1, SpM3, P5]

^11: [P1, Sbm3, P5]

^12: [P1, SpM3, P5]

^18: [P1, SpM3, P5]

^24: [P1, Sbm3, P5]

^30: [P1, Sbm3, P5]

We're just missing ^[17, 23, and 29], and even those notes are participating in the harmonies above, just not as root notes; you could readily put septimal [1, 3, 6] and [1, 4, 6] inversions of septimal chords on those scale degrees. Those three scale degrees all have Sbm3 and/or m3 as options above for harmonization, but they don't have very good options for a chordal fifth. If you really want a root position triad on those scale degrees, you're going to need to make use of some unusual chords, like perhaps

[0, 12, 19]\31 _ [13:17:20] ~ [P1, ExReA3, ReA5] # [1/1, 17/13, 20/13]

[0, 7, 14]\31 _ [36:42:49] ~ [P1, Sbm3, SbSbd5] # [1/1, 7/6, 49/36]

[0, 7, 19]\31 _ [30:35:46] ~ [P1, Sbm3, Nb5] # [1/1, 7/6, 23/15]

[0, 7, 19]\31 _ [36:42:55] ~ [P1, Sbm3, AsGr5] # [1/1, 7/6, 55/36]

[0, 7, 19]\31 _ [42:49:64] ~ [P1, Sbm3, SpGr5] # [1/1, 7/6, 32/21]

[0, 7, 20]\31 _ [33:38:51] ~ [P1, FaDem3, ExDeA5] # [1/1, 38/33, 17/11]

[0, 8, 19]\31 _ [15:18:23] ~ [P1, m3, Nb5] # [1/1, 6/5, 23/15]

[0, 8, 19]\31 _ [35:42:54] ~ [P1, m3, Sp5] # [1/1, 6/5, 54/35]

[0, 8, 20]\31 _ [11:13:17] ~ [P1, PrDem3, ExDeA5] # [1/1, 13/11, 17/11]

Each line has the tempered tuning of the chord in 31-EDO steps, then an otonal representation of the just tuning of the chord, then interval names, then the just tuning of the chord.

Those are options, and I don't hate the sound of them, but I also think septimal triads on 8 of the scale degrees should be plenty for music making.

If you want to extend the root position septimal triads to four note chords / tetrads, I think these are probably the best options:

[0, 7, 18, 24]\31 _ [42:49:63:72] ~ [P1, Sbm3, P5, SpM6] # [1/1, 7/6, 3/2, 12/7]

[0, 7, 18, 25]\31 _ [12:14:18:21] ~ [P1, Sbm3, P5, Sbm7] # [1/1, 7/6, 3/2, 7/4]

[0, 7, 18, 26]\31 _ [30:35:45:54] ~ [P1, Sbm3, P5, m7] # [1/1, 7/6, 3/2, 9/5]


[0, 11, 18, 25]\31 _ [28:36:42:49] ~ [P1, SpM3, P5, Sbm7] # [1/1, 9/7, 3/2, 7/4]

[0, 11, 18, 29]\31 _ [14:18:21:27] ~ [P1, SpM3, P5, SpM7] # [1/1, 9/7, 3/2, 27/14]


With those chords defined, here are the diatonic tetrad options:

^0: [P1, SpM3, P5] + [SpM7]

^5: [P1, Sbm3, P5] + [SpM6 or Sbm7 or m7]

^6: [P1, SpM3, P5] +  [Sbm7]

^11: [P1, Sbm3, P5] + [Sbm7 or m7]

^12: [P1, SpM3, P5] + [Sbm7]

^18: [P1, SpM3, P5] + [Sbm7]

^24: [P1, Sbm3, P5] + [SpM6 or Sbm7]

^30: [P1, Sbm3, P5] + [SpM6 or Sbm7]

Easy.

A 24-EDO Detempering

When I play with arababic maqam muisc, often notated in 24-EDO, my first instict for detempering is to to use a Pythagorean tunings for tonal notes and 11-limit tunigns for neutral tones.

0 : P1 :: 1/1 _ C

1 : As1 :: 33/32 _ Ct

2 : Grm2 : 256/243 _ Db

3 : AsGrm2 :: 88/81 _ Dbt

3 : DeAcM2 :: 12/11 _ Dd

4 : AcM2 :: 9/8 _ D

5 : AsAcM2 :: 297/256 _ Dt

5 : DeGrm3 :: 1024/891 _ Ebd

6 : Grm3 :: 32/27 _ Eb

7 : AsGrm3 :: 11/9 _ Ebt

7 : DeAcM3 :: 27/22 _ Ed

8 : AcM3 :: 81/64 _ E

9 : AsAcM3 :: 2673/2048 _ Et

9 : De4 :: 128/99 _ Fd

10 : P4 :: 4/3 _ F

11 : As4 :: 11/8 _ Ft

12 : AcAcA4 :: 729/512 _ F#

12 : GrGrd5 :: 1024/729 _ Gb

13 : De5 :: 16/11 _ Gd

14 : P5 :: 3/2 _ G

15 : As5 :: 99/64 _ Gt

15 : DeGrm6 :: 4096/2673 _ Abd

16 : Grm6 :: 128/81 _ Ab

17 : AsGrm6 :: 44/27 _ Abt

17 : DeAcM6 :: 18/11 _ Ad

18 : AcM6 :: 27/16 _ A

19 : AsAcM6 :: 891/512 _ At

19 : DeGrm7 :: 512/297 _ Bbd

20 : Grm7 :: 16/9 _ Bb

21 : AsGrm7 :: 11/6 _ Bbt

21 : DeAcM7 :: 81/44 _ Bd

22 : AcM7 :: 243/128 _ B

23 : De8 :: 64/33 _ Cd

24 : P8 :: 2/1 _ C

I'm sure that there are better options, but this one also isn't so bad.

Wyschnegradsky and Blackwood

: Intro

Ivan Wyschnegradsky (1893 - 1979) and Easley Blackwood Jr. (1933 - 2033) were two noted microtonal composers who did a good amount of work in 24-EDO.

I'd like to learn more about their theories. 

: Wyschnegradsky

Wyschnegradsky laid out his theoriest in his "Manual of Quarter-Tone Harmony", but I haven't read it. I'll start with things I've heard about it.

Wyschnegradsky used quartertones in dissonant ornaments between consonances - passing tones, neighbor tones, maybe note cambiate - as well as using quartertones in unprepared grace notes, appoggiaturas.

He also looked at triads and tetrads which were altered from traditional tonal ones by a qurter tone in one note.

He also had a special 13-note scale. He probably had lots of scales, but this is more species. It's called "the quasi-diatonic" or "the diatonized chromatic scale" or "the chromatic scale diatonicized to 13 tones". It has 13 notes.

Suppose we start at zero steps of 24-EDO, and add on 11 steps repeatedly, subtracting 24 if we exceed 24. Then we get this sequence:

    [0, 11, 22, 9, 20, 7, 18, 5, 16, 3, 14, 1, 12, ...] -> 

Which, if we cut it short at 13 notes, can be ordered to give this sequence:

    [0, 1, 3, 5, 7, 9, 11, 12, 14, 16, 18, 20, 22] 

which has these relative intervals, plus 2 steps to reach the octave:

    [1, 2, 2, 2, 2, 2]  [1, 2, 2, 2, 2, 2] + [2]

Wyschnegradsky's quasi-diatonics scale is a rotation and rebracketing of this. Here it is in absolute steps:

[0, 2, 4, 6, 8, 10, 11, 13, 15, 17, 19, 21, 23, 24]

And relative steps:

     [2, 2, 2, 2, 2, 1] [2] [2, 2, 2, 2, 2, 1]

and pitches, not quite in his notation but hopefully close enough:

[C, C#, D, D#, E, F, Ft, Gd, Gt, Ad, At, Bd, Bt, C]

This scale has two identical subscales of 7 notes spanning 11\24, which are joined by a 2\24 minor second. The same way you can modulate from C major to F major or G readily by major moving around a circle of 5ths, in the process retaining all the notes of one tetrachord, Wyschnegradsky would readily modulate from this scale to one rooted on Ft or Gd, along the circle of 11\24 steps, and retain notes of the upper or lower tetrachord.

Wyschnegradsky is basically giving up on using the perfect fifth with this scale, but has to option to use the octave reduced 11th harmonic, aka the ascendant fourth, justly tuned to 11/8 and tuned by 24-EDO to 11\24 all over the place.

I think he would commonly form chords within this scale by going up three scale degrees. Here are tetrads constructed in that way on each scale degree:

[C, D#, Ft, Ad]

[C#, E, Gb, At]

[D, F, Gt, Bd]

[D#, Ft, Ad, Bt]

[E, Gd, At, C]

[F, Gt, Bd, C#]

[Ft, Ad, Bt, D]

[Gd, At, C, D#]

[Gt, Bd, C#, E]

[Ad, Bt, D, F]

[At, C, D#, Ft]

[Bd, C#, E, Gd]

[Bt, D, F, Gt]

These actually only come in four patterns of steps:


[0, 5, 11, 16] [At, C, D#, Ft]

[0, 5, 11, 16] [Bd, C#, E, Gd]

[0, 5, 11, 16] [Bt, D, F, Gt]

[0, 5, 11, 16] [E, Gd, At, C]

[0, 5, 11, 16] [F, Gt, Bd, C#]


[0, 5, 11, 17] [D#, Ft, Ad, Bt]


[0, 6, 11, 17] [Ad, Bt, D, F]

[0, 6, 11, 17] [C#, E, Gd, At]

[0, 6, 11, 17] [C, D#, Ft, Ad]

[0, 6, 11, 17] [D, F, Gt, Bd]

[0, 6, 11, 17] [Gd, At, C, D#]

[0, 6, 11, 17] [Gt, Bd, C#, E]


[0, 6, 12, 17] [Ft, Ad, Bt, D]

Maybe he suses other 7th chords besides these, I don't really know. I just heard that he skips by 3s a lot.

If I wanted to sound a little like Wyschnegradsky, I'd play through the skip-3 triads and tetrads like these, see which ones chain together well, and start making progressions.

That's about all that I know about Wyschnegradsky. I actually learned all of this by mistake: I got Wyschnegradsky confused with Blackwood and looked up the wrong microtonalist. But some of it was interesting.

:: Blackwood

Blackwood was an innovator of microtonal counterpoint. I don't know that his theoriest are necessary to make microtonal counterpoint, but it doesn't hurt.

1. A discord is introduced as a tied suspension from a previous chord.

2. A discord resolve by step to a dissonance.

3. A dissonances then resolve to a consonance.

In contrast, in the microtonal counterpoint that I write and in the theory that I continue to develop, we simply expand the set of consonant harmonic intervals and fluid melodic intervals, then let contrapuntal rules lead us to interesting places. Like, I don't use the harmonic seventh because it's ugly and I want to briefly upset people, I use it because I like the sound, and so my theory of microtonal counerpoint reflects that.

I'd like to learn more about Blackwood's composition. Still looking and reading.

...

The Mel Scale

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.

Pasibutbut

The Bubun people of Taiwan have a ritual chant called Pasibutbut. It's supposed to bring a good millet harvest. It has rich polyphony - t traditionally there are eight singers in a ring. I can't find much written information about the notes, harmonies, tuning, whatever, so I'm gonig to figure this one out myself from audio recordings. I haven't really done that before. Nervous.

I'm going to try analyzing three videos, so that if one of them is non-standardly performed or badly performed, I'll still get a sense of the thing.

Video one: https://www.youtube.com/watch?v=vyHR49hpAOI

Video two: https://www.youtube.com/watch?v=9fy14ZUoO9c

Video three: https://www.youtube.com/watch?v=8ggweiEVd8U

It's very slowly evolving music. You might want to watch it at an increased speed if you're more interesting in the music's structure than its timbres.

I'm going to try analyzing the audio in Melodyne, which I haven't used before. Nervous.

...

I'll start with video 2. I like that it doesn't have a huge group of singers like video 1, and I think I prefer its audio quality to video 3.

The opening singer is not constant with his tone. He repeatedly starts closer to Ab/G# and then rises closer to A. It sounds very much like a moan. I thought I'd be able to analyze at least two notes before getting into trouble, but I don't even know if this should be one note or two or several glissandos.

It's about 50 cents sharp of a 12-TET Ab3. I'll just call it Ab3 and adjust all of my notes up 50 cents. We'll see how long that works. Next come in F4 and Ab4. Our first chord is [P1, M6, P8]. The M6 drops out for a moment giving us an octave, [P1, P8]. And then it comes back in a major 2nd lower at Eb, so we get [P1, P5, P8]. There might also be an octave below Eb. An octave below a perfect fifth is a perfect negative second, [P-2, P1, P5, P8]. Is it dumb to write chords like that? Maybe.

If you analyze the audio with the "melodic" detection algorithm, the software attempts to give you a monophonic analysis, which looks terrible for this piece. But you can still click individual notes to loop them and figure out the notes. And there's no clicking when samples start and stop like I get in Audacity, so that's an improvement. If I switch the detection algorithm to Polyphonic Sustain or Polyphonic Decay, then there notes from multiple voices are laid out in parallel, but I don't know how to click them to hear them to verify that the sound matches the placement. They're greyed out.

Ah, I got Melodyne "Essential", which is intentionally crippled in its features. I'm not going to tell you which version is supposed to work, because that would be advertising, and this is bullshit. They advertise $25 dollars so that you buy the wrong thing and then charge $150 more to upgrade. I wouldn't have paid that initially and I certainly won't pay that now.

The {Eb}s drop by M2 to {Db}s. And there might be an Ab below that also, so it's like [Ab2, Db3, Ab3, Db4, Ab4]. I think that's all that's happening. It's a little hard to tell.

Then F comes in again, which is M6 over Ab. 

Oh, I should try Clam Chordata. Or something.

Chinese Tuning On The Guqin

I want to learn about historic Chinese tunings. We're going to look at tunings of the Chinese zither called the qin, also called the guqin ("ancient" qin). Qin and guqin are pronounced with a "ch" sound for the q. The instrument used to always have silk strings, but now people sometimes use steel and nylon. I'm learning about it from the site SilkQin.com, authored by John Thompson.

The guqin has markers on the neck called hui. I think they're usually flat inlays but they can also protrude as studs - maybe cheap instruments have them painted on. They're placed at the positions of various harmonic nodes. They're usually made of jade, or gold, or sea shell.

Let's talk about harmonics and harmonic nodes. If you touch a string lightly at a hui and then pluck the string, the plucked string can vibrate on both sides of your lightly touching finger, but with a limited set of vibrational modes compared to a full length / open string. This is in contrast to playing stopped notes, where your finger presses the string all the way down to the instrument body. When you play a stopped note, the string's length is effectively shortened and the new fundamental frequency is proportional to the inverse of the string length, just as it was for the open string. Every place that you press a stopped note will give you a different sound on that string. In contrast, there are multiple places you can play the same harmonic sound on a string - if you press a string lightly at 1/5, 2/5, 3/5, or 4/5 of its length, you're going to get the 5th harmonic at all of them, which has a frequency five times the fundamental frequency, i.e. five times the open string frequency. If you press lightly at 1/4, 2/4, 3/4 of the string length, the outer two nodes will give you the fourth harmonic, but the middle node will have the 2nd harmonic as its loudest spectral component (though the fourth harmonic contributes to the sound too). You can just reduce the fraction as look at the denominator to figure out the harmonic.

The guqin has 13 hui markers along its neck. Guqin players don't play harmonics nearly as much as they play stopped notes; the hui are mostly a way to guide you on where to place your fingers for stopped notes - like halfway between the 6th and 7th hui, for example. The player doesn't sit at the center of the strings of the instrument - more to their right, and the hui are numbered from right to left - the most leftward hui for the player is the 13th.

The hui are placed at [1/8, 1/6, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 7/8] of the string length. The harmonics associated with these are simply the denominators of those fractions: 

    [8, 6, 5, 4, 3, 5,) 2, (5, 3, 4, 5, 6, 8].

These numbers are symmetric around the half-way point, but the pattern doesn't steadily decrease and then increase due to two fifth harmonic nodes straddling the octave.

There are hui at almost all the multiples of 1/5-, and 1/6-, and 1/8-times the open string length, except not at 3/8 and 5/8. I don't know why not. This set happens to also cover multiples of 1/2, 1/3, and 1/4 string lengths.

If you were to play stopped notes at each of the hui, with your left hand fretting and your right hand plucking, you would get frequency ratios as

    [8/7, 6/5, 5/4, 4/3, 3/2, 5/3, 2/1, 5/2, 3/1, 4/1, 5/1, 6/1, 8/1]

over the fundamental, with 8/7 at hui 13 and 8/1 at hui 1. These ratios are all 5-limit except for the 8/7, which is 7-limit. I don't think 8/7 is actually used much in Chinese guqin music as a stopped note, it's just easy to put a hui there since that's where a strong harmonic can be found.

So if the hui aren't identical to the fingerings used for stopped notes, what actual fingerings are used, and what are their frequency ratios?

On one one page of SilkQin, called "Taiyin Daquanji 1: Folio 1C: Miscellaneous Qin Information (I/48a-49a) 2", Thompson shares a historic source that gives poetic names for the tones at various positions along the neck. Thompson then converts these positions to "decimal" notation. In decimal notation, e.g. 7.3 is between hui 7 and hui 8, and it is 0.3 of the way between them. The hui aren't evenly spaced, so it takes a little bit of figuring to turn this into a string length, but we'll have to do the figuring if we want to know the actual string ratios and frequency ratios. Here are the decimals:

    [7.3, 7.6, 7.9, 8.5, 9.0, 9.4, 10.0, 10.8, 12.3, 13.1, 13.5]

I don't know how he come up with these numbers - like the original Chinese will give a poetic name for the 11th hui, but he gives 10.8 for the decimal notation. I assume that he knows where guqin players actually put their fingers in modern times, and he thinks that 11 was a shorthand for 10.8, but I wouldn't mind a little more discussion. Maybe I'll find it on another page.

Let's just do conversions first. Here are approximate frequency ratios for all of those decimal-notation neck positions, as well as ratios for the hui from 7 to 13.

13.5 : 112c ~ m2 # 16/15

13.1 : 207c ~ AcM2 # 9/8

13 : 231c ~ SpM2 8/7

12.3 : 290c ~ Grm3 # 32/27

12 : 316c ~ m3 # 6/5

11 : 386c ~ M3 # 5/4

10.8 : 408c ~ AcM3 81/64

10 : 498c ~ P4 # 4/3

9.4 : 617c ~ SpA4 # 10/7

9 : 702c ~ P5 # 3/2

8.5 : 791c ~ Grm6 # 128/81

8 : 884c ~ M6 # 5/3

7.9 : 913c ~ AcM6 # 27/16

7.6 : 1004c ~ Grm7 # 16/9?

7.3 : 1099c ~ M7 # 15/8?

7 : 1200c ~ P8 # 2/1

Many of these are dead on, and I think all but two (annotated with question marks) are within 4 cents. Maybe decimals aren't so precise in the middle of the instrument, or further from hui 13. The Grm7 is off by 8 cents, and the M7 is off by 11 cents. Closer ratios would be 25/14 and 17/9 respectively, but that's pretty suspicious when all the other intervals besides the tritone (and hui 13 with a stopped note frequency ratio of 8/7) are obviously 5-limit. 

If we only look at the decimal-notation string locations from the Taiyin Daquanji page, and not all of the integer hui, then we knock out hui 7, 8, 12, and 13, which are [P8, M6, m3, SpM2]. That removes a few 5-limit ratios, but we still have 5-limit m2, M3, and M7. So it's not like they're putting markers on 5-limit harmonics but then only playing 3-limit stopped notes. It looks like this source is actually advocating for 5-limit tuning. Which is cool.

In https://silkqin.com/08anal/tunings.htm#decimal, Thompson gives a few more neck positions / string length ratios in decimal-notation. These include 13.9 as a possible alternative to 13.1 and 13.5, as well as many decimal-notations numbers below 7, which the Taiyin Daquanji page didn't have.

The 13.9 decimal is only like 22 cents? That doesn't look right. That could be a Pythagorean or Syntonic comma, but I really doubt that it's going to be a useful melodic interval. Let's do that one by hand to check. The 13th hui is at 1/8 of the string length. We want to move from hui 13 toward the next hui by 1/9 of the remaining distance, but 13 is our last hui, so presumably we just go from hui 13 to the end of the string, giving a string ratio of

    (1/8) - ((1/8) * (9/10)) = 1/80

or a frequency ratio of 80/79 @ 22 cents. Crazy. That's less than a quartertone. I really don't think that's working as a melodic interval. Probably just a comma.

The [6.7 to 4.2] decimals are the same as the [3.4 to 1.2] decimals, just displaced by octaves. Here they are, octave reduced to fit in [0 to 1200 cents]:

6.7 : 107c ~ m2 # 16/15

6.4 : 221c ~ DeAcA2 # 25/22 (or 17 cents sharp of AcM2 # 9/8)

6.2 : 302c ~ Grm3 # 32/27 (but 8 cents too sharp)

5.9 : 415c ~ AcM3 # (but 7 cents too sharp)

5.6 : 506c ~ P4 # 4/3 (but 8 cents too sharp)

5.3 : 601c ~ ExA4 # 17/12

4.8 : 791c ~ Grm6 # 128/81

4.6 : 884c ~ M6 # 5/3

4.4 : 983c ~ Hbm7 # 30/17 (or 13 cents flat of Grm7 # 16/9)

4.2 : 1088c ~ M7 # 15/8

There are some weird cent values in there. They're not all obviously 3- and 5-limit. They're also not far enough away to be obviously something else. Probably we just need more decimal places at certain neck positions in order to zero-in on certain frequency ratios.

Let's finish by discussing string tuning. There are seven strings on a guqin. Thompson describes the standard tuning in terms of how one string relates to another that's fretted at a hui, like the open 7th string should match the 4th string fretted at hui 10, and hui 10 is 4/3 over the open string frequency. If you follow all of these references, you get frequency ratios for the strings, low to high, as

    [1/1, 9/8, 4/3, 3/2, 27/16, 2/1, 9/4]

If we call the low string C and use Pythagorean pitch names, this is

    [C, D, F, G, A, C, D]

with the last two notes being an octave above the first two. Thompson says that this tuning dominates the modern repertoire, but that there were other tunings historically that differed from this by the adjustment of a string or two strings by a half step.

He also describes several tunings that differ from the standard Pythagorean tuning above by adjusting strings by a Pythagorean comma, though I think he means a syntonic comma in several places (which is basically audibly indistinguishable from the Pythagorean one), since that's what needed for the arithmetic to work out. Although he uses frequency ratios that aren't Pythagorean or Syntonic, so... He seems a little confused in multiple directions here, but it has still been an enlightening read.

Music Generating Data Structures

I've made some programs for generating microtonal music in the past - mostly 5-limit just intonation, with some limited forays into higher limits. I'm planning to write a much better program that can go up to 23-limit just intonation, and I'm planning out how it should represent music.

A musical piece will be made of musical sections.

Sections will be made of chord onset events, possibly with measure markers sprinkled in.

Chord onset events are made of notes/rests for multiple voices. I think a rest will be a different kind of object than a note, but maybe it'll just be a note with a special pitch. If a piece has 6 voices, maybe every chord onset event will have rests/notes listed for all six voices? I think so.

Notes have pitch and duration, and a property that tells you whether the note is voiced at the onset time veruss suspended from a previous note with the same pitch. I think notes/rests will have pointers to the previous note/rest in the same voice. Possibly they'll have pointers to the next note/rest as well, so that a voice could be thought of as a double linked list of notes/rests.

Sections are represented in terms of chord onset events, but that's not how they're composed/generated. Sections will mostly be composed from melodies. A secontion retains an edit history of the melodic addition events that were used to compose it.

I think adding melodic content will look like this - perhaps we'll call it a melodic or motivic occurence event:

    Add (invert(Motive-X)), at time T2, in voice W)

"Invert" is a determinstic transform that generates a new melody from a given one. Deterministic transforms include [transpose, invert, reverse, augment rhythm (e.g. double note lengths), diminish rhythm].

There are also going to be transforms like "compose countermelody to a given melody, heavy in contrary motion". It feels like this kind of transform has to be non-deterministic. Maybe these can depend determinstically on a random seed value, so that composition can be variable but also reproducible, but I don't really see how. Maybe it's not important - the edit history can just include "compose counter melody to melody-X // psst: here's the countermelody generated".

I think applying ornaments and diminutions will also be a deterministic affair. You can choose which ones to apply randomly in composition, but there has to be a history of edits that reproducibly generates the song. This will let you edit previously generated content at different levels of abstractions: you can change the ornaments, you can change the amount of transposition of a transform for a motivic onset in one voice, maybe other things. The diminutions of this type will mostly be used for doing things like this: the soprano gets a frilly bit while the middle voices are doing slow notes, maybe then a middle voice responds while the soprano has slow notes.

I haven't thought much about how to generate a response melody from a call melody, but that is as important as generating simultaenous countermelodies, and will have to be addressed. Call-melodies end high, possibly with weaker harmony, and response melodies end low with strong harmony? There's a little more to it than that.

After adding enough motivic content that we have a skeleton of chord onset events for all voices (or at least two successive chord onset events with full voicing), then we'll have the option to try adding suspensions, passing tones, and neighbor notes in multiple voices simultaneously between those chord onsets. I think these will still be applied in the melodic-addition edit history (from which chord-onset events are generated) but it will be convenient to have full voiced chords sequences to decide which extra notes can be used - which combinations make unacceptable dissonances, and which make bold but acceptable passing dissonances while moving between consonant chords.

Obviously I'm trying to design this so that it can make imitative counterpoint, but hopefully it will also be general enough to make many kinds of music - romantic era classical music and smooth jazz and math rock and arabic maqam music and and bossa nova and Georgian folk music and so on.

...

I didn't have to spend much time coding this up before deciding that I had it backwards - the native representation of music should be parallel voices, and the chord-onset view should be more like an annotation.

...