Douglas Blumeyer's RTT How-To: Difference between revisions
Cmloegcmluin (talk | contribs) |
Cmloegcmluin (talk | contribs) →multi(co)vectors: multimaps and multicommas |
||
Line 1,110: | Line 1,110: | ||
|} | |} | ||
== | == multimaps & multicommas == | ||
=== | === multimaps === | ||
If you spend much time exploring information about RTT online, it won’t be long until you come across “wedgies”, which are an alternative way to represent temperaments. You may not need them to do RTT stuff; a lot of the information you can get from them can be gotten otherwise from the already-discussed matrices. But you may find they | If you spend much time exploring information about RTT online, it won’t be long until you come across “wedgies”, which are an alternative way to represent temperaments. You may not need them to do RTT stuff; a lot of the information you can get from them can be gotten otherwise from the already-discussed matrices. But you may find they appeal to you. | ||
The mathematical structure used to represent a wedgie is called a '''multicovector''' | The mathematical structure used to represent a wedgie is called a '''multicovector''', and this structure is indeed related to the mathematical structure called the “covector”: | ||
* They both represent information written horizontally, as a row. | * They both represent information written horizontally, as a row. | ||
* They both use left angle brackets on the left and square brackets on the right, {{val|}}, to enclose their contents. | * They both use left angle brackets on the left and square brackets on the right, {{val|}}, to enclose their contents. | ||
* They both exist on the left half of tuning duality, on the side built up out of ETs | * They both exist on the left half of tuning duality, on the side built up out of ETs which concerns rank (not the side built up out of commas, which uses vectors/columns, and concerns nullity). | ||
The main difference between the two is superficial, and has to do with the “multi” part of the name. A plain covector comes in only one type, but a multicovector can be a bicovector, tricovector, tetracovector, etc. Yes, a multicovector can even be a monocovector. Depending on its numeric prefix, a multicovector will be written with a different count of brackets on either side. For example, a bicovector uses two of each: {{multival|}}. A tricovector uses three of each: {{multival|rank=3|}}. A monocovector, written with one of each, like {{val|}}, is indistinguishable from a plain covector, and that’s okay. | The main difference between the two is superficial, and has to do with the “multi” part of the name. A plain covector comes in only one type, but a multicovector can be a bicovector, tricovector, tetracovector, etc. Yes, a multicovector can even be a monocovector. Depending on its numeric prefix, a multicovector will be written with a different count of brackets on either side. For example, a bicovector uses two of each: {{multival|}}. A tricovector uses three of each: {{multival|rank=3|}}. A monocovector, written with one of each, like {{val|}}, is indistinguishable from a plain covector, and that’s okay. | ||
In order to make these materials as accessible as possible, I have been doing what I can to lean away from RTT jargon and instead toward generic, previously established mathematical and/or musical concepts. That is why I have avoided the terms "monzo", "val", "breed", and why I will now avoid "wedgie". When established mathematical and/or musical concepts are unavailable, we can at least use unmistakable analogs built upon what we do have. In this case, if in RTT we use covectors to represent maps, then analogously, we can refer to the thing multicovectors represent in RTT as a '''multimap'''. | |||
So we mentioned that a multimap is an alternative way to represent a temperament. Let's look at an example now. Meantone's multimap looks like this: {{multival|1 4 4}}. As you can see, it is a bicovector, or bimap, because it has two of each bracket. | |||
Why care about multimaps? Well, a key reason is that they can serve the same purpose as the normal form of a temperament’s mapping: the process for converting a mapping to a multimap will convert any equivalent mapping to the same exact multimap. In other words, a multimap can serve as a unique identifier for its temperament. And, unlike normal forms for matrices, there is no question about which normal form to use. | |||
Alright, then, sounds great! But how do I convert a mapping to a multimap? The process is doable. It’s closely related to the wedge product (hence the name “wedgie”), but better known as the '''exterior product'''. We write it with the symbol ∧, which is great because that’s the logical operator for “and”, forming a clear association with the unioning of two ETs. | |||
Take each combination of <span><math>r</math></span> primes where <span><math>r</math></span> is the rank, sorted in [https://en.wikipedia.org/wiki/Lexicographic_order lexicographic order], e.g. if we're in the 7-limit, we'd have <span><math>(2,3,5)</math></span>, <span><math>(2,3,7)</math></span>, <span><math>(2,5,7)</math></span>, and <span><math>(3,5,7)</math></span>. Now convert each of those combinations to a square <span><math>r×r</math></span> matrix by slicing a column for each prime out of the mapping and putting them together. Now take each matrix's determinant. Extract the GCD from the resulting sequence of scalars, then set them inside <span><math>r</math></span> brackets, and you've got your | First I’ll list the steps. Don’t worry if it doesn’t all make sense the first time. We’ll work through an example and go into more detail as we do. To be clear, what we're doing here is both more and less and different ways from the strict definition of the exterior product as you may see it elsewhere; I'm specifically here describing the process for finding the multimap in the form you're going to be interested in for RTT purposes. | ||
Take each combination of <span><math>r</math></span> primes where <span><math>r</math></span> is the rank, sorted in [https://en.wikipedia.org/wiki/Lexicographic_order lexicographic order], e.g. if we're in the 7-limit, we'd have <span><math>(2,3,5)</math></span>, <span><math>(2,3,7)</math></span>, <span><math>(2,5,7)</math></span>, and <span><math>(3,5,7)</math></span>. Now convert each of those combinations to a square <span><math>r×r</math></span> matrix by slicing a column for each prime out of the mapping and putting them together. Now take each matrix's determinant. Extract the GCD from the resulting sequence of scalars, then set them inside <span><math>r</math></span> brackets, and you've got your multimap. | |||
Let’s work through the meantone example. | Let’s work through the meantone example. | ||
Line 1,233: | Line 1,233: | ||
|} | |} | ||
And so our results are <span><math>-2</math></span>, <span><math>3</math></span>, <span><math>1</math></span>, <span><math>-11</math></span>. At first glance we don’t have a GCD, but there is a slight trick here. We prefer for the first term to be positive. It doesn’t make a difference, but is a way to normalize things (we could have found the result where the first term came out positive by simply changing the order of the rows of our mapping, which doesn’t affect how the mapping works at all). So, we can simply think of this as extracting a GCD of -1, and our list ends up as <span><math>2</math></span>, <span><math>-3</math></span>, <span><math>-1</math></span>, <span><math>11</math></span>. Finally, set these inside triply-nested brackets, because it’s a | And so our results are <span><math>-2</math></span>, <span><math>3</math></span>, <span><math>1</math></span>, <span><math>-11</math></span>. At first glance we don’t have a GCD, but there is a slight trick here. We prefer for the first term to be positive. It doesn’t make a difference, but is a way to normalize things (we could have found the result where the first term came out positive by simply changing the order of the rows of our mapping, which doesn’t affect how the mapping works at all). So, we can simply think of this as extracting a GCD of -1, and our list ends up as <span><math>2</math></span>, <span><math>-3</math></span>, <span><math>-1</math></span>, <span><math>11</math></span>. Finally, set these inside triply-nested brackets, because it’s a trimap for a rank-3 temperament, and we get {{multival|rank=3|2 -3 -1 11}}. | ||
As for getting from the | As for getting from the multimap back to the mapping, you can solve a system of equations for that. Though it’s not easy and there may not be a unique solution. And you probably will never have the multimap without the mapping anyway. | ||
=== | === multicommas === | ||
You may have noticed that the | You may have noticed that the multimap for meantone, {{multival|1 4 4}}, looks really similar to the meantone comma, {{monzo|-4 4 -1}}. This is not a coincidence. | ||
To understand why, we have to cover a few key points: | To understand why, we have to cover a few key points: | ||
# Just as a vector is the dual of a covector, we also have a '''multivector''' which is the dual of a multicovector. | # Just as a vector is the dual of a covector, we also have a '''multivector''' which is the dual of a multicovector. Analogously, we call the thing the multivector represents a '''multicomma'''. | ||
# We can calculate a | # We can calculate a multicomma from a comma basis matrix much in the same way we can calculate a multimap from a mapping matrix | ||
# We can convert between | # We can convert between multimaps and multicommas using an operation called “taking the '''complement'''”<ref>Elsewhere on the wiki you may find the complement operation called "taking [[the dual]]", or even the dual of a multimap being called simply "the dual". An alternate name for "taking the complement" may be "taking the Hodge dual", but in these materials, I am using the dual to refer to the general case, while the specific case of the dual of a multimap is a multicomma and the operation to get from one of these to its dual is called taking the complement (whereas to get to the dual of a mapping, which is a comma basis, the operation is called taking the null-space).</ref>, which basically involves reversing the order of terms and negating some of them. | ||
[[File:Algebra notation.png|300px|thumb|right|'''Figure 6a.''' RTT bracket notation comparison.]] | [[File:Algebra notation.png|300px|thumb|right|'''Figure 6a.''' RTT bracket notation comparison.]] | ||
To demonstrate these points, let’s first calculate the | To demonstrate these points, let’s first calculate the multicomma from a comma basis, and then confirm it by calculating the same multicomma as the complement of its dual multimap. | ||
Here’s the comma basis for meantone: {{val|{{monzo|-4 4 -1}}}}. Calculating the | Here’s the comma basis for meantone: {{val|{{monzo|-4 4 -1}}}}. Calculating the multicomma is almost the same as calculating the multimap. The only difference is that as a preliminary step you must transpose the matrix, or in other words, exchange rows and columns. In our bracket notation, that just looks like replacing {{val|{{monzo|-4 4 -1}}}} with {{monzo|{{val|-4 4 -1}}}}. Now we can see that this is just like our ET map example from the previous section: basically an identity operation, breaking the thing up into three 1×1 matrices <span><math>\begin{bmatrix}-4\end{bmatrix} \begin{bmatrix}4\end{bmatrix} \begin{bmatrix}-1\end{bmatrix}</math></span> which are their own determinants and then nesting back inside one layer of brackets because nullity is 1. So we have {{monzo|-4 4 -1}}. Except, be careful! We can’t skip the step where we extract the GCD, which in this case is -1 again, so the multicomma (a monocomma) is actually {{monzo|4 -4 1}}. By the way, we write this operation with a different symbol; it’s upside down from the exterior product, and so is called the interior product, and uses ∨, which is great because that’s also the logical operator for “or” which matches with the intersection of commas using the “|” operator which also means “or”. | ||
Now let’s see how to do the complement operation. | Now let’s see how to do the complement operation. | ||
Line 1,258: | Line 1,258: | ||
# Take the sums of these sets of indices, and to each sum, also add <span><math>x</math></span>. So <span><math>1+2+x</math></span>, <span><math>1+3+x</math></span>, <span><math>2+3+x</math></span> = <span><math>1+2+1</math></span>, <span><math>1+3+1</math></span>, <span><math>2+3+1</math></span> = <span><math>4</math></span>, <span><math>5</math></span>, <span><math>6</math></span>. | # Take the sums of these sets of indices, and to each sum, also add <span><math>x</math></span>. So <span><math>1+2+x</math></span>, <span><math>1+3+x</math></span>, <span><math>2+3+x</math></span> = <span><math>1+2+1</math></span>, <span><math>1+3+1</math></span>, <span><math>2+3+1</math></span> = <span><math>4</math></span>, <span><math>5</math></span>, <span><math>6</math></span>. | ||
# Raise -1 to the exponent of these values. -1⁴, -1⁵, -1⁶ = 1, -1, 1. | # Raise -1 to the exponent of these values. -1⁴, -1⁵, -1⁶ = 1, -1, 1. | ||
# Multiply each term of the | # Multiply each term of the multimap by these values. 1×1, 4×-1, 4×1, = 1, -4, 4. | ||
# Reverse the order: 4, -4, 1. | # Reverse the order: 4, -4, 1. | ||
# Set the result in the proper count of brackets: {{monzo|4 -4 1}}. | # Set the result in the proper count of brackets: {{monzo|4 -4 1}}. | ||
Line 1,264: | Line 1,264: | ||
Ta-da! Both operations get us to the same result: {{monzo|4 -4 1}}. | Ta-da! Both operations get us to the same result: {{monzo|4 -4 1}}. | ||
What’s the proper count of brackets though? Well, the total count of brackets on the | What’s the proper count of brackets though? Well, the total count of brackets on the multicomma and multimap for a temperament must always sum to the dimensionality of the system from which you tempered. It’s the same thing as <span><math>d - n = r</math></span>, just phrased as <span><math>r + n = d</math></span>, and where <span><math>r</math></span> should be the bracket count for the multimap and <span><math>n</math></span> should be the bracket count for the multicomma. So with 5-limit meantone, with dimensionality 3, there should be 3 total pairs of brackets. If 2 are on the multimap, then only 1 are on the multicomma. | ||
An important observation to make about | An important observation to make about multicommas and multimaps is that — for a given temperament — they always have the same count of terms. This may surprise you, since the rank and nullity for a temperament are often different, and the length of the multimap comes from the rank while the length of the multicomma comes from the nullity. But there’s a simple explanation for this. In either case, the length is not directly equal to the rank or nullity, but to the dimensionality choose the rank or nullity. And there’s a pattern to combinations that can be visualized in the symmetry of rows of Pascal’s triangle: <span><math>{d \choose n}</math></span> is always equal to <span><math>{d \choose {d - n}}</math></span>, or in other words, <span><math>{d \choose n}</math></span> is always equal to <span><math>{d \choose r}</math></span>. Here are some examples: | ||
{| class="wikitable" | {| class="wikitable" | ||
|+'''Table 5a.''' Multi(co)vector prime combinations (<math>r</math> can be switched for <math>n</math>) | |+'''Table 5a.''' Multi(co)vector prime combinations (<math>r</math> can be switched for <math>n</math>) | ||
Line 1,299: | Line 1,299: | ||
Each set of one side corresponds to a set in the other side which has the exact opposite elements. | Each set of one side corresponds to a set in the other side which has the exact opposite elements. | ||
If you review the seven steps in the process for taking the complement, you may notice that a lot of it is busywork that will never change from one | If you review the seven steps in the process for taking the complement, you may notice that a lot of it is busywork that will never change from one multimap to another. It all amounts to a specific sequence of 1’s and -1’s corresponding to a given rank and dimensionality. In consideration of this, I have gone ahead and prepared a table with the sequences you need to multiply the terms of your multimap by before flipping them: | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 1,378: | Line 1,378: | ||
Note the Pascal’s triangle shape to the results. Also note that the mirrored results within each dimensionality are reverses of each other. Sometimes that means they’re identical, like 1 -1 1 -1 1 and 1 -1 1 -1 1; other times not, like 1 -1 1 -1 1 -1 1 1 -1 1 and 1 -1 1 1 -1 1 -1 1 -1 1. (Well, and sometimes they’re reverses of each other, but then flipped signs so that the first time is always 1) | Note the Pascal’s triangle shape to the results. Also note that the mirrored results within each dimensionality are reverses of each other. Sometimes that means they’re identical, like 1 -1 1 -1 1 and 1 -1 1 -1 1; other times not, like 1 -1 1 -1 1 -1 1 1 -1 1 and 1 -1 1 1 -1 1 -1 1 -1 1. (Well, and sometimes they’re reverses of each other, but then flipped signs so that the first time is always 1) | ||
If you’re instead converting a | If you’re instead converting a multicomma to a multimap, then you think of it a couple different ways. Either use <span><math>n</math></span> as <span><math>r</math></span> when looking up in this table, and then reverse the result, or find <span><math>r</math></span> by subtracting <span><math>n</math></span> from <span><math>d</math></span> and then look it up. | ||
Note that | Note that multicommas could just as well serve the purpose of a unique identifier for temperaments. There’s no particular reason to prefer the multimap to the multicomma. By convention, however, the multimap is the one that’s used. | ||
And so here’s a table of terminology we’ve come across so far: | And so here’s a table of terminology we’ve come across so far: | ||
Line 1,394: | Line 1,394: | ||
|map (often an ET) | |map (often an ET) | ||
|mapping | |mapping | ||
| | |multimap | ||
|multicomma | |multicomma | ||
|comma basis | |comma basis | ||
Line 1,401: | Line 1,401: | ||
!RTT structure | !RTT structure | ||
|map, mapping row | |map, mapping row | ||
| | |list of maps | ||
| | |list of denominators of unit fractions of tempered lattice generated by combinations of primes | ||
|? | |? | ||
|list of prime count lists | |list of prime count lists | ||
Line 1,439: | Line 1,439: | ||
|monzo | |monzo | ||
|} | |} | ||
The cell in the "RTT structure" row and "multimap" column may seem a bit out of left field. But that's what we're going to talk about next. | |||
=== tempered lattice fractions generated by prime combinations === | === tempered lattice fractions generated by prime combinations === | ||
So we now understand how to get to | So we now understand how to get to multimaps. And we understand that they uniquely identify the temperament. But what about the individual terms — do they mean anything in and of themselves? It turns out: yes! | ||
The first thing to understand is that each term of the | The first thing to understand is that each term of the multimap pertains to a different combination of primes. We already know this: it’s how we calculated it from the mapping matrix. For example, in the multimap for meantone, {{multival|1 4 4}}, the 1 is for <span><math>(2,3)</math></span>, the first 4 is for <span><math>(2,5)</math></span>, and the second 4 is for <span><math>(3,5)</math></span>. | ||
Now, let’s convert every term of the | Now, let’s convert every term of the multimap by taking its absolute value and its inverse. In this case, each of our terms is already positive, so that has no effect. But taking the inverse converts us to <span><math>\frac 11</math></span>, <span><math>\frac 14</math></span>, <span><math>\frac 14</math></span>. These values tell us what fraction of the tempered lattice we can generate using the corresponding combination of primes. | ||
What does that mean? Who cares? The motivation here is that it’s a good thing to be able to generate the entire lattice. We may be looking for JI intervals we could use as generators for our temperament, and if so, we need to know what primes to build them out of so that we can make full use of the temperament. So this tells us that if we try to build generators out of primes 2 and 3, we will succeed in generating <span><math>\frac 11</math></span> or in other words all of the tempered lattice. Whereas if we try to build the generators out of primes 2 and 5, or 3 and 5, we will fail; we will only be able to generate <span><math>\frac 14</math></span> of the lattice. In other words, prime 5 is the bad seed here; it messes things up. | What does that mean? Who cares? The motivation here is that it’s a good thing to be able to generate the entire lattice. We may be looking for JI intervals we could use as generators for our temperament, and if so, we need to know what primes to build them out of so that we can make full use of the temperament. So this tells us that if we try to build generators out of primes 2 and 3, we will succeed in generating <span><math>\frac 11</math></span> or in other words all of the tempered lattice. Whereas if we try to build the generators out of primes 2 and 5, or 3 and 5, we will fail; we will only be able to generate <span><math>\frac 14</math></span> of the lattice. In other words, prime 5 is the bad seed here; it messes things up. | ||
Line 1,458: | Line 1,460: | ||
But now try it with only 5 and one other of primes 2 or 3. Prime 5 takes you over 4 in both directions. But if you have only prime 2 otherwise, then you can only move up or down from there, so you’ll only cover every fourth vertical line through the tempered lattice. Or if you only had prime 3 otherwise, then you could only move left and right from there, you’d only cover every fourth horizontal line ''(see Figure 6c)''. | But now try it with only 5 and one other of primes 2 or 3. Prime 5 takes you over 4 in both directions. But if you have only prime 2 otherwise, then you can only move up or down from there, so you’ll only cover every fourth vertical line through the tempered lattice. Or if you only had prime 3 otherwise, then you could only move left and right from there, you’d only cover every fourth horizontal line ''(see Figure 6c)''. | ||
One day you might come across a | One day you might come across a multimap which has a term equal to zero. If you tried to interpret this term using the information here so far, you'd think it must generate <span><math>\frac 10</math></span>th of the tempered lattice. That's not easy to visualize or reason about. Does that mean it generates essentially infinity lattices? No, not really. More like the opposite. The question itself is somewhat undefined here. If anything, it's more like that combination of primes generates approximately ''none'' of the lattice. Because in this situation, the combination of primes whose multimap term is zero generates so little of the tempered lattice that it's completely missing an entire dimension of it, so it's an infinitesimal amount of it that it generates. For example, the 11-limit temperament 7&12&31 has multimap {{val|rank=3|0 1 1 4 4 -8 4 4 -12 -16}} and mapping {{monzo|{{val|1 0 -4 0 -12}} {{val|0 1 4 0 8}} {{val|0 0 0 1 1}}}}; we can see from this how primes <span><math>(2,3,5)</math></span> can only generate a rank-2 cross-section of the full rank-3 lattice, because while 2 and 3 do the trick of generating that rank-2 part (exactly as they do in 5-limit meantone), prime 5 doesn't bring anything to the table here so that's all we get. | ||
We’ll look in more detail later at how exactly to best find these generators, once you know which primes to make them out of. | We’ll look in more detail later at how exactly to best find these generators, once you know which primes to make them out of. | ||
== other topics (TBD) == | == other topics (TBD) == |