Tempering means applying a tuning system (to a set of intervals) which maps some intervals to a frequency ratio of 1/1. This hides the effect of those intervals. For example, if Ac1 is tempered out, then you'll hear the same frequency ratio for any tuned intervals expressible as
n * Ac1
for integers {n}. So in tuning, we've lost information.
Given a piece in a tempered tuning, what can we do to try reconstructing plausible intervallic muisc?
We could off course just associate every tempered frequency ratio with a single interval in our detempering reconstruction, e.g. assume every 1/1 was a P1 before we threw out the information. This is roughly the state of the art in the microtonal community.
That's weaksauce, but it's an okay baseline. We know that we can do at least as well as mapping, e.g. steps of 12 edo to a ch,romatic scale,
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] ->
[P1, m2, M2, m3, M3, P4, d5, P5, m6, M6, m7, M7, P8]
What can we do that's better than that?
Suppose for a toy example that every step of 12-EDO can map to a small finite set of intervals, like the chromatic values above plus or minus an Ac1 and plus or minus a d2. It's up to you if you want to allow both commas to be applied at once, or to apply them multiple times. But we want something finite.
We're free to associate those altered chromatic intervals with the same 12-EDO step because 12-EDO tempers out Ac1 and d2. If you're working with a different temperament, you'll similarly continue to want to used its tempered commas to generate intervallic detempering options for every tuned frequency ratio in your song, but it might not be Ac1 and d2, and they might not be altering a chromatic scale. But let's keep working with 12-TET for simplicity and concreteness and applicability to the canon of modern western music.
For a given song, we'd like to choose among these intervallic detempering options for every note so as to get
1) melodic intervals that are fluid
2) harmonic intervals that are consonant
and if those two criteria leave some decisions un-made, then we'd like to also have
3) low complexity just tunings of individual notes
Those are currently three vague optimization criteria. Let's make them a little more concrete.
For a first approximation, we'll suppose that melodic fluidity and harmonic consonance are the same - some intervals are better at both functions and some intervals are worse at both functions.
Suppose we bless a set of intervals as perfectly consonant+fluid, perhaps
[P1, P4, P5]
[Grm2, m2, M2, AcM2]
[Grm3, m3, M3, AcM3]
[Grm6, m6, M6, AcM6]
[Grm7, m7, M7, AcM7]
And maybe also the octave displacements of those shall be blessed.
Next we judge all other intervals as being less consonant+fluid based on how many commas we have to traverse to reach a blessed one. We'll need to define a set of traversing commas for this - which steps are we making and counting to get from A to B. Let's work in rank-3 interval space / 5-limit just intonation and use (Ac1, A1, d2) as our traversing commas. This will let us move between any pair of intervals since this basis is unimodular in the rank 3 prime harmonic basis, (P8, P12, M17).
For a given interval B, you
0) find the octave reduction of B,
1) take the difference of reduced-B with each blessed interval,
2) express the differences in the (Ac1, A1, d2) basis,
3) take the sum of the absolute values of the components of each difference interval
4) take the minimum value of those sums as the score of dissonance. A larger score means the original interval was separated from the nearest blessed interval by more commas, and therefore was itself more dissonant.
Here's what that looks like for some rank-9 intervals:
1 : A1 # 25/24
1 : A4 # 25/18
1 : Ac1 # 81/80
1 : Acd4 # 162/125
1 : Acm2 # 27/25
1 : As1 # 33/32
1 : As4 # 11/8
1 : AsGrm2 # 88/81
1 : AsGrm3 # 11/9
1 : AsGrm6 # 44/27
1 : AsGrm7 # 11/6
1 : Asm2 # 11/10
1 : De5 # 16/11
1 : DeAcM2 # 12/11
1 : DeAcM3 # 27/22
1 : DeAcM6 # 18/11
1 : DeAcM7 # 81/44
1 : DeM7 # 20/11
1 : Dem7 # 96/55
1 : Gr5 # 40/27
1 : GrA1 # 250/243
1 : Pr1 # 65/64
1 : PrGrm7 # 65/36
1 : Prm2 # 13/12
1 : Prm3 # 39/32
1 : Prm6 # 13/8
1 : Re5 # 96/65
1 : ReAcM2 # 72/65
1 : ReM3 # 16/13
1 : ReM6 # 64/39
1 : ReM7 # 24/13
1 : Rsm2 # 512/475
1 : Sb5 # 35/24
1 : SbAcM2 # 35/32
1 : Sbm2 # 28/27
1 : Sbm3 # 7/6
1 : Sbm7 # 7/4
1 : Sp1 # 36/35
1 : SpM2 # 8/7
1 : SpM3 # 9/7
1 : d4 # 32/25
1 : d5 # 36/25
1 : d5 # 36/25
2 : AcA1 # 135/128
2 : AsGr1 # 55/54
2 : AsGrd7 # 44/25
2 : DeA1 # 100/99
2 : DeAc5 # 81/55
2 : DeSbAcM3 # 105/88
2 : DeSbm7 # 56/33
2 : ExA1 # 17/16
2 : FaA1 # 2375/2304
2 : Grd4 # 512/405
2 : Grd5 # 64/45
2 : PrDe5 # 65/44
2 : PrDem3 # 13/11
2 : PrDem7 # 39/22
2 : PrGrd7 # 26/15
2 : PrSp1 # 117/112
2 : PrSpm2 # 39/35
2 : Prd2 # 26/25
2 : ReA1 # 40/39
2 : ReAs1 # 66/65
2 : ReAsM2 # 44/39
2 : ReAsM3 # 33/26
2 : ReSb5 # 56/39
2 : ReSbAcM2 # 14/13
2 : ReSbM7 # 70/39
2 : SbAcm2 # 21/20
2 : Sbd4 # 56/45
2 : Sbd5 # 7/5
2 : Sbd7 # 42/25
2 : SpA1 # 15/14
2 : SpGr1 # 64/63
2 : Spd4 # 1152/875
3 : AcAcA1 # 2187/2048
3 : AcAcA4 # 729/512
3 : AsGrd5 # 22/15
3 : AsSbGrd7 # 77/45
3 : AsSpGr1 # 22/21
3 : AsSpGr1 # 22/21
3 : DeAcA1 # 45/44
3 : DeDeAcAA1 # 125/121
3 : DeSbAc5 # 63/44
3 : DeSpA1 # 80/77
3 : GrGrd5 # 1024/729
3 : PrDeSp1 # 78/77
3 : PrDed5 # 78/55
3 : PrGrd5 # 13/9
3 : PrPrd4 # 169/128
3 : PrSbGrd7 # 91/54
3 : PrSbd5 # 91/64
3 : PrSpGr1 # 65/63
3 : ReAcA1 # 27/26
3 : ReAsSb5 # 77/52
3 : ReDeAcAA1 # 150/143
3 : SbSbd7 # 49/30
3 : SpAcA1 # 243/224
3 : SpSpGr1 # 256/245
4 : AsAsGrd1 # 121/120
4 : AsSbGrd5 # 77/54
4 : AsSpGrd1 # 176/175
4 : DeSpAcA1 # 81/77
4 : PrAsGrd4 # 143/108
4 : PrDeSbd5 # 91/66
4 : PrDeSbd7 # 91/55
4 : ReAsAsGr1 # 121/117
4 : ReDeAcA1 # 144/143
4 : ReDeAcA4 # 192/143
4 : ReReAsA1 # 176/169
4 : ReReSbAcAA1 # 175/169
4 : ReSbAcA1 # 105/104
5 : DeDeAcAcA1 # 243/242
5 : PrAsSpGrd1 # 143/140
5 : PrPrSpGrd1 # 169/168
This looks really good to me - nothing is miscategorized. And the score is basically the number of adjectives in from of a 3-limit or 5-limit natural interval. Easy. Unfortunately, the categories aren't very granular, e.g. lots of things are 1 step of dissonance away from blessed. So how do we decide among them? Maybe that's where our notion of frequency ratio complexity comes into play.
For our measure of frequency ratio simplicity, I'm a little torn: it's dirt simple to only use numerator magnitude, but this neglects factor structure: a 3-limit Pythagorean Major Third justly tuned to 81/64 is a much more harmonically basic ratio than, e.g. a 13-limit justly tuned Recessed Major Third at 16/13. We could simply ignore the contribution of factors 2 and 3, but then all Pythagorean ratios would be equally consonant, which isn't right.
The first frequency ratio norm I've found that I like somewhat is this:
norm = sum([abs(coordinate) * (primes[index] ** 3) for index, coordinate in enumerate(harmonic_coordinates)])
Here's how the function works: for a given ratio, find its prime factorization, and represent all the exponents for primes up to some limit as a vector. Here we have a 9 component vector representing exponents of prime factors up to 23, since 23 is the 9th prime:
81/80 :: [-4, 4, -1, 0, 0, 0, 0, 0, 0]
The norm for this ratio takes the absolute value of each vector component and multiplies it by the cube of the corresponding prime, then sums all those products:
(4 * 2^3) + (4 * 3^3) + (1 * 5^3) = 265
Here are a few frequency ratios sorted by increasing norm value to give you an idea of how this norm behaves:
[1/1, 2/1, 3/2, 4/3, 9/8, 81/64, 16/15, 10/9, 256/243, 81/80, 7/4, 11/4, 11/8, 11/10, 16/13, 13/12, 14/13, 17/16, 57/56]
I said we were working in 5-limit just intonation, so most of these ratios wouldn't show up, but I want to the norm to be well behaved at higher prime limits. If I write a detempering algorithm that works up to 23-limit, I'll use these as my traversing commas:
[Ac1, A1, d2, Sp1, As1, Pr1, Ex1, Rs1, Nb1][81/80, 25/24, 128/125, 36/35, 33/32, 65/64, 51/50, 96/95, 46/45]
The fractionc complexity norm above does a good job of penalizing higher primes and letting Pythagorean ratios play first, or at least letting them play fairly soon. I like septimal ratios almost as much as Pythagorean ones, and would prefer it if 7/4 wasn't deemed less consonant than 81/80, but this is a good start. I guess I could just put some intervals with septimal just tuning into the blessed set if I wanted them to show up more.
Here are a few intervals that I already had defined in code sorted by the norm of their frequency ratios:
[P1, P8, P5, P4, AcM2, Grm7, AcM6, Grm3, M3, m6, M6, AcM3, m3, Grm6, M7, m7, m2, M2, AcM7, Grm2, Grd5, Gr5, AcAcA4, GrGrd5, AcA1, Ac1, AcAcA1, d4, A1, Grd4, A4, d5, Acm2, Sbm7, SpM2, Sbm3, SpM3, Sbm2, SpGr1, Sbd5, Acd4, SpA1, SbAcM2, SbAcm2, GrA1, SpAcA1, Sb5, Sp1, Sbd4, Sbd7, Spd4, SbSbd7, SpSpGr1, As4, De5, AsGrm7, DeAcM2, AsGrm3, DeAcM6, As1, DeAcM3, AsGrm6, DeAcM7, AsGrm2, Asm2, DeM7, AsGrd5, Dem7, DeAcA1, AsGr1, DeAc5, AsGrd7, DeA1, AsSpGr1, AsSpGr1, DeSbm7, DeSbAc5, AsSbGrd5, DeSpAcA1, DeSpA1, DeSbAcM3, AsSbGrd7, AsSpGrd1, Prm6, ReM3, Prm2, ReM7, PrGrd5, Prm3, ReM6, ReAcA1, PrGrd7, Pr1, ReA1, Re5, PrGrm7, ReAcM2, Prd2, ReSbAcM2, PrSbd5, ReSb5, PrSp1, PrSbGrd7, PrSpm2, ReSbM7, ReSbAcA1, PrSpGr1, DeDeAcAcA1, AsAsGrd1, DeDeAcAA1, PrDem3, PrDem7, ReAsM3, ReAsM2, ReDeAcA4, ReDeAcA1, PrAsGrd4, PrDe5, PrDed5, ReAs1, ReDeAcAA1, ReAsSb5, PrDeSbd5, PrDeSp1, PrDeSbd7, PrAsSpGrd1, PrPrd4, PrPrSpGrd1, ReAsAsGr1, ExA1, ReReSbAcAA1, ReReAsA1, Rsm2, FaA1]
It's kind of weird that an ascendant sub grave diminished unison, AsSbGrd5, is more complex than a prominent minor second, Prm2, but that's on me for definine a bad norm, I guess. But those are going to be in difference dissonance categories, and then the frequency ratio things disambiguates within the category, yeah? I could probably combine them numerically even.... Or continue thinking about detempering.
Wait, no, I've got it! I want the dissonance categories to remain, and the frequency ratios to disambiguate within them. And the dissonacne categories are integers. So I'll map the frequency ratio norm to the range [0, 1) and add that to the dissonance category. That way there's (probably) a total order over intervals and their just tunings, but also nothing gets too far away from its dissonance category. So we need a function that takes [0, inf) to [0, 1), like
f(x) = x / (1 + x)
f(x) = 1 - e^(-x)
f(x) = tanh(x)
f(x) = 2/π * arctan(x)
I tried the first function. It works okay. I notice that since I didn't inclode tritones in the blessed set (intentionally) and since Pythagorean tritones
AcAcA4 # 729/512
GrGrd5 # 1024/729
have large numerators and lots of factors and they're quite a few commas away from natural intervals like P4 and P5, they get quite high dissonance ratings, whereas the 5-limti A4 and d5 do not. I'm not sure if this is a bug, but I think so. I remember I once listened to tons of different intonations of diminished chords and I thought a pythagorean diminished triad
[P1, Grm3, GrGrd5]
was particularly beautiful. So the fact that none of my methods like GrGrd5 is a bit of a flaw.
Anyway, regardless of their quality, we now have concrete notions of consonance+fluidity and frequency ratio simplicity.
For a melody in 12-TET, we have oh, 5 or 9 or however many interval options per tempered frequency ratio, and we want to make interval selections for all of our notes to minimize melodic disfluidity/dissonance, and if multiple choices of intervals would leave us with same amount of disfluidity, then we want to minimize the frequency ratio complexity of the just tunings of individual notes.
This is almost solvable, but still a little ill-posed. Having a finite search space helps a lot. How about this: given two interval sequences with equal melodic disfluidity, sum the frequency ratio complexities for the just tunings of all the intervals in each detempering / melodic interval reconstruction. I think this probably won't work well: 2/1 has a normed value of 8, while 16/13 has a norm of 2229. These are really different magnitudes, so the sum of ratio complexities for a detempered melodic line is going to be dominanted by single notes. Maybe it would work, but it seems unlikely. I guess I could take a logarithm of the norm to make things more similarly sized. I'll try it both ways and see what gives better results.
That's a partial solution to detempering, yeah? You could code this up and it would find you an intervallic melody from a 12-TET melody (or 19-TET or 53-TET or meantone or whatever, with a litle tweaking).
That's very exciting to me! It's a big conceptual improvement over mapping 1 ratio to 1 interval. Maybe it won't work that well, but it's got moving parts that can be adjusted until it does.
Let's think about polyphonic music next.
Suppose you have two voices. I care more about harmonic consonance than melodic fluidity, so at every moment, we're going to have pure harmony, and if there are some wonky melodic steps to get there, that's fine.
I've been thinking that my notion of favoring a low frequency ratio complexity in the just tunings of notes over a reference pitch will tend to limit comma drift, but comma drift is beautiful and not something we should limit. We should drift all over frequency space, wherever harmony and fluidity take us, regardless of our starting pitches.
...
I think for a given passage in a song, you're going to have one melody that's most important, and it's going to have the most fluid melodic intervals, and other notes of other voices will adapt around it to make good harmony, even if this makes their melodies less fluid. Maybe everyone can move fluidly and maintain harmony, but I doubt it, and if that's the case, then one star voice at a time will maintain the greatest fluidity.
...
No comments:
Post a Comment