Sugar-Free Juice

I want to try extracting some things from juice - like organic acids and pigments and polyphenols - and I think this will be easier if I get rid of the sugar. But how does one get rid of the sugar in juice? Here's my plan.

If you aerate yeast, it's more likely to use aerobic respiration than fermentation. This is called the Pasteur effect. So let's put an aquarium pump and some yeast in bottle of juice and see what it does? I don't think that will quite work; lots of yeasts will still ferment sugars when aerated if there's a lot of sugar around - like in juice. This is called the Crabtree effect.

So we could dilute the juice to reduce its sugar content, but I estimate you have to dilute by something like 1000 times to prevent the Crabtree effect when using saccharomyces cerevisiae on juice. And that's not a home scale experiment. 

Another option is that we could find a food-grade yeast that doesn't have the Crabtree effect. Kluyveromyces species fit this bill. Kluyveromyces species are pretty good at doing just respiration on carbohydrates when aerated, and they're found in live-culture kefir.

I don't know the composition of yeast and bacteria in the kefir itself (the fermented milk) as well as the composition in the kefir grains; the latter is the thing that's analyzed in detail in biology publications. Here are some quotes about the grains:

"Kefir grain is composed of a diverse spectrum of species and genera including lactic acid bacteria (Lactobacillus, Lactococcus, Leuconostoc), yeasts (Kluyveromyces, Candida, Saccharomyces, and Pichia) and sometimes acetic acid bacteria (Acetobacter) in a symbiotic association."

"A complex and highly variable symbiotic community can be found in these grains, which can include acetic acid bacteria (such as Acetobacter aceti and A. rasens), yeasts (such as Candida kefyr and Saccharomyces cerevisiae) and a number of Lactobacillus species, such as L. parakefiri, L. kefiranofaciens (and subsp. kefirgranum), L. kefiri, etc."

"Many different species of Saccharomyces have been isolated from kefir, however, S. cerevisiae and S. unisporus are the most common and present in many varieties (Angulo et al., 1993; Marquina et al., 2002; Latorre-García et al., 2007; Diosma et al., 2014). Kluyveromyces make up the majority or entirety of the lactose utilizing yeast population, with K. marxianus and K. lactis being the two most common species (Simova et al., 2002; Latorre-García et al., 2007; Diosma et al., 2014). The Candida population is made up of a wide range of species with C. holmii and C. kefyr being the most prevalent (Angulo et al., 1993; Marquina et al., 2002). Outside of these three genera, only Pichia has been identified with any regularity and in each case the species was identified as Pichia fermentans."

"As fermentation progresses the proportions of some yeast species change with non-lactose fermenting yeasts, such as Saccharomyces, decreasing, whereas lactose utilizing K. marxianus and K. lactis show a similar distribution between grain and kefir (Simova et al., 2002)."

Based on the last quote, I'm hopeful that I can use a well fermented kefir's liquid as a purer source of Kluyveromyces yeast than the grains would be.

Once source, "Survivability of Kluyveromyces marxianus Isolated From Korean Kefir in a Simulated Gastrointestinal Environment" says that "Kluyveromyces marxianus accounts for > 90% of the yeast population of kefir", so our isolation is already well in progress.

I've seen a procedure for isolating Kluyveromyces that used kefir directly (the fermented milk) rather than kefir grains. You take a wire loop and dip it in the kefir and scratch it over an agar plate enriched with a growth medium favorable to yeasts and then grab a sample of the the right yeast by visual discrimination once some spots have grown on the plate. 

I think that would work fine, but I don't want to do it. I'm not really up to mixing a growth medium, or making an agar plate, or waiting for cultures to grow on agar. For this to be an experiment worth my time, it has to be a lot less time consuming than that. But I think I have a solution!

Kluyveromyces species are famously heat tolerant as yeasts. Some quotes:

"The thermotolerance of different K. marxianus strains has already been documented, where it has been observed to grow at temperatures of up to 52°C and to ferment ethanol at temperatures between 38 and 45°C (Choudhary et al., 2016)."

"The thermotolerant yeast Kluyveromyces marxianus, growing at high temperature (45℃) , showed stronger survival under heat shock at 50℃ than the brewing yeast Saccharomyces cerevisiae, which was unable to grow at 45℃. The survival rate of K. marxianus decreased to 10% during heat shock at 50℃ for 20 min, and to less than 0.01% at 60℃ for 20 min. Cells with damaged cellular membranes were infrequently observed at 50℃ and had decreased significantly from heat shock at 60℃. The metabolic activity of K. marxianus was retained at 50℃, whereas that of S. cerevisiae was not."

So my plan is get some Kluyveromyces from kefir, and heat it to 50℃ for long enough to reduce other yeasts (and hopefully bacteria) without killing the Kluyveromyces, i.e. perhaps somewhat less than 20 minutes so that I don't decrease it all the way down to 10%.

I think this temperature and exposure length will kill Lactococcus and Leuconostoc and Acetobacter, but not all Lactobacillus.

So that's where I'm stuck at the moment. I think I can kill the other yeasts, but I want to also kill of the other bacteria. And then I'll maybe build up the Kluyveromyces culture a little by feeding it some sugar and add it to a container of juice with an air pump. Maybe there will be a HEPA filter or two somewhere for sterility.

Instead of using Kluyveromyces, I've also put some thought into protocols that remove sugar from juice by fermenting the sugar to alcohol using the standard Saccharomyces and then removing the alcohol, perhaps simultaneously with the ferment or in several alternating stages. I'm not optimistic about that, but I haven't given up on it entirely.

...

Anyway, the next task is selection for Kluyveromyces over Lactobaccilus. I think Kluyveromyces might be a little more tolerant of low pH, but I'm not sure and even if I'm right, I don't think it's a big enough effect that I'd want to rely on it for selection. I've heard of using a protein called lysozyme as an anti-bacterial agent against gram-positive bacteria, and Lactobaccilus species are gram-positive, but apparently their response to lysozyme is strain dependent and I don't have any to begin with. Perhaps I could find a food that Kluyveromyces can metabolize but Lactobaccilus can't? That might be hard: lactobaccilus species can produce at least lactase, proteases, fructanases, amylases, bile salt hydrolases, phytases, and esterases. I hear most Lactobaccilus species are disparaged by the presence of hops in beer, but Lactobacillus brevis isn't.

...

You know, if I can't separate the two, maybe it's not the biggest problem? I'll still get juice that's free of simple sugars and alcohol. It might have extra lactic acid. Sad. Also, I'm a little worried that if I have a yeast and a bacteria, then that's a lot of metabolic machinery, and other things in juice that I wanted to extract might get eaten - no more esters, no more weird polysaccharides, no more variety. 

...

Septimal Harmony Again

:: Roughly six rambling paragraphs of motivation for 7-limit just intonation

We mostly play instruments that are harmonic, meaning that sounded notes have strong identifiable base frequencies in addition to strongly present spectral spikes, or "partials", at frequencies which are integer multiples of the base frequency - so called harmonic partials or harmonics. We can sound multiple notes against each other that are related by simple frequency ratios ("just intonation") to produce nice combination-sounds because of this. If you have instruments whose partials are inharmonic, then just intonation stops being the right framework for producing euphonious polyphony among them.

In just intonation, you can get a fairly good scale using frequency ratios with prime factors of just 2 and 3. The interval system that abstracts this frequency ratio space is called rank-2 interval space and it's what almost all western musicians learn - it has intervals like the perfect fourth, the minor second, the augmented sixth, and the diminished seventh. Purely tuning rank-2 intervals is also called "Pythagorean tuning". The major, minor, and chromatic scales you get by purely tuning rank-2 intervals are fairly good, but not great. Most tuning systems you're familiar with, like 12-tone equal temperament and quarter comma meantone, are a patch for this: by mistuning rank-2 interval space a little, you can get some notes to sound like they have simpler and prettier ratios with factors of (2, 3, 5) instead of more complex ratios with just factors of (2, 3). For example, if you tune the rank-2 major seventh purely, you get a frequency ratio of 243/128, whereas the rank-3 major seventh is more simply 15/8. In addition to being have a smaller numerator and denominator, 15/8 does in fact sound better when sounded against the unison. Quarter comma meantone and 12-TET slide the major seventh toward its 5-limit value.

I contend that major, minor, and chromatic scales of western music theory are fundamentally rank-3, in that they're correctly abstracted from frequency ratios with factors of 5. Our music is most naturally represented with rank-3 intervals. There are many reasons why we use mistuned rank-2 intervals instead of purely tuned rank-3 intervals to represent western music - some of which are convenience of mental representation, convenience of symbolic representation on written scores, convenience of instrument construction, and convenience of performance. And at this point, people are so used to mistuned rank-2 intervals, that lots of people don't even like the sound of purely tuned rank-3 intervals as much, so called 5-limit just intonation.

But I believe western music is fundamentally rank-3, and I'm committed to rewriting music theory to reflect this. We've already got the convenient theory written, now it's time to do it right.

If harmony sounds better when we consider prime factors of 5 in our frequency ratios, what about higher primes? Is there a use for factors of 7?

The seventh harmonic sounds pretty good sounded against unison. It's definitely not a piano note, but it's not offensive. If anything it's kind of too pure? Like if you're used to 12-TET you'll be like, "Wait a second, why isn't this beating slightly? I'm use to slight beating." Also, barbershop quartets often use the seventh harmonic, and let's be honest, barbershop quartet music is sometimes technically impressive, but it's not really good. Some instruments are designed to suppress reduce spectral content near the 7th harmonic and its multiples: piano hammers are placed along the string that way. But despite the fact that some instruments suppress it, and that barbershop quartets aren't transcendently beautiful, I think think the 7th harmonic and other septimal intervals are pretty cool and valuable/useful in just intonation. "Blue notes" in blues which fall between the usual piano keys are often analyzed as being septimal. Like blues guitarists don't  just bend their strings to make ornamental variations in their melodies - they can be observed bending reliably to the same non-12-TET notes, and septimal frequency ratios are one framework for understanding the function of those notes. I've also used septimal intervals productively in analyzing middle eastern microtonal music. As we go to higher primes, they definitely become less relevant: you can't really pluck a 13th harmonic on a string, for example. Higher harmonics also get weaker in magnitude/volume as you go higher, so it gradually becomes unlikely that they're contributing perceptually to the timbre of instruments or the timbre of harmonies. Also people have imperfect pitch discrimination, so I think it stops making much sense to analyze pitches past a certain granularity - like even if it were loud enough to hear, is the 29th harmonic different enough from intervals available with harmonics up to 23 that we should name it that way? Or more concretely, trained people can only hear like 3 to 5 cents of frequency difference in a quiet laboratory setting, but my guess is that most people in noisy environments don't do much better than 20 cents. If an octave is 1200 cents, and there are perhaps 12 simple frequency ratios within an octave that are associated with each prime, then we can cover all the perceptually distinguishable frequencies with 1200 / 20 / 12 = 5 primes; [2, 3, 5, 7, 11]. Even if allow finer discrimination of frequency ratios in this model, it's not obvious to me that people will use frequency ratios differently just because they can notice a difference - a 5 cent sharp perfect fourth is still just going to be used like a perfect fourth. The fact that different tuning systems in wide use (or former/historic wide use) will place intervals more than 5-cents away from their pure values proves that our functional-assignments aren't as fine as our pitch discrimination.

Anyway, I recognize that the 11th harmonic contributs audibly to musical timbre. You can use audio filters to amplify or diminish the magnitude of a the 11th harmonic of a sound to experience its contribution and train yourself to recognize it - and it is fairly present and important, I'd say, having done a little of this training. So there's logical room for a theory of how to use 11-limit frequency ratios harmonically. But also the 11th harmonic sounded against the unison sounds pretty bad to my ear, while the 7th harmonic sounds quite good. So I myself am strongly motivated to understand septimal harmony, while the 11th harmonic and higher I mostly leave for other people to theorize about. The 7th harmonic, which sounds good/cool/interesting, and is also definitely useful for analyzing microtones beyond 5-limit just intonation, which are not uncommon in human music, even if they're not in the core of major/minor/chromatic notes that we use for most daily music in the west.

: Investigating 7-limit Just Intonation 

...

I started by making a little scale with septimal intervals and finer divisions than the chromatic. And then I picked three random distinct intervals from the scale to make a chord and listened to them to judge their consonance. I also removed the lowest note from all the intervals of the chord, so that below they're all have P1 in the bass. This made for a lot more intervals in my chord space than were in my original scale. Which is fine. It means I did a more thorough investigation of septimal intervals. Anyway, then I rated the chords as {"good", "okay", or "bad"} in terms of consonance. And I did that at least four times for each chord below and many others that were too ugly to include. Then I associated those categories with {3, 2, 1} so I could take an average and sort numerically. And here below we have, a bunch of chords with septimal intervals sorted by how consonant I thought they were. Higher values for higher consonance.

...

3.0 : ('P1', 'm3', 'SpM6')

3.0 : ('P1', 'SpGrA5', 'SpA9')

3.0 : ('P1', 'SpA6', 'M10')

3.0 : ('P1', 'SpA4', 'SpM6')

3.0 : ('P1', 'SpA3', 'M6')

3.0 : ('P1', 'Sbd4', 'Sbd6')

3.0 : ('P1', 'SbAcd4', 'AcM6')

3.0 : ('P1', 'P5', 'SbAcd11')

3.0 : ('P1', 'M6', 'SbAc11')

2.8333333333333335 : ('P1', 'SpGrA5', 'M10')

2.8333333333333335 : ('P1', 'P4', 'Sbd7')

2.8 : ('P1', 'Sbm3', 'Gr5')

2.8 : ('P1', 'Sbd5', 'M6')

2.8 : ('P1', 'Sbd3', 'Sbd5')

2.8 : ('P1', 'SbSb4', 'SbSbm6')

2.8 : ('P1', 'AcM2', 'Sbd5')

2.75 : ('P1', 'SpGrM3', 'SpM6')

2.75 : ('P1', 'SpA6', 'P8')

2.75 : ('P1', 'SpA3', 'SpA6')

2.75 : ('P1', 'SpA2', 'SpGrA5')

2.75 : ('P1', 'Sbd5', 'Sbd7')

2.75 : ('P1', 'SbAcd4', 'SbAcm6')

2.75 : ('P1', 'SbAcd4', 'AcM9')

2.7142857142857144 : ('P1', 'm7', 'SbAcd11')

2.7142857142857144 : ('P1', 'SpM6', 'SpA11')

2.7142857142857144 : ('P1', 'Grm3', 'Sbd6')

2.6666666666666665 : ('P1', 'm3', 'SpA4')

2.6666666666666665 : ('P1', 'm10', 'SpA11')

2.6666666666666665 : ('P1', 'm10', 'Sbd12')

2.6666666666666665 : ('P1', 'SpGr5', 'SpM6')

2.6666666666666665 : ('P1', 'SpA3', 'SpM6')

2.6666666666666665 : ('P1', 'Sbm7', 'M13')

2.6666666666666665 : ('P1', 'Grm7', 'Sbd10')

2.6 : ('P1', 'SpM6', 'SpA9')

2.6 : ('P1', 'SpGrM3', 'm6')

2.6 : ('P1', 'Sbm3', 'M6')

2.5 : ('P1', 'm3', 'Sbd5')

2.5 : ('P1', 'SpSpM3', 'M6')

2.5 : ('P1', 'SpA4', 'm6')

2.5 : ('P1', 'Sbd7', 'AcM9')

2.5 : ('P1', 'SbAcd4', 'P5')

2.5 : ('P1', 'SbAcd11', 'AcM13')

2.5 : ('P1', 'M3', 'SpGrA5')

2.5 : ('P1', 'AcA2', 'Sbm7')

2.4285714285714284 : ('P1', 'SpA2', 'SpA4')

2.4 : ('P1', 'm3', 'Sp5')

2.4 : ('P1', 'd8', 'SbAcd11')

2.4 : ('P1', 'SpGrm3', 'SpGr5')

2.4 : ('P1', 'SpA2', 'M6')

2.4 : ('P1', 'Sbd4', 'Grm7')

2.4 : ('P1', 'SbAcd4', 'm7')

2.3333333333333335 : ('P1', 'm3', 'SpA5')

2.3333333333333335 : ('P1', 'd4', 'Sbd6')

2.3333333333333335 : ('P1', 'SpM2', 'SpA4')

2.3333333333333335 : ('P1', 'SpM2', 'SpA3')

2.3333333333333335 : ('P1', 'SpA5', 'P8')

2.3333333333333335 : ('P1', 'SpA3', 'P8')

2.3333333333333335 : ('P1', 'Sbm7', 'Sbm10')

2.3333333333333335 : ('P1', 'Sbm7', 'M10')

2.3333333333333335 : ('P1', 'Sbd8', 'P11')

2.3333333333333335 : ('P1', 'Sbd5', 'Grd7')

2.3333333333333335 : ('P1', 'Sbd12', 'M13')

2.3333333333333335 : ('P1', 'SbSbm7', 'SbSbAc11')

2.3333333333333335 : ('P1', 'SbAc4', 'Sbm7')

2.3333333333333335 : ('P1', 'P4', 'Sbm6')

2.3333333333333335 : ('P1', 'AcM6', 'SbAcd8')

2.2857142857142856 : ('P1', 'SpA4', 'SpM9')

2.25 : ('P1', 'm7', 'SpA8')

2.25 : ('P1', 'SpGrm7', 'SpM9')

2.25 : ('P1', 'SpGr5', 'M10')

2.25 : ('P1', 'SpA4', 'SpGrA5')

2.25 : ('P1', 'SpA2', 'SpGr5')

2.25 : ('P1', 'Sbd7', 'P8')

2.25 : ('P1', 'SbAc11', 'SbAcM13')

2.25 : ('P1', 'Sb4', 'Sbm6')

2.25 : ('P1', 'P5', 'Sbd7')

2.2 : ('P1', 'm3', 'SbAcm6')

2.2 : ('P1', 'SpGrm3', 'SpGrm7')

2.2 : ('P1', 'SpGrM3', 'SpA4')

2.2 : ('P1', 'Sp5', 'SpGrm7')

2.2 : ('P1', 'Sbm3', 'P5')

2.2 : ('P1', 'Sbm3', 'A5')

2.1666666666666665 : ('P1', 'm3', 'SpGrm7')

2.1666666666666665 : ('P1', 'Grd5', 'Sbd8')

2.0 : ('P1', 'm6', 'SpGrM7')

2.0 : ('P1', 'SpSpA2', 'SpSpGrA5')

2.0 : ('P1', 'SpM6', 'SpM9')

2.0 : ('P1', 'SpM3', 'SpGrm7')

2.0 : ('P1', 'SpM3', 'SpGrA5')

2.0 : ('P1', 'SpM3', 'SpA5')

2.0 : ('P1', 'SpM3', 'P5')

2.0 : ('P1', 'SpM2', 'SpGrM7')

2.0 : ('P1', 'SpGrm3', 'SpA4')

2.0 : ('P1', 'SpGrM7', 'SpA9')

2.0 : ('P1', 'SpGrM7', 'M10')

2.0 : ('P1', 'SpGrM3', 'SbGrm7')

2.0 : ('P1', 'SpGr5', 'SpA9')

2.0 : ('P1', 'SpGr5', 'P8')

2.0 : ('P1', 'SpA5', 'SpA11')

2.0 : ('P1', 'SpA3', 'SpA9')

2.0 : ('P1', 'Sp4', 'SpM6')

2.0 : ('P1', 'Sbm7', 'SbAcd11')

2.0 : ('P1', 'Sbm7', 'P8')

2.0 : ('P1', 'Sbm6', 'M9')

2.0 : ('P1', 'Sbd8', 'Sbd10')

2.0 : ('P1', 'Sbd5', 'Sbm7')

2.0 : ('P1', 'Sbd5', 'Grm7')

2.0 : ('P1', 'Sbd4', 'Sbd10')

2.0 : ('P1', 'Sbd3', 'Grm7')

2.0 : ('P1', 'SbSbd5', 'SbGrd7')

2.0 : ('P1', 'SbSbAcd4', 'Sbm6')

2.0 : ('P1', 'SbAcd4', 'P12')

2.0 : ('P1', 'SbAcd4', 'Acm6')

2.0 : ('P1', 'SbAc4', 'SbAcM6')

2.0 : ('P1', 'SbAc11', 'AcA13')

2.0 : ('P1', 'P8', 'SpA10')

2.0 : ('P1', 'P8', 'Sbd10')

2.0 : ('P1', 'M3', 'Sbm7')

2.0 : ('P1', 'Grm7', 'Sbm10')

2.0 : ('P1', 'Grm3', 'Sbd8')

2.0 : ('P1', 'Grd5', 'Sbd10')

2.0 : ('P1', 'Acd4', 'SbAcm6')

2.0 : ('P1', 'AcM6', 'SbAc11')

2.0 : ('P1', 'AcM3', 'SbAcd8')

2.0 : ('P1', 'AcM2', 'SpAcA4')

2.0 : ('P1', 'Ac5', 'SbAcm10')

2.0 : ('P1', 'A4', 'Sbm6')

2.0 : ('P1', 'A2', 'SbGrm7')

1.8571428571428572 : ('P1', 'SpM3', 'SpA4')

1.8333333333333333 : ('P1', 'SpGr5', 'SpGrM7')

1.8333333333333333 : ('P1', 'Sb5', 'AcA9')

1.8 : ('P1', 'm3', 'SpA11')

1.8 : ('P1', 'SpGrM3', 'SpA8')

1.8 : ('P1', 'SpA2', 'SpA3')

1.8 : ('P1', 'Sbd4', 'SbGrm7')

1.8 : ('P1', 'Sbd4', 'Grd5')

1.8 : ('P1', 'Sb4', 'M6')

1.8 : ('P1', 'P8', 'SpA11')

1.8 : ('P1', 'P5', 'SpM6')

1.8 : ('P1', 'M3', 'SpGrM7')

1.75 : ('P1', 'Spm6', 'Sp11')

1.75 : ('P1', 'SpM3', 'SpSpGrA5')

1.75 : ('P1', 'SpM3', 'SpGrM7')

1.75 : ('P1', 'SpM2', 'SpM6')

1.75 : ('P1', 'SpGrm7', 'SpM10')

1.75 : ('P1', 'Sp4', 'Spm6')

1.75 : ('P1', 'Sbm3', 'SbAc11')

1.75 : ('P1', 'Sbd8', 'm10')

1.75 : ('P1', 'Sbd5', 'm10')

1.75 : ('P1', 'Sbd3', 'd5')

1.75 : ('P1', 'SbAc4', 'P8')

1.75 : ('P1', 'Sb5', 'SbSbm10')

1.75 : ('P1', 'M2', 'Sbm7')

1.7142857142857142 : ('P1', 'SbAcm2', 'Ac4')

1.6666666666666667 : ('P1', 'm6', 'SbAc11')

1.6666666666666667 : ('P1', 'm3', 'Sbm6')

1.6666666666666667 : ('P1', 'm3', 'SbSbAcm6')

1.6666666666666667 : ('P1', 'SpM3', 'd5')

1.6666666666666667 : ('P1', 'SpM2', 'SpGr5')

1.6666666666666667 : ('P1', 'SpM2', 'SpA5')

1.6666666666666667 : ('P1', 'SpA4', 'SpA5')

1.6666666666666667 : ('P1', 'SpA3', 'SpM7')

1.6666666666666667 : ('P1', 'SpA3', 'SpA8')

1.6666666666666667 : ('P1', 'SpA2', 'SpA8')

1.6666666666666667 : ('P1', 'Sbm6', 'Sb8')

1.6666666666666667 : ('P1', 'Sbm3', 'P8')

1.6666666666666667 : ('P1', 'SbAcm3', 'SbAc4')

1.6666666666666667 : ('P1', 'SbAcM2', 'AcA4')

1.6666666666666667 : ('P1', 'SbAc4', 'AcA9')

1.6666666666666667 : ('P1', 'P5', 'SpGrM7')

1.6666666666666667 : ('P1', 'P5', 'Sbd10')

1.6666666666666667 : ('P1', 'M3', 'Sbm6')

1.6666666666666667 : ('P1', 'M2', 'SpA10')

1.6666666666666667 : ('P1', 'Gr5', 'Sbm10')

1.6666666666666667 : ('P1', 'AcA2', 'SbAcM6')

1.6666666666666667 : ('P1', 'AcA2', 'SbAc4')

1.6 : ('P1', 'm7', 'SbAcm9')

1.6 : ('P1', 'SpM2', 'Sbd5')

1.6 : ('P1', 'SpA4', 'SpGrm7')

1.6 : ('P1', 'SpA3', 'SpGr5')

1.6 : ('P1', 'Sbm7', 'AcM9')

1.6 : ('P1', 'Sbm3', 'A4')

1.6 : ('P1', 'Sbd3', 'm6')

1.6 : ('P1', 'P4', 'Sbm7')

1.5 : ('P1', 'm3', 'Sbm7')

1.5 : ('P1', 'm3', 'Sb5')

1.5 : ('P1', 'SpM6', 'Sp11')

1.5 : ('P1', 'SpM3', 'SpM9')

1.5 : ('P1', 'SpM3', 'SpA6')

1.5 : ('P1', 'SpGrm7', 'SpA11')

1.5 : ('P1', 'SpGrM3', 'Spm6')

1.5 : ('P1', 'SpGrM3', 'SpGrm7')

1.5 : ('P1', 'SpAcM6', 'Ac11')

1.5 : ('P1', 'SpAcA2', 'Ac4')

1.5 : ('P1', 'SpA5', 'SpM9')

1.5 : ('P1', 'SpA5', 'SpGrM7')

1.5 : ('P1', 'SpA2', 'SpA10')

1.5 : ('P1', 'Sp4', 'SpGrM7')

1.5 : ('P1', 'Sbm2', 'Sb4')

1.5 : ('P1', 'Sbd5', 'SbSbd7')

1.5 : ('P1', 'Sbd4', 'Sbd11')

1.5 : ('P1', 'SbSbm3', 'Sbm6')

1.5 : ('P1', 'SbAcm2', 'SbSbd5')

1.5 : ('P1', 'SbAc4', 'P5')

1.5 : ('P1', 'SbAc4', 'AcM9')

1.5 : ('P1', 'Sb5', 'Grm7')

1.5 : ('P1', 'Sb4', 'GrM10')

1.5 : ('P1', 'M6', 'Sb8')

1.5 : ('P1', 'M3', 'Sb5')

1.5 : ('P1', 'Grm3', 'Sb4')

1.5 : ('P1', 'Acm6', 'SbAcd11')

1.5 : ('P1', 'AcA1', 'SbAcm6')

1.5 : ('P1', 'A5', 'Sb8')

1.4 : ('P1', 'SpA4', 'SpA8')

1.4 : ('P1', 'Sbm3', 'P4')

1.4 : ('P1', 'Sbd5', 'M7')

1.4 : ('P1', 'SbAcM6', 'P12')

1.3333333333333333 : ('P1', 'd4', 'Sbd10')

1.3333333333333333 : ('P1', 'SpSpA2', 'SpM6')

1.3333333333333333 : ('P1', 'SpM6', 'SpA8')

1.3333333333333333 : ('P1', 'SpM6', 'P12')

1.3333333333333333 : ('P1', 'SpM3', 'SpA3')

1.3333333333333333 : ('P1', 'SpM3', 'SpA11')

1.3333333333333333 : ('P1', 'SpM3', 'SbAcm13')

1.3333333333333333 : ('P1', 'SpGrm7', 'SpA8')

1.3333333333333333 : ('P1', 'SpGrm3', 'm6')

1.3333333333333333 : ('P1', 'SpGrm3', 'SpGrM7')

1.3333333333333333 : ('P1', 'SpGrm3', 'Sp8')

1.3333333333333333 : ('P1', 'SpGrM7', 'SpM10')

1.3333333333333333 : ('P1', 'SpGrA5', 'SpA6')

1.3333333333333333 : ('P1', 'SpGr5', 'SpM10')

1.3333333333333333 : ('P1', 'SpA4', 'SpA12')

1.3333333333333333 : ('P1', 'Sp5', 'SpGrM7')

1.3333333333333333 : ('P1', 'Sbm6', 'SpGrM10')

1.3333333333333333 : ('P1', 'Sbm3', 'Sb5')

1.3333333333333333 : ('P1', 'Sbm10', 'm13')

1.3333333333333333 : ('P1', 'Sbd5', 'Sbd12')

1.3333333333333333 : ('P1', 'Sbd4', 'Grd7')

1.3333333333333333 : ('P1', 'SbSbm6', 'SbSbd8')

1.3333333333333333 : ('P1', 'SbAcm9', 'SbAc11')

1.3333333333333333 : ('P1', 'SbAc4', 'AcA6')

1.3333333333333333 : ('P1', 'Sb5', 'M7')

1.3333333333333333 : ('P1', 'P5', 'SbAc11')

1.3333333333333333 : ('P1', 'P4', 'SbM10')

1.3333333333333333 : ('P1', 'M6', 'SpM9')

1.3333333333333333 : ('P1', 'M6', 'Sbd8')

1.3333333333333333 : ('P1', 'M3', 'SpM9')

1.3333333333333333 : ('P1', 'M10', 'SbAcM13')

1.3333333333333333 : ('P1', 'Grd3', 'Sbd6')

1.3333333333333333 : ('P1', 'AcA2', 'Sb5')

1.3333333333333333 : ('P1', 'Ac4', 'SbAcm10')

1.3333333333333333 : ('P1', 'A4', 'Sbm10')

1.25 : ('P1', 'SpSpGrA5', 'P8')

1.25 : ('P1', 'SpM9', 'Sbd11')

1.25 : ('P1', 'SpM2', 'SpGrm7')

1.25 : ('P1', 'SpGrM3', 'Sp8')

1.25 : ('P1', 'SpA3', 'SpGrM7')

1.25 : ('P1', 'SpA1', 'SpGrm7')

1.25 : ('P1', 'SpA1', 'SpGr5')

1.25 : ('P1', 'Sbm6', 'SbSbd7')

1.25 : ('P1', 'SbSbAcd4', 'SbAcM13')

1.25 : ('P1', 'SbAcd4', 'd5')

1.25 : ('P1', 'Sb5', 'A11')

1.25 : ('P1', 'M3', 'Sbd5')

1.25 : ('P1', 'GrM6', 'SbGrm7')

1.2 : ('P1', 'SpA1', 'SpA3')

1.2 : ('P1', 'Sbd3', 'm3')

...

A bunch of these intervals I find pretty suspicious; I think they're probably not representing simple septimal sounds. Rather they're consonant to my ear because they're approximating other frequency ratios, like 3-limit ratios or 5-limit ratios or even irrational 12-EDO frequency ratios, which my ear is unfortunately also accustomed to and sometimes picks out as consonant.

The next step of my investigation is to go through the more consonant chords and try to figure out which ones are actually septimal in character, and then I can piece together some heuristics for building consonant septimal chords, which can then be used as constraints in composing counterpoint and other polyphony.

There are other options for judging chordal consonance programmatically - I could use a Sethares-inspired psychoacoustic model of polyphonic audition (which I think would work fairly well but is overkill as a thing to include in a program for composing) or I could look at complexity of the chord's otonal representation (which I think is nonsense psychoacoustically but it would be easy). But my program of reverse engineering chords that I like worked well when I learned/invented heuristics for composing in 5-limit just intonation and I think it will continue to serve me well in 7-limit.

...

When I look through all the internal intervals within the harmonious-rated chords above, a lot of the frequency ratios of internal intervals are close to 5-limit ratios - off by a factor of 225/224, which is like 7 cents. The interval justly associated with 225/224 is called the septimal super augmented zeroth, SpA0. I'm going to use this fact to figure out which of the chords are not really septimal.

First I define the basis for a tunings system

    (SpA0, Sbm7, P8, M3)

In the rank-4 Lilley Johnston comma basis, this basis is written

    ((0, 0, -1, 1), (3, 10, 6, -1), (3, 12, 7, 0), (1, 4, 2, 0))

This has a determinant of 2, which will be important shortly. The basis intervals are justly tuned to (225/224, 7/4, 2/1, 5/4), but I'm going to define a tuning system that tempers out the first interval, SpA0.

    (SpA0, Sbm7, P8, M3) -> (1/1, 7/4, 2/1, 5/4)

Now we have the pieces we need to tune arbitrary rank-4 intervals in a system that tempers out SpA0, and therefore assigns equal frequency ratios to two intervals that differ by SpA0. I can go through chords and look at their intervals and say for each one, "Is there an interval with these same tempered coordinates / the same frequency ratio that has a shorter name? If  so, let's make a new chord where the intervals are simplified and we'll see that some of these harmonious chords with complex rank-4 intervals were functioning as harmonious chords with only rank-3 intervals, as far as someone with pitch discrimination around 7 cents can discern."

I am also interested in using this temperament procedure to replace complex intervals with simpler intervals of a different kind - those with lower prime-rank, rather than shorter/simpler names. And I suppose I could combine these two: like if Grm7 and Sbm7 happened to have the same tempered coordinates, then I could prefer to spell by chords with Grm7 on account of it being 5-limit. I think that's worth exploring at some point, but first I'm just going to use short interval names as my measure of complexity, and given two interval names of equal length, I'm going to prefer ones which come earlier in the list of intervals I added to a list as they became relevant when I was playing around with septimal chords. This is kind of arbitrary, but I don't think it's exactly wrong to say "these intervals are in practice more important, so I'm going to use them in my future analyses".

We could also use a measure of just-frequency-ratio complexity to judge which of two intervals is simpler when they have the same tempered coordinates. Lots of options. For another time.

...

Okay, so the super augmented third, SpA3 showed up a few times in my harmonious septimal chords. This differs from P4 by SpA0, and P4 is way simpler, so I'm going to reinterpret all the SpA3s as being not really septimal. Like [P1, SpA3, M6] should be called [P1, P4, M6], which is an inversion of [P4, M6, P8] which is a major chord rooted on P4, like F.maj in they key of C major. Not septimal.

Likewise our temperament maps Sbd6 to P5. Not septimal. I'm replacing SpGrA5 with Grm6. I'm replacing SpSpM3 with Spd4. And SbAcd4 becomes AcM3. And Sbd3 becomes AcM2. And SbAcd11 is AcM10. And SpA6 becomes Grm7.

Using the tempering procedure, SbSb4 becomes SbA3. But neither one of these are particularly useful/functional/interpretable intervals. But they're both within 6 cents of AcM3. And that's how I'll treat them. This is like tempering out the intervals justly associated with 19683/19600 or 4375/4374 (a schisma off from SpA0), respectively. I think I'd also like to push SpGrM3 and Grd4 to AcM3.

My tempering procedure would turn SpGr5 into Grd6, which is like {32/21 -> 1024/675}. Neither one makes much sense to me. I think I'll stick with the first one. There really isn't much nearby that's simpler for frequency ratios other than P5. I suppose I should listen to the chord with P5 instead of SpGr5 to see which is better.

Due to my kind of arbitrary preference ordering of intervals that have the same length names, the temperament procedure actually introduced a septimal interval where it hadn't been before: I stand by AcA2 being re-interpreted as Sbm3, so now the harmonious chord [P1, AcA2, Sbm7] has an interpretation that' seven more septimal, [P1, Sbm3, Sbm7]. And {AcA2 -> Sbm3} looks like {75/64 -> 7/6} in frequency space, so that's attractive. Sbd10 tempers the same as the simpler AcM9, which is {56/25 -> 9/4}. And an octave down, Sbd3 goes to AcM2, which looks like {28/25 -> 9/8}.

These tempered substitutions look at a little suspicious to me:

    SbSb4 -> SbA3

    SbSbm6 -> SbA5

    SpGrM3 -> Grd4

    SpGr5 -> Grd6

I'll probably go through the frequency ratios and cent values for each substitution to see what's going on there / whether there are better options.

The more I look at this, the more I think that I should only use complexity of frequency ratios as my determining factor in choosing tempered interpretations.

The substitution SbAcm6 -> AcA5 is like {63/40 -> 405/256} which is suspicious for its increasing numerical complexity and for the fact that neither of those are simple intervals with standard harmonic functions relative to P1. Their cent values are 786 -> 794. Since Grm6, justly tuned to128/81, is a 3-limit interval with a standard harmonic function and its about as numerically simple as 63/40, I think that's the substitution I'm going to make instead. This is like tempering out the interval justly associated with (128/81) / (63/40) = 5120/5103, which is about 5 cents. This differs from SpA0 by a schisma, and I'd been seriously considering tempering out the schisma in addition to SpA0 in order to simplify interval names, so this is great.

...

So close. Three more intervals to decide about, and then I'll have septimal chords with simplified names, and I can go through and figure out if the simplified ones are more consonant. And then I can compare all the most consonant chords and decide which I like best among e.g.
    [P1, m3, Sbd5]
    [P1, m3, SpA4]
    [P1, m3, SpM6]

And pretty soon I'll have strong opinions about the best septimal chords. And then I can codify them with programmatic constraints and use them to compose and generate septimal music with really good harmony.

...

Here's a thought: if a chord is harmonious, then its inversions should be harmonious too. So if I can find any triad that is unambiguously nice and septimal, then I get two more triads for free that are nice and septimal. And if I have ratings for one chord, and four for another, and I find out that they're inversions of one another, then I've now got 8 ratings for the inversion family, which hopefully means greater precision or accuracy or something in my catalogue of how good these chords are.

...

Oh, super interesting. I was going through a new set of chords, giving them ratings. And I tried changing the instrument. And my ratings changed! Broadly, more chords sound consonant/harmonious/euphonious when played on a (software) clarinet ensemble than on a (software) set of guitar strings.

...

Here's are some summaries of a new round of ratings I did for a new batch of chords: Higher score mean greater consonance.

1.1666666666666667 : ('P1', 'M3', 'SpGr5')
1.1666666666666667 : ('P1', 'Sb5', 'M6')
1.1666666666666667 : ('P1', 'Sbd3', 'Grd7')
1.2 : ('P1', 'SpM3', 'Sbm7')
1.2857142857142858 : ('P1', 'SpM2', 'SpA5')
1.3333333333333333 : ('P1', 'P5', 'SpM6')
1.3333333333333333 : ('P1', 'Sbd3', 'Grm7')
1.4 : ('P1', 'SpM2', 'SpAcA4')
1.4285714285714286 : ('P1', 'GrM3', 'Sbm6')
1.4285714285714286 : ('P1', 'SbAc4', 'AcM6')
1.5 : ('P1', 'SbAcm6', 'm7')
1.5 : ('P1', 'SbGrd4', 'Grm6')
1.5 : ('P1', 'SpGrA5', 'SpA6')
1.5 : ('P1', 'SpM2', 'SpGr5')
1.5714285714285714 : ('P1', 'M2', 'Sbd5')
1.5714285714285714 : ('P1', 'SpM3', 'P5')
1.6 : ('P1', 'Sbm3', 'SbGrd6')
1.6 : ('P1', 'SpM3', 'SpAcA5')
1.6666666666666667 : ('P1', 'AcM3', 'SpM6')
1.6666666666666667 : ('P1', 'M3', 'Sbm7')
1.6666666666666667 : ('P1', 'M3', 'SpA6')
1.6666666666666667 : ('P1', 'Sbd4', 'Grd7')
1.6666666666666667 : ('P1', 'm3', 'SpGrm7')
1.7142857142857142 : ('P1', 'AcA2', 'SbAcM6')
1.7142857142857142 : ('P1', 'SbAc4', 'SbAcM6')
1.8 : ('P1', 'Sbm3', 'A5')
1.8 : ('P1', 'Sbm3', 'P4')
1.8 : ('P1', 'Sp5', 'SpGrM7')
1.8 : ('P1', 'SpA2', 'SpA10')
1.8 : ('P1', 'SpA3', 'SpGr5')
1.8 : ('P1', 'SpGrM3', 'SpGrm7')
1.8 : ('P1', 'SpGrm3', 'SpGrm7')
1.8 : ('P1', 'SpGrm3', 'm6')
1.8 : ('P1', 'SpSpM3', 'M6')
1.8 : ('P1', 'm3', 'Sbd5')
1.8333333333333333 : ('P1', 'A4', 'Sbm6')
1.8333333333333333 : ('P1', 'AcA4', 'Sbm7')
1.8333333333333333 : ('P1', 'Grd4', 'SpM6')
1.8333333333333333 : ('P1', 'Grm3', 'Sbd8')
1.8333333333333333 : ('P1', 'M3', 'SpGrA5')
1.8333333333333333 : ('P1', 'M3', 'SpM6')
1.8333333333333333 : ('P1', 'P4', 'Sbm7')
1.8333333333333333 : ('P1', 'P4', 'SpM6')
1.8333333333333333 : ('P1', 'SbA3', 'SbA5')
1.8333333333333333 : ('P1', 'Sp4', 'SpA5')
1.8333333333333333 : ('P1', 'SpA4', 'SpGrm7')
1.8333333333333333 : ('P1', 'SpM6', 'SpM13')
1.8571428571428572 : ('P1', 'Sbm3', 'A11')
1.8571428571428572 : ('P1', 'SpA2', 'SpM6')
2.0 : ('P1', 'AcM2', 'Sbd5')
2.0 : ('P1', 'AcM3', 'Sbm7')
2.0 : ('P1', 'Grd7', 'Sbd13')
2.0 : ('P1', 'Grm3', 'Sbm6')
2.0 : ('P1', 'M3', 'Sbm6')
2.0 : ('P1', 'Sb5', 'M7')
2.0 : ('P1', 'SbAcd4', 'd8')
2.0 : ('P1', 'SbGrM3', 'Grm6')
2.0 : ('P1', 'Sbm10', 'P11')
2.0 : ('P1', 'Sbm3', 'Grm7')
2.0 : ('P1', 'Sbm6', 'Sbm10')
2.0 : ('P1', 'SpA4', 'M6')
2.0 : ('P1', 'SpA4', 'SpGrA5')
2.0 : ('P1', 'SpA4', 'SpM6')
2.0 : ('P1', 'SpA4', 'SpM9')
2.0 : ('P1', 'SpA4', 'm6')
2.0 : ('P1', 'SpA5', 'SpM9')
2.0 : ('P1', 'SpGr4', 'Grm6')
2.0 : ('P1', 'SpGr5', 'M10')
2.0 : ('P1', 'SpGr5', 'P8')
2.0 : ('P1', 'SpGr5', 'SpM6')
2.0 : ('P1', 'SpGrM3', 'SpM6')
2.0 : ('P1', 'SpM3', 'SpA6')
2.0 : ('P1', 'SpM3', 'SpGrM7')
2.0 : ('P1', 'SpM3', 'SpGrm7')
2.0 : ('P1', 'd4', 'Sbd7')
2.0 : ('P1', 'm10', 'Sbd12')
2.0 : ('P1', 'm10', 'SpA11')
2.0 : ('P1', 'm3', 'Sbd7')
2.0 : ('P1', 'm3', 'SpM6')
2.0 : ('P1', 'm3', 'SpSp5')
2.142857142857143 : ('P1', 'Sbd6', 'Grm7')
2.142857142857143 : ('P1', 'Sbm3', 'P8')
2.142857142857143 : ('P1', 'Sbm6', 'M9')
2.142857142857143 : ('P1', 'SpGrA5', 'M10')
2.142857142857143 : ('P1', 'm3', 'SbAcm6')
2.1666666666666665 : ('P1', 'Grm3', 'Sbd13')
2.1666666666666665 : ('P1', 'M3', 'SpGrM7')
2.1666666666666665 : ('P1', 'SbAcd4', 'm7')
2.1666666666666665 : ('P1', 'Sbd5', 'M7')
2.1666666666666665 : ('P1', 'Sbd5', 'Sbd7')
2.1666666666666665 : ('P1', 'SpGr5', 'SpM9')
2.1666666666666665 : ('P1', 'SpM6', 'SpA9')
2.1666666666666665 : ('P1', 'm3', 'SpA4')
2.2 : ('P1', 'Sbm3', 'Gr5')
2.2 : ('P1', 'Sbm3', 'Sbd5')
2.2 : ('P1', 'Sbm3', 'Sbm6')
2.2 : ('P1', 'SpA10', 'SpM13')
2.2 : ('P1', 'SpA3', 'SpA9')
2.2 : ('P1', 'SpA4', 'SpA5')
2.2 : ('P1', 'SpA5', 'SpA11')
2.2 : ('P1', 'SpGr5', 'SpM10')
2.2 : ('P1', 'SpGrM3', 'SpA5')
2.2 : ('P1', 'SpGrM3', 'm6')
2.2 : ('P1', 'SpGrM7', 'M10')
2.2 : ('P1', 'SpM3', 'SpA5')
2.2 : ('P1', 'SpM3', 'SpGrA5')
2.2 : ('P1', 'SpSpM3', 'SpSpAcA5')
2.2 : ('P1', 'm3', 'SpA5')
2.2 : ('P1', 'm3', 'Spd6')
2.2857142857142856 : ('P1', 'M6', 'SpA9')
2.2857142857142856 : ('P1', 'SbAcd4', 'SbAcm6')
2.2857142857142856 : ('P1', 'SpA2', 'Grm6')
2.2857142857142856 : ('P1', 'SpA2', 'SpGrA5')
2.3333333333333335 : ('P1', 'AcA9', 'SbAcM13')
2.3333333333333335 : ('P1', 'Grm3', 'Sbm7')
2.3333333333333335 : ('P1', 'P5', 'Sbm10')
2.3333333333333335 : ('P1', 'SbAc4', 'A5')
2.3333333333333335 : ('P1', 'SbAcd4', 'Acm6')
2.4 : ('P1', 'Sbm3', 'P5')
2.4 : ('P1', 'Sbm3', 'Sbm7')
2.4 : ('P1', 'Sbm7', 'Sbm10')
2.4 : ('P1', 'Sp4', 'SpM6')
2.4 : ('P1', 'Sp4', 'm6')
2.4 : ('P1', 'SpA2', 'SpGr5')
2.4 : ('P1', 'SpA3', 'SpGrA5')
2.4 : ('P1', 'SpA9', 'SpA11')
2.4 : ('P1', 'SpGr5', 'SpA10')
2.4 : ('P1', 'SpM2', 'SpGr4')
2.4 : ('P1', 'SpM3', 'SpGr5')
2.4 : ('P1', 'SpM3', 'SpM6')
2.4 : ('P1', 'Spd4', 'M6')
2.4 : ('P1', 'd8', 'SbAcd11')
2.4 : ('P1', 'm7', 'SbAcd11')
2.4285714285714284 : ('P1', 'AcM6', 'SbAcd11')
2.4285714285714284 : ('P1', 'Grm3', 'Sbd6')
2.4285714285714284 : ('P1', 'Sbd4', 'Grm7')
2.5 : ('P1', 'AcM3', 'SbA5')
2.5 : ('P1', 'AcM3', 'Sbm6')
2.5 : ('P1', 'Gr5', 'Sbm10')
2.5 : ('P1', 'SbAcd4', 'AcM6')
2.5 : ('P1', 'SbAcd4', 'SbAcm13')
2.5 : ('P1', 'SbGrdd5', 'Grm6')
2.5 : ('P1', 'SbSbGrd4', 'Grm6')
2.5 : ('P1', 'Sbd5', 'M6')
2.5 : ('P1', 'SpGrA5', 'SpA9')
2.6 : ('P1', 'SpA3', 'SpM6')
2.6 : ('P1', 'SpA9', 'M13')
2.6 : ('P1', 'SpA9', 'SpA10')
2.6 : ('P1', 'SpGrM3', 'SpGr5')
2.6 : ('P1', 'Spd4', 'SpAcm6')
2.6666666666666665 : ('P1', 'A4', 'Sbm10')
2.6666666666666665 : ('P1', 'AcM3', 'SbAcm6')
2.6666666666666665 : ('P1', 'SbAcd4', 'P12')
2.6666666666666665 : ('P1', 'Sbd4', 'Grm6')
2.6666666666666665 : ('P1', 'Sbd4', 'm6')
2.7142857142857144 : ('P1', 'Sbd7', 'AcM9')
2.8 : ('P1', 'Sbm7', 'M10')
2.8 : ('P1', 'SpA2', 'SpAcAA4')
2.8 : ('P1', 'SpA3', 'M6')
2.8 : ('P1', 'SpA6', 'M10')
2.8 : ('P1', 'SpA6', 'P8')
2.8333333333333335 : ('P1', 'A5', 'Sbm10')
2.8333333333333335 : ('P1', 'AcM3', 'SbSbm6')
2.8333333333333335 : ('P1', 'Grm6', 'SpA9')
2.8333333333333335 : ('P1', 'Grm7', 'Sbd10')
2.8333333333333335 : ('P1', 'M6', 'SbAc11')
2.8333333333333335 : ('P1', 'SbAc4', 'M6')
2.8333333333333335 : ('P1', 'SbAcd11', 'AcM13')
2.8333333333333335 : ('P1', 'SbAcd4', 'AcM9')
2.8333333333333335 : ('P1', 'Sbd4', 'Sbd6')
2.857142857142857 : ('P1', 'AcM3', 'SpAcAA4')
2.857142857142857 : ('P1', 'P4', 'Sbm6')
2.857142857142857 : ('P1', 'SbAcd4', 'P5')
3.0 : ('P1', 'AcM3', 'Sbd7')
3.0 : ('P1', 'P4', 'Sbd7')
3.0 : ('P1', 'P5', 'SbAcd11')
3.0 : ('P1', 'SbGrdd5', 'Sbd7')
3.0 : ('P1', 'SbSb4', 'SbSbm6')
3.0 : ('P1', 'Sbd7', 'P8')
3.0 : ('P1', 'Sbm7', 'M13')

...

I had the idea of using some math I used to use for document retrieval and word clouds and things like that. Basically find out which internal intervals are more likely to be in good chords and which are more likely to be in bad chords. And make allowances that only one bad interval needs to appear for a chord to sound bad, whereas all of the intervals in a chord need to be good or okay for the whole thing to sound good or okay.

...

Okay! Good news and bad news. The good news is I think I'm almost done analyzing septimal harmony. The bad news is that I don't like septimal harmony and I'm probably just going to give up on it soon. I figured out what most most of the septimal chords with [1, 3, 5] or [1, 3, 6] or [1, 4, 6] intervals were - I looked at triads with intervals of lower ordinal than 7ths. Aaaaand .... they're all just 5-limit chords in disguise.

I'm pretty sure (P1, SpSpM3, SpSpAcA5) was just functioning as (P1, P4, M6) to my ear. This is an inversion of [P1, M3, P5], along with [P1, m3, m6].

And (P1, SbGrdd5, Grm6) was just functioning as (P1, P4, Grm6). This is an inversion of [P1, Grm3, P5] along with [P1, AcM3, AcM6].

These three
(P1, SpA2, Grm6)
(P1, SpA2, SpGrA5)
(P1, m3, SpSp5)
were all functioning as (P1, m3, Grm6). This one looks weirder as an inversion: [P1, AcM3, Ac5] in root position, and [P1, Gr4, M6] for the (1, 4, 6) option. Did you know that those sounded decent? Its news to me. I should add them as chords to my 5-limit just intonation composition suite.

These three 
(P1, AcM3, SpAcAA4)
(P1, SbAcd4, P5)
(P1, SpGrM3, SpGr5)
were all functioning as
(P1, AcM3, P5)
That's already in root position, but its inversions are [P1, P4, AcM6] and [P1, Grm3, Grm6] if you were curious.

This guy
(P1, SpA2, SpAcAA4),
was functioning as
(P1, m3, P5)
which has inversions of [P1, P4, m6]  and [P1, M3, M6].

And (P1, Sbm3, P5) is pretty much the only simple septimal triad that might have a unique sound to my ear, but its sound is pretty close to (P1, m3, P5) also, and not necessarily better than (P1, m3, P5). So what am I even doing here? Its inversions are [P1, P4, Sbm6] and [P1, SpM3, SpM6].

From those chord equivalences above, it seems my ear doesn't particularly notice any of these commas:

225/224 x5, "marvel"
126/125 x2, "starling"
19683/19600 x2, "cataharry"
245/243 x1, "sensamagic"
5120/5103 x1, "hemifamity"
64/63 x1, "Archytas"

I've got "x5" because there were 5 different intervals among the chords that differed from 5-limit ones by factors of 225/224 in their just tunings. That's 7-cents and I already knew that I have a little bit of a hard time choosing among intervals that differ by 22 cents, so no surprise here, but it's ...  it's a little disheartening to do so much math and coding and chord rating investigation, just to have it all be useless because I'm so tone deaf.

...

Anyway! We've got one root position septimal triad that might be worth using: [P1, Sbm3, P5]. And also there might be septimal intervals that are useful to put on top of triads, old and new. So septimal harmony might not be a total dud. But I need to stop looking at the whole chord space and start looking at like, "which seventh do I like best on top of  [P1, Sbm3, P5]". Or "what root positions triads work well with the harmonic seventh". And I think I'd like to know if there's any use for these intervals: [Sbm7, SpM7, Sbm9, SpM9, Sbm10, SpM10] which is noticeably different in sound/function from simple 5-limit intervals. Like if you flatten a minor interval by 36/35 instead of 81/80, or if you raise a major interval by 36/35 instead of sharpening it by 81/80, are the septimal intervals recognizably septimal in sound, or are they just close to Pythagorean intervals? My ear mostly ignored 225/224, not (36/35) / (81/80) = 64/63, and that guy is a whole 1200 * log_2(64/63) = 27 cents, so I should be able to hear it and make judgements about it. And hopefully I can find some harmonies that are both nice and recognizably septimal.

...

I already did some of that back in February of this year. 

...

Closed form expressions for matrix entries generated by iterative proportional fitting

Inspired by this.

If we start with a matrix [[1, 1], [1, 1]] and we perform iterative proportional fitting with real-valued non-zero growth factors [a, b], I've found that the equilibrium matrix has the form:

    [2a^2 / (a + b), 2ab / (a + b)]

    [2ab / (a + b), 2b^2 / (a + b)]

By growth factors, I mean the desired row and column sums are given by the original ones times those factors.

What if we have a different initial matrix?

If your initial matrix is all 5s instead of all 1s, then all the entries in the equilibrium matrix are 5 times larger.

If you scale the initial matrix columns by positive integers (m, n), then in the equilibrium matrix, the columns are scaled by (m, n). 

If you scale the initial rows by constants, you don't get anything like that though. Which is weird, because the iterative-proportional-fitting procedure is pretty symmetric between rows and columns. I guess in my code I take turns scaling rows (first) and columns (second) over and over, so that's one source of asymmetry.

Anyway, let's say we have an initial matrix [[m, m], [n, n]]. What's the equilibrium matrix for different growth factors (a, b)? Weirdly it only converges when the growth factors are equal, {a = b}. Otherwise, for example, the top left matrix entry alternates between two small rational values. When the growth factors are equal, the equilibrium matrix is the initial matrix scaled by the growth factor, i.e. [[am, am], [an, an]].

Okay, we've seen fully-constant initial matrices, and matrices with constant columns, and matrices with constant rows. Now for something spicier. Let's investigate a matrix that has all 1s except for the top left entry. Let's have a small change of notation: [a, b] no longer refer to growth factors. Instead our initial matrix is [[a, b], [c, d]], so that we can say {b=c=d=1}.

I've figured out symbolic expressions for the equilibrium matrix when we have growth factors [1/p, 1] for {p} a positive integer. I don't know of any reason why these formulas wouldn't work with {p} drawn from a more general classes of numbers, but I figured out the formulas using {p} over positive integers, and that's the only place where I've checked the formulas, and that's the only place where I'll assert their correctness now.

All the entries can be written as solutions of quadratic equations with leading terms {px^2} and rational coefficients. For given values of {a} and {p}, all the quadratic equations associated with the four entries of the equilibrium matrix have the same discriminant.

The top left entry of the equilibrium matrix is

    ((p + a^2 + a/2 - 1/2) - sqrt(D)) / (p(a - 1))

for discriminant

    D = p^2 + (2a^2 + a - 1)p + ((a+1)/2)^2

The anti-diagonal of the equilibrium matrix is constant. Both values are given by

    (-(p + (a+1)/2) + sqrt(D)) / (p(a -1))

The bottom right entry of the equilibrium matrix is

    ((2ap + a/2 - p + 1/2) - sqrt(D)) / (p(a - 1))

My method for figuring out these formulas mostly amounted to finding symbolic forms for entries of equilibrium matrices with defined {a} and {p}, and gradually noticing linear and quadratic patterns in constants, generalizing repeatedly from special cases. All pattern recognition, no proofs. But the formulas are correct. And if you can explain why, that'd be cool to see.

Next I'd like to try finding symbolic expressions for the equilibrium matrix terms when we have independent growth rates, or perhaps when we have non-unitary values for both {a} and {d} in the initial matrix, but those sound pretty hard, and I'm just going to savor the accomplishment of finding the above formulas for a while.

Oh! I can figure out growth rates [1, 1/p] instead of [1/p, 1]. That sounds like a manageable challenge. Please hold!

...

For growth rates [1, 1/p] and initial matrix [[a, 1], [1, 1]], IPF gives us an equilibrium matrix with top left entry

    ((a^2 + a/2 - 1/2)p + 1 - sqrt(D)) / ((a - 1)p)

for discriminant 

    D = ((a + 1)/2)^2 p^2 + (2a^2 + a - 1) p + 1

The antidiagonal is constant, and both values are given by

    (-1 * (((a + 1)/2)p + 1) + sqrt(D)) / ((a - 1)p)

and the bottom right entry of the equilibrium matrix is
    (p(a + 1)/2 + (2a - 1) - sqrt(D)) / ((a - 1)p)

Nice.

I just checked, and these formulas still work if your second growth rate isn't the reciprocal of an integer. You can use a growth rates of [1, 6/1] or [1, 5/8] or whatever. Just set {p} equal to the reciprocal of your second growth rate and they'll still predict correctly. And the case is likewise the set of formulas before these, for growth rates [1/p, 1]. You can use positive reals in the first slot, just set {p} to the reciprocal of the first growth rate.

...

I want to take small steps to generalize from here. I'm thinking that I could either look at initial matrices of the form [[a, 1], [1, a]] or I could look at growth rates {c * [1/p, 1]} and {c * [1, 1/p]}. And then eventually I'll get to independent diagonal values and independent growth rates. Or maybe that's already equivalent to independent growth rates? Because two real numbers will be related by a multiplicative constant {c}, namely their ratio. And {p} will be the inverse of one of them. I think that might be everything. Welp.

Let's start with an initial matrix of the form [[a, 1], [1, a]] and growth factors [1/p, 1], for {p} a positive integer. I fully expect that the formulas will continue to generalize to {1/p} being any positive real number.

For a=3, the discriminant term of entries in the equilibrium matrices has the form
D = p^2 + 34p + 1

The top left entry is given by 
    (p + 17 - sqrt(D)) / 4p

The anti-diagonal is constant with both values given by
    (-p  - 1 + sqrt(D)) / 4p

And the bottom right entry is given by
    (17p + 1 - sqrt(D)) / 4p

.

For a = 5, my first guess was that the discriminant was
    D = 1/4 p^2 + 49/2 p + 1/4

but that looks a little funny, and you can move a constant between the discriminant and the rest of the expression. So let's also consider four times the previous expression: 
    D = p^2 + 98p + 1

If we use that 4x discriminant, then the upper left entry of the equilibrium matrix has the form
    (p + 49 - sqrt(D)) / 8p

which isn't so bad. Let's stick with this discriminant. The anti-diagonal is constant, with values of the form
    (-p + -1 + sqrt(D)) / 8p

and the bottom right entry looks like
     (49p + 1 - sqrt(D)) / 8p

Smashing. Let's do {a = 7} and then we'll guess and check the full form for general {a} and then move on to something more challenging.

For {a = 7}, the discriminant term in the equilibrium matrix entries is
    D = p^2 + 194p + 1

The top left entry is
    (p + 97 - sqrt(D)) / 12p

the anti-diagonal is
    (-p - 1 + sqrt(D)) / 12p

and the bottom right entry is
    (97p + 1 - sqrt(D)) / 12p
.

So, generalizing over a=(3, 5, 7), it looks like the general discriminant term of the equilibrium matrix entries generated by IPF from a starting matrix [[a, 1], [1, a]] and growth factors [1/p, 1] is:

    p^2 + (4a^2 - 2)p + 1

We'll check that of course, but I've heard of crazier things.

The top left entry generalized to depend on {a} looks like
    (p + (2a^2 - 1) - sqrt(D)) / (2(a - 1)p)

The anti-diagonal is
    (-p - 1 + sqrt(D)) / (2(a - 1)p)

and the bottom right entry is
    ((2a^2 - 1)p + 1 - sqrt(D)) / (2(a - 1)p)

...

I had the thought that if I do analyze initial matrix 
    [[a, 1], [1, a]]
and the
    [[a, 1], [1, 2a]]
and then
    [[a, 1], [1, 3a]]
and maybe a few more, then I could try to generalize over those formulas and hopefully get a formula that's free in the coefficient in front of {a} on the bottom left, and then if that generalizes past the positive integers, then I've basically got independent upper-left and bottom-right entries. And then hopefully the simple patterns continue where you can multiply columns or rows by constants. And then we've got the whole damn thing solved. For one growth factor at least.

I'm starting to think that this problem is too boring to solve.

...
 
Maybe I can power through it. Just do 5 minutes a day.


Let's work on the case of initial matrix [[a, 1], [1, 2a]], growth rates [1/p, 1].

For a = 3, the discriminant term is
    D = ?
The top left entry is 
(p + ? - sqrt(D)) / (?p)

The antidiagonal is constant with value 
(-(p + 1) + sqrt(D)) / (?p)

The bottom right entry is 
(?p + ? - sqrt(D)) / (?p)

...

Tertian names for augmented sixth chords

Here are the rank-2 intervallic names for the three famous augmented sixth chords of classical music:

     [P1, M3, A6] # Italian augmented sixth chord

[P1, M3, A4, A6] # French augmented sixth chord 

[P1, M3, P5, A6] # German augmented sixth chord

They're traditionally rooted a major third below the tonic, where they have a subdominant (or predominant) function. So for example, in they key of C major these would be spelled in pitch classes as

    [Ab, C, F#] # Italian

    [Ab, C, D, F#] # French

    [Ab, C, Eb, F#] # German

When we spell chords intervallically in the tertian way, we interpret 6th intervals as 13th intervals (i.e. the augmented sixth interval, A6, is octave-displaced to give an augmented thirteenth interval, A13). The tertian names for these chords in C major are then:

    Ab.maj#13(no 5) # Italian

    Ab.maj#11#13(no 5) # French

    Ab.maj#13 # German

The French one can also be called D.7b5 with its fifth in the bass.

If we allow 12-TET enharmonic spellings, the Italian augmented 6 chord in C major has many names including: [C.aug#11b13(no 3), C.aug#11(no 3), C.dim#11b13(no 3), C.dimb13(no 3), F#.dim(add9)#11(no 3), F#.dim(add9)(no 3), Ab.7(no 5)]

If we allow 12-TET enharmonic spellings, the Italian augmented 6 chord in C major has names including [C.aug(add9)#11b13(no 3), C.aug(add9)#11(no 3), C.dim(add9)#11b13(no 3), C.dim(add9)b13(no 3), D.7b5, D.7b5#11, D.7#11(no 5), D.maj#11#13(no 5), F#.aug(add9)#11b13(no 3), F#.aug(add9)#11(no 3), F#.dim(add9)#11b13(no 3), F#.dim(add9)b13(no 3), Ab.7b5, Ab.7b5#11, Ab.7#11(no 5)]

And the German augmented 6th chord has names including [C.m#5#11, C.m#5#11b13, C.m#5#9#11, C.m#5#9#11b13, C.dimb13, C.dim#11b13, C.dim#9b13, C.dim#9#11b13, C.aug#9#11b13(no 3), C.aug#9#11(no 3), C.dim#9#11b13(no 3), C.dim#9b13(no 3), C.m#11b13(no 5), C.m#9#11b13(no 5), Eb.m#9(add11)(add13)(no 5), Eb.m(add11)(add13)(no 5), F#.dim(add9)#11(add13)(no 3), F#.dim(add9)(add13)(no 3), F#.dim13#11(no 3), F#.dim9#11(no 3), F#.dim9(add13)(no 3), F#.dim9(no 3), Ab.7].

The shortest of those are:

    Ab.7(no 5) # enharmonically Italian

    D.7b5 : # French, exactly but respelled

    Ab.7: # enharmonically German

and these enharmonic respellings just rely on the fact that the intervals A6 and m7 are separated by d2, which is tempered out in 12-TET.

You might wonder if these are superior chords to use. Does the traditional German augmented sixth chord, Ab.maj#13, really sound better than Ab.7 when used subdominantly in C major? I don't know. We'll have to listen to both later on and come to some conclusions.

I will say that Ab.7 is also used extensively as a pre-dominant chord: it's the secondary dominant of Db.7, which is the "tritone substitution" for G.7. Although the notion of tritone substitution also relies enharmonic equivalence, so this isn't as pure a relationship as it sounds at first. Let's compare G.7 and Db.7:

    G.7: [G, B, D, F]

    Db.7: [Db, F, Ab, Cb]

The F is retained exactly from one chord to another. The B of G.7 and the Cb of Db.7 are tuned the same in 12-TET and other tuning systems that temper out the diminished second. And that's enough connection for jazz theorists.

So an enharmonic spelling (Ab.7) of the German augmented sixth chord (Ab.maj#13) has an exact relationship with the tritone substitution (Db.7) of G.7, but tritone substitution is itself an enharmonic relationship, and so it's not obvious that this version of the German chord has a clearer / stronger / purer functional relationship to chords in C major than does the original.

...

Fluent Chord Transitions And (T, S, D) Assignments

You can take a C major chord in SATB voicing and look at the fluent melodic continuations for each voice, and find all the chords that can be made from options in each voice. If we allow ourselves a very limited set of chord qualities, we still get at least this large set of fluent chordal continuations to C major: 

    C.maj -> [A.7, A.dim, A.m, A.m7, A.m7b5, A.maj, A.maj7, Ab.7, Ab.dim, Ab.m, Ab.m7, Ab.m7b5, Ab.maj7, B.7, B.dim, B.m, B.m7, B.m7b5, B.maj, B.maj7, Bb.7, Bb.dim, Bb.m, Bb.m7, Bb.m7b5, Bb.maj, Bb.maj7, C.7, C.dim, C.m, C.m7, C.m7b5, C.maj, C.maj7, D.7, D.dim, D.m, D.m7, D.m7b5, D.maj, D.maj7, Db.7, Db.dim, Db.m, Db.m7, Db.m7b5, Db.maj, Db.maj7, E.7, E.dim, E.m, E.m7, E.m7b5, E.maj, E.maj7, Eb.7, Eb.dim, Eb.m, Eb.m7, Eb.m7b5, Eb.maj, Eb.maj7, F#.7, F#.dim, F#.m, F#.m7, F#.m7b5, F#.maj, F#.maj7, F.7, F.dim, F.m, F.m7, F.m7b5, F.maj, F.maj7, G#.dim, G#.m, G#.maj, G#.maj7, G.7, G.dim, G.m, G.m7, G.m7b5, G.maj, G.maj7]

How should we chose among them, and others, in selecting chord progressions?

You might say "chord progressions have the form "tonic -> subdominant -> dominant", and try categorizing all of the chordal continuations as one of the three. I don't know how to do that. If you do, please let me know.

You  might declare a C major key for the song and disregard any chords that aren't in C major, and then classify the remainder as (T, S, or D). Well, composers don't stick to a key. That would suck. But let's do it anyway and see if we can expand. We're left with these chords:
C.maj: T
C.maj7: T
D.m: S
D.m7: S
E.m: T or D
E.m7: T or D
F.maj: S
F.maj7: S
G.7: D
G.maj: D
A.m: T
A.m7: T
B.dim: D
B.m7b5: D

I have their functions relative to C major written in  with one-letter abbreviations. These functional categorizations are fairly canonical in the literature. They probably come from Schenkerian analysis, but I always get bored reading Schenkerian analysis texts and give up. These functional categorizations don't work as well in A minor, but maybe they're close enough? Maybe. E.m chords are a little vague functionally: I think E.m by itself leans a little tonic (like a rootless C.maj7) and E.m7 leans a little dominant (since Em7b9 is a respelling of G7(add13)), but those tendencies are not strong enough to put into code.

User Taxtengo on reddit suggests that if the next chord after the E.m has a tonic function, then you can categorize the E.m as dominant, and in all other cases the E.m has a tonic function. I've heard worse ideas.

Perhaps while you're on the Tonic section of the progression, you can play different tonic chords, and when you're in the subdominant section, you can play multiple different subdominant chords.

Next let's try giving functional names to modal mixture chords, i.e. chords from the key of C minor. And we'll assume that the functional categorizations we derive from C minor's relative major scale, Eb major, work for C minor. We'll just transpose our (T, S, D) function up by a minor third:

Eb.maj: T
Eb.maj7: T
F.m: S
F.m7: S
G.m: T or D
G.m7: T or D
Ab.maj: S
Ab.maj7: S
Bb.7: D
Bb.maj: D
C.m: T
C.m7: T
D.dim: D
D.m7b5: D

And perhaps now we just pretend that all of these functions work in the key of C major.

We haven't given any inconsistent functional assignments to chords yet. So maybe that's good. Here's the full set alphabetized:

C.m7: T
C.m: T
C.maj7: T
C.maj: T
D.dim: D
D.m7: S
D.m7b5: D
D.m: S
E.m7: T or D
E.m: T or D
Eb.maj7: T
Eb.maj: T
F.m7: S
F.m: S
F.maj7: S
F.maj: S
G.7: D
G.m7: T or D
G.m: T or D
G.maj: D
A.m7: T
A.m: T
Ab.maj7: S
Ab.maj: S
B.dim: D
B.m7b5: D
Bb.7: D
Bb.maj: D

.
Here are some fluent chordal continuations of C major that we have not yet given functional assignments: [A.7, A.dim, A.m7b5, A.maj, A.maj7, Ab.7, Ab.dim, Ab.m, Ab.m7, Ab.m7b5, B.7, B.m, B.m7, B.maj, B.maj7, Bb.dim, Bb.m, Bb.m7, Bb.m7b5, Bb.maj7, C.7, C.dim, C.m7b5, D.7, D.maj, D.maj7, Db.7, Db.dim, Db.m, Db.m7, Db.m7b5, Db.maj, Db.maj7, E.7, E.dim, E.m7b5, E.maj, E.maj7, Eb.7, Eb.dim, Eb.m, Eb.m7, Eb.m7b5, F#.7, F#.dim, F#.m, F#.m7, F#.m7b5, F#.maj, F#.maj7, F.7, F.dim, F.m7b5, G#.dim, G#.m, G#.maj, G#.maj7, G.dim, G.m7b5, G.maj7]

Perhaps my notion of melodic fluency is too lax? I know I never stated it. It was something like the melodic interval has to be in [P1, m2, M2, m3, M3, P4, P5] or the inverse of one of those. Actually a five-limit generalization of that, but I'm trying to hide the microtonality of my programs for a moment, because this post should be accessible to lots of people. If I restrict my fluent melodic transitions to be in the set [P1, M2, M3, P4, P5] or its inverse, that doesn't make any sense, but nothing in this post does, so let's keep going and see what happens. Our new fluent chordal continuations with simple names are
    C.maj -> [A.7, A.dim, A.m, A.m7, A.m7b5, A.maj, A.maj7, Ab.7, Ab.dim, Ab.m, Ab.m7, Ab.m7b5, Ab.maj7, B.7, B.dim, B.m, B.m7, B.m7b5, B.maj, B.maj7, Bb.7, Bb.dim, Bb.m, Bb.m7, Bb.m7b5, Bb.maj, Bb.maj7, C.7, C.dim, C.m, C.m7, C.m7b5, C.maj, C.maj7, D.7, D.dim, D.m, D.m7, D.m7b5, D.maj, D.maj7, Db.7, Db.dim, Db.m, Db.m7, Db.m7b5, Db.maj, Db.maj7, E.7, E.dim, E.m, E.m7, E.m7b5, E.maj, E.maj7, Eb.7, Eb.dim, Eb.m, Eb.m7, Eb.m7b5, Eb.maj, Eb.maj7, F#.7, F#.dim, F#.m, F#.m7, F#.m7b5, F#.maj, F#.maj7, F.7, F.dim, F.m, F.m7, F.m7b5, F.maj, F.maj7, G#.dim, G#.m, G#.maj, G#.maj7, G.7, G.dim, G.m, G.m7, G.m7b5, G.maj, G.maj7]

We're still missing functional categorizations for: [A.7, A.dim, A.m7b5, A.maj, A.maj7, Ab.7, Ab.dim, Ab.m, Ab.m7, Ab.m7b5, B.7, B.m, B.m7, B.maj, B.maj7, Bb.dim, Bb.m, Bb.m7, Bb.m7b5, Bb.maj7, C.7, C.dim, C.m7b5, D.7, D.maj, D.maj7, Db.7, Db.dim, Db.m, Db.m7, Db.m7b5, Db.maj, Db.maj7, E.7, E.dim, E.m7b5, E.maj, E.maj7, Eb.7, Eb.dim, Eb.m, Eb.m7, Eb.m7b5, F#.7, F#.dim, F#.m, F#.m7, F#.m7b5, F#.maj, F#.maj7, F.7, F.dim, F.m7b5, G#.dim, G#.m, G#.maj, G#.maj7, G.dim, G.m7b5, G.maj7]

And maybe that's fine. Maybe the set that was functionally categorization in C major and C minor is enough for composing, and we should limit ourselves to it, and other chords only show up in modulations or in analysis of passing suspensions or whatever.

I think we can do better. I'm not sure how though. Perhaps we could look at the chord tones in those unclassified chords and see if they have more overlap with tonic chords or subdominant chords or dominant chords. And if they don't have shared chord tones? Then we'll keep thinking. I kind of doubt that this will work. Like this way of generalizing probably wouldn't have given us C.minor functions from the C.major functions. So why should C.minor + C.major functions extend to other chord fields? But I'm not sure and it would be interesting to see the results.

I really like augmented chords, but I don't really know how to use them in chord progressions other than "do fluent chordal transitions", which is usually enough for me honestly, but I think other people might look down on me for making chordal music without any kind of theory of chord progressions version retrogressions versus unconstrained wandering. Part of the reason for this post is so that I can write progressions with augmented chords and be able to tell people a sense in which those progressions do progress.

All of the .maj chords and .7 chords and .m7b5 chords can be said to have "secondary" dominant functions in other keys. Maybe we're only allowed to use chords like F#.maj in C major as parts of functional progressions if we complete the advancement to the secondary tonic. Like "E.maj F#.maj B.maj" is a fine IV V I progression in B.maj. And B.maj is like a V or E.m, which has a tonic function in C major, so 
    "C.maj -> E.maj -> F#.maj -> B.maj -> E.m"

is a functional progression when we include the concept of tonicization, if not necessarily a good one.

So if you follow C.maj with an E.maj, you might be committing yourself to kind of a stupidly long resolution pathway (not necessarily the one listed above).

But still none of this gets us progressions with augmented chords.

So here's the next idea: passing chords. Start with a functional progression. Now insert chords between the functional chords that are fluent continuations. You're allowed, oh, at least one non-functional chord between each pair of functional chords, yeah? Maybe there are or should be rules on how many passing chords you place between functional chords. But one should be okay at least.

And I think I believe in passing chords more than most of the rest of this post. I don't know if progressions in the key of A minor can use the same function assignments as progressions in the key of C major, and I don't know if we can transplant function assignments from the key of Eb major to C major, and I don't know how much temporary tonicization you can use functionally in a way that listeners will pick up on and approve of, but passing chords between functional chords are good shit, and I don't think I care if they are introduced as suspensions that are prepared in consonance and are resolved downward, or if, when the passing chords have tritones, those tritones are resolves by melodic intervals of semitones, or much else. On small timescales in music, you should be pretty free to do fluid things, and the structure of progressions can operate at larger time scales. Maybe. Or at least you can do fluid things within the chords field of "chords that are fluent from your starting chord". You should be allowed to monkey around in that submanifold so long as your wandering has some direction in broad strokes, I think.

I'll do some programming and let you know how it sounds. But it might look like this functionally: [T, ?, S, ?, D, ?, T]. And it'll probably have modal mixture. And it might even have multiple chords of one functional type, themselves potentially separated by a passing chords, before progressing to another functional type. And I might even do [T, S, T] sometimes, because there's nothing wrong with a little retrogression now and then. It can be down right idiomatic.

And now I can allow myself to use whatever stupid chords I want, like .aug-maj7b13(no 3), so long as I follow the logic/conventions of this post. And so long as I like the results of doing that.

To summarize: Find a voiced starting chord for a song (or for an 8 bar phrase or something). By voiced I mean that we have a vertical realization - all the pitches specified, not just pitch classes. Next find a space of chords that are fluent continuations from this phrasal starting chord. This space will potentially be huge if you have allow lots of chord types or if you have a lax notion of fluent melodic continuation. That's fine. Find chord progressions using this chord space that are fluent between each member and which loop back to the phrasal start chord. Fluent continuation and good harmony are most of what you  need for good music, but having the chords be fluent with the phrasal start adds a little coherence hopefully - a weak form of coherence that allows for modal mixture and weird augmented chords and things, but still some coherence. In particular, find looping chord progressions that have Tonic chords followed by Subdominant chords followed by Dominant chords - for some assignments of those functions to the diatonic triads and tetrads of a key, and perhaps also assignments for the parallel key. They don't have to be the ones I listed above: listen to how you like to use the chords and see how they function for you. In the past I starting outlining a chord grammar that included modal mixture incorporations rules: [A Chord Grammar]. That one was actually based on what sounded good to my ear. I should revisit it and see if it accords with the T, S, D assignments in this post. My guess is not: I recall using modal mixture chords more like passing chords. But it's worth reviewing. Anyway, once you have "T -> S -> D -> T" chord progressions, where all the chords are fluent with each other and with the starting chord of the phrase, then you can try inserting passing chords between the functional ones - still requiring that the passing chords are fluent between the previous chord and the following chord, and that they are fluent with the phrasal start. I think I also accept "T -> D -> T" and "T -> S -> T" as grammatical. Yeah.

This might sound like a lot of computing. It is a lot of computing. But I just have to code it once and then the computer will do it for me. And then I can say whether an arbitrary chord progression is grammatical in some sense. And maybe I don't also have to require grammatical well-formedness in my pieces. But I was missing a notion of it when composing with crazy chords in 5-limit just intonation. And this feels good. I'm glad I have sketched out some structure that I can impose on my songs, which is both weak enough to allow very free music, while being grounded in obvious concepts like "relate your chords to the tonic" and "use (subdominant, dominant, tonic) progressions" and "you should be able to use some pretty crazy passing chords without having to assign any other phrasal grammatical chord function to them besides Passing Chord."

Suppose you have a Subdominant chord and a tonic chord,

    S -> T

and you're curious what you can insert between them and still be grammatical. Well, you can do S, and that's just a longer subdominant section. You can do T, and that's a longer tonic section. You can do D, and that's the familiar (S -> D -> T) progression. And you can do a passing chord. So basically anything. It's a pretty lax system. I think the functional assignments that I made in this post to modal mixture chords are consistent with the modal mixture chord grammar in the previous post, but honestly because of the laxity of the rules in this post, that doesn't actually express much concord: it's more like "this vague system can interpret any chord sequence, including the ones that I previous said that I liked". Not quite that bad, but almost that bad. Let's see an example. Below are some rules I had introducing for expanding chord progressions that including an F.m:

(C -> F.m) => (C -> Bb -> F.m) // (T -> S) => (T -> S -> S) 
(C -> F.m) => (C -> F -> F.m)  // (T -> S) => (T -> S -> S)
(C -> F.m) => (C -> Eb -> F.m) // (T -> S) => (T -> T -> S)
(C -> F.m) => (C -> D.m -> F.m)// (T -> S) => (T -> S -> S)
(F -> C) => (F -> F.m -> C)    // (S -> T) => (S -> S -> T)
(F -> Eb) => (F -> F.m -> Eb)  // (S -> T) => (S -> S -> T)
(F.m -> C) => (F.m -> G -> C)  // (S -> T) => (S -> D -> T)

The bottom rule changes an (S -> T) progression into (S -> D -> T). All of the other rules can be interpreted as prolonging the tonic section or prolonging the subdominant section of an (S -> T) or (T -> S) progression.

I'm mostly okay with this. It's a little unfortunate that the ideas in this post don't distinguish between (F -> F.m) and (F.m -> F), since I had a strong preference for the former in the modal mixture grammar post. I'll keep thinking about it. Maybe I should think of some constraints on prolongations of a functional section. Like [C.m7, C.m, C.maj7, C.maj, E.m7, E.m, Eb.maj7, Eb.maj, G.m7, G.m, A.m7, A.m] might all have tonic functions, but that doesn't mean you can endlessly flop between those guys in a random sequence, even with fluent transitions between each flop.

I think G.m probably doesn't have a tonic function. I'd say that E.m in C major has a kind of vague function that's somewhat tonic and somewhat dominant, and that G.m gets the same treatment in the key of Eb major, and it's correct to say that it's vague in that way in the key of Eb major, but not that it functions the same way in the relative minor key of C minor. E.m is more clearly dominant than tonic in the key of A minor and G.m is more clearly dominant than tonic in the key of C minor. So G.m should also be called dominant in C major. But mostly you just don't use it, since G.maj is a much stronger dominant.

I haven't talked about it, but I think higher extensions beyond 7 should come for free. You can add on 9, 11, 13 without changing the function. Also if you have "no 3" or "no 5", you should be able to remove those and treat the chord as whatever is listed without that. I wrote a little program to remove those higher extensions and lacunae from my tertian chord name dictionary, and the program says that all the chords in the dict can be simplified down to one of these: [.aug, .aug-maj7, .aug7, .maj, .maj7, .7, .majb5, .maj7b5, .7b5, .m#5, .m-maj7#5, .m7#5, .m, .m-maj7, .m7, .dim, .dim-maj7, .dim7, .m7b5, .5]. Those are all of the dyads, triads, and tetrads that I want my programs to consider when judging the grammaticality of chord sequences.

Another squiggle in the theory: E.maj and E.7 have a dominant function if they resolve to A.m or A.m7. I don't know how to judge whether it's resolving to to those except to check whether (A.m | A.m7) is the next chord or the next-next chord after a passing chord. But maybe that's enough.

Another squiggle: If a chord has a defined function relative to the key of C major, then it shouldn't be called a passing chord. Passing chords should let you bring weird chords into sequences and only weird chords. It's only after you have tried naming all the chords by their functions that you can start naming chords as passing chords.

Final squiggle: A sequence of grammatical transitions should also be called grammatical. So if "T S T" and "T S D T" are both grammatical, then we should also say that "T S T T S D T" is grammatical.

I think the next thing I want to do is look at some looping SATB chord sequences of 4 or 8 chords in length and say whether they're SDT grammatical forward, backward, both, or neither. I've got code written up for almost everything in this post. I'm really close to have voiced chord sequences that are 
    * looping, (which is useful both for structured repetition and for gluing sequences together: if two chords loop and have the same starting chord, then you can put them together and have a longer loop)
    * fluent between sequential chords, 
    * fluent with the root chord (which I hope will lend at least a weak sense of tonal center even while we're using non-diatonic chords)
    * grammatically progressive
    * with allowances for grammatical modal interchange and a huge space of non-diatonic passing chords

Sounds great, right? I'm so close.

Here's a progressions that grammatical in both directions:

    [C.maj, F.m, F.maj, A.m, F.m, D.aug, C.maj] [T, S, S, T, S, p, T]
    [C.maj, D.aug, F.m, A.m, F.maj, F.m, C.maj] [T, p, S, T, S, S, T]

Though I like the F.maj -> F.m transition a lot more than its inverse and would only use the second one. After playing this on a piano, it doesn't sound great. Oops.

I decided that I would require passing chords to have tighter melodic transitions that other chords. When I did that, I found this palindrome:

    [A.m, Db.aug, F.maj7, D.aug(no 3), A.m] [T, p, S, p, T]
    [A.m, D.aug(no 3), F.maj7, Db.aug, A.m] [T, p, S, p, T]

Not that I'm looking for palindromes. This one is nothing special, but I think I'm moving in the right direction. Also, I think I'm now okay with multiple passing chords in a row. If you have fluid transitions between all your chords, and all your chords are fluid departures from the phrasal start, and your passing chords are entered and exited by very small melodic intervals, and the functional chords of your progression are grammatical, then that should be enough. I hope.

...

Woo! I enforced tight transitions between all chords, not just passing chords, and I got some nice things. 


[[P1, P5, M10, P15], [M2, P5, M13, P18], [P1, P5, M10, m17], [P1, P5, AcM9, m14]] [C.maj, D.m(add11), C.maj#9, G.m(add11)] [T, S, T, T]
[[P1, P5, M10, P15], [P1, M6, A11, P18], [P1, M6, M10, P19], [m-1, M7, AcM9, P19]] [C.maj, F.majb9, A.m7, G.majb9] [T, S, T, D]
[[P1, P5, M10, P15], [P1, M6, AcM9, P18], [m0, P5, AcM9, P18], [P1, P5, M10, P15]] [C.maj, D+.m7, G.m7, C.maj] [T, S, D, T]
[[P1, P5, M10, P15], [P1, M6, M10, P18], [M2, M6, M10, m16], [M2, M7, M10, P18]] [C.maj, F.maj7, A.maj(add11), B.dim(add11)] [T, S, p, D]
[[P1, P5, M10, P15], [P1, M6, M10, P18], [P1, M6, M10, m16], [P1, M7, AcM9, P18]] [C.maj, F.maj7, A.maj#9, B.dimb9] [T, S, p, D]
[[P1, P5, M10, P15], [P1, M6, M10, P18], [m0, P5, AcM9, m17], [m0, P5, M10, m17]] [C.maj, F.maj7, G.mb13, Eb.majb9] [T, S, D, T]
[[P1, P5, M10, P15], [P1, P5, A12, P18], [P1, AcM9, A12, P18], [m0, AcM9, A12, P19]] [C.maj, F.m(add9), D+.m7b5, G.mb9] [T, S, D, T]
[[P1, P5, M10, P15], [P1, P5, AcM9, m14], [P1, P5, M10, m17], [M2, P5, M13, P18]] [C.maj, G.m(add11), C.maj#9, D.m(add11)] [T, D, T, S]
[[P1, P5, M10, P15], [P1, P5, M10, P15], [m0, P5, AcM9, P18], [P1, M6, AcM9, P18]] [C.maj, C.maj, G.m7, D+.m7] [T, T, T, S]
[[P1, P5, M10, P15], [P4, M6, M10, M16], [m3, M7, A11, M17], [P4, M7, A12, M16]] [C.maj, D.m(add9), B.maj(add11), D.dim(add13)] [T, S, p, D]
[[P1, P5, M10, P15], [P4, M6, M10, P15], [P5, M7, AcM9, m14], [P5, M7, M10, m14]] [C.maj, F.maj7, G.maj#9, E.m#11] [T, S, D, T]
[[P1, P5, M10, P15], [P4, P5, AcM9, m14], [P4, M6, AcM9, P15], [P5, M7, AcM9, P15]] [C.maj, G.m7, D+.m7, G.maj(add11)] [T, T, S, D]
[[P1, P5, M10, P15], [m-1, M7, AcM9, P19], [P1, M6, M10, P19], [P1, M6, A11, P18]] [C.maj, G.majb9, A.m7, F.majb9] [T, D, T, S]
[[P1, P5, M10, P15], [m0, P5, AcM9, M16], [m-1, M7, AcM9, M16], [P1, M6, M10, M16]] [C.maj, D+.m, D+.dim, A.m(add11)] [T, S, D, T]
[[P1, P5, M10, P15], [m0, P5, M10, m17], [m0, P5, AcM9, m17], [P1, M6, M10, P18]] [C.maj, Eb.majb9, G.mb13, F.maj7] [T, T, T, S]

The chord names are approximate: they ignore d2 and Ac1 except in the name of the tonic. The harmonies are also approximate. But they're cool! 

There are not as many passing chords as I excepted, but I'll figure that out in time. Here are the ones that showed up:

    [F.maj7, A.maj(add11), B.dim(add11)] // [S, p, D]
    [F.maj7, A.maj#9, B.dimb9] // [S, p, D]
    [D.m(add9), B.maj(add11), D.dim(add13)] // [S, p, D]

I've got a few progressions in there that treat the G.m chord as being functional in C major. Oops. Guess I forgot to remove a rule in my code. But the progressions still sound great. I'm pretty excited to put counterpoint over this.

I was hoping that once I had weird chord progressions with jazzy extensions, that I could make something Romantic. But when I try to play a waltz figure with these chords and run some melodic lines on top, it sounds terrible using my virtual piano synth. Maybe I need to voice my chords in a piano-like way instead of a chorale/SATB -like way. And maybe I need a better virtual piano synth. And maybe my melodic lines need some work. And maybe there are other problems. But there are also solutions, and I'll find them.

My program hates putting G.7 into chord sequences starting on C.maj. Possibly that's because I tried requiring tight transitions between all the chords? And it takes a few tight transitions to get from C.maj to G.7, even though they're connected by fluent motion? 

Probably not. I tried longer chord sequences and I still rarely get G.7 chords.

I even cheated and asked the program to include chords that were fluent with either C.maj or G.7. But after generating a few hundred of those, I only got one sequence with a G.7 in it. 

There are tons of G.maj(add 11)s though? Hm....
...

I think I've got it. And it's a pretty hard problem to get around actually. Suppose you learned rank-2 spellings for chords like that the dominant 7 is 

    ".7": [P1, M3, P5, m7],

And then you learn about 5-limit just intonation and you want to write cool 5-limit music. You can be pretty sure that the rank-3 spelling of .7 will have the same A1 and d2 components as the rank-2 spelling, but the Ac1 components of all the intervals are a little mysterious.

I think there are decent arguments for any of these rank-3 spellings:

    #.7 = [P1, M3, P5, m7]
    #.7 = [P1, M3, P5, Grm7]
    #.7 = [P1, M3, Gr5, Grm7]

And probably some others. At some point you have to sit down and listen to dozens of version of the chord back to back and figure out what your ear likes. I've done that with some chord types, but not all of them, and my chord dict doesn't include the data that I've generated even for those chord types.

I tried putting the second one in my dict instead of the first one. It didn't make much difference. I tried finding some SATB voicings of G.7 that are also fluent with this voicing of C.maj:
    C.maj = [P1, P5, M10, P15] # [C, G, E, C]

and I got these:

    G7 = [P5, AcM9, P11, M14] # [G, D+, F, B]
    G7 = [AcM2, P5, P11, M14] # [D+, G, F, B]
    G7 = [M0, AcM9, P11, P19] # [B, D+, F, G]
    G7 = [M0, P5, P11, AcM16] # [B, G, F, D+]
    G7 = [P5, M7, P11, AcM16] # [G, B, F, D+]

I think the next thing to do is to hugely reduce my allowed chord qualities and see if I can force the program to do dumb progressions like [C.maj D.m G.7 C.maj].

...

There are some melodic spaces that have both sharps and flats, and I'm not sure whether they should be ruled out. They're definitely not standard in European harmony, but scales like that are totally accepted in middle eastern harmony.

There's a peculiarity I see when I run my programs where a G.maj chord will introduce an F#+ into the melodic space and it stays around for a very very long time. I should look into the details of why the melodic-spacing updating function doesn't ever decide that a regular F pitch class might be consonant with C.maj or A.m chord or other things.

Maybe I should just force a reset of the melodic space to C major scale when I play a C major chord.

...