Douglas Blumeyer's RTT How-To: Difference between revisions

Cmloegcmluin (talk | contribs)
comma-basis it is
Cmloegcmluin (talk | contribs)
oops, also have to update bases and mapping-row
Line 472: Line 472:




=== mapping-row bases and comma bases ===
=== mapping-row-bases and comma-bases ===


19-ET. Its map is {{map|19 30 44}}. We also now know that we could call it “meantone|magic”, because we find it at the meeting of the meantone and magic temperament lines. But how would we mathematically, non-visually make this connection?
19-ET. Its map is {{map|19 30 44}}. We also now know that we could call it “meantone|magic”, because we find it at the meeting of the meantone and magic temperament lines. But how would we mathematically, non-visually make this connection?
Line 508: Line 508:
Sometimes a comma-basis may have only a single comma. That’s okay. A single vector can become a matrix. To disambiguate this situation, you could put the vector inside row brackets, like this: {{map|{{vector|-4 4 -1}}}}. Similarly, a single covector can become a matrix, by nesting inside column brackets, like this: {{vector|{{map|19 30 44}}}}.
Sometimes a comma-basis may have only a single comma. That’s okay. A single vector can become a matrix. To disambiguate this situation, you could put the vector inside row brackets, like this: {{map|{{vector|-4 4 -1}}}}. Similarly, a single covector can become a matrix, by nesting inside column brackets, like this: {{vector|{{map|19 30 44}}}}.


If a comma-basis is the name for the matrix made out of commas, then we could say a “'''mapping'''” is the name for the matrix made out of maps. Why isn't this one a "basis", you ask? Well, it can be thought of as a basis too. It depends on the context. When you use the word "mapping" for it, you're treating it like a function, or a machine: it takes in intervals, and spits out new forms of intervals. That's how we've been using it here. But in other places, you may be thinking of this matrix as a basis for the infinite space of possible maps that could be combined to produce a matrix which works the same way as a given mapping, i.e. it tempers out the same commas. In these contexts, it might make more sense to call such a mapping matrix a "mapping-row basis".
If a comma-basis is the name for the matrix made out of commas, then we could say a “'''mapping'''” is the name for the matrix made out of maps. Why isn't this one a "basis", you ask? Well, it can be thought of as a basis too. It depends on the context. When you use the word "mapping" for it, you're treating it like a function, or a machine: it takes in intervals, and spits out new forms of intervals. That's how we've been using it here. But in other places, you may be thinking of this matrix as a basis for the infinite space of possible maps that could be combined to produce a matrix which works the same way as a given mapping, i.e. it tempers out the same commas. In these contexts, it might make more sense to call such a mapping matrix a "mapping-row-basis".


And now you wonder why it's not just "map basis". Well, that's answerable too. It's because "map" is the analogous term to an "interval", but we're looking for the analogous term to a "comma". A comma is an interval which is tempered out. So we need a word that means a map which tempers out, and that term is "mapping-row".
And now you wonder why it's not just "map basis". Well, that's answerable too. It's because "map" is the analogous term to an "interval", but we're looking for the analogous term to a "comma". A comma is an interval which is tempered out. So we need a word that means a map which tempers out, and that term is "mapping-row".


So, yes, that's right: maps are similar to commas insofar as — once you have more than one of them in your matrix — the possibilities for individual members immediately go infinite. Technically speaking, though, while a comma-basis is a basis of the null-space of the mapping, a mapping-row basis is a ''row''-basis of the ''row''-space of the mapping.
So, yes, that's right: maps are similar to commas insofar as — once you have more than one of them in your matrix — the possibilities for individual members immediately go infinite. Technically speaking, though, while a comma-basis is a basis of the null-space of the mapping, a mapping-row-basis is a ''row''-basis of the ''row''-space of the mapping.


One last note back on the bracket notation before we proceed: you will regularly see matrices across the wiki that use only square brackets on the outside, e.g. [{{map|5 8 12}} {{map|7 11 16}}] or [{{vector|-4 4 -1}} {{vector|-10 -1 5}}]. That's fine because it's unambiguous; if you have a list of rows, it's fairly obvious you've arranged them vertically, and if you've got a list of columns, it's fairly obvious you've arranged them horizontally. I personally prefer the style of using angle brackets at both levels — for slightly more effort, it raises slightly less questions — but using only square brackets on the outside should not be said to be wrong<ref>Besides, in most contexts the null-space of a linear mapping is thought of as a list of vectors, rather than a matrix, but it’s generally more helpful for us here to think of it smooshed together as a matrix.</ref>.
One last note back on the bracket notation before we proceed: you will regularly see matrices across the wiki that use only square brackets on the outside, e.g. [{{map|5 8 12}} {{map|7 11 16}}] or [{{vector|-4 4 -1}} {{vector|-10 -1 5}}]. That's fine because it's unambiguous; if you have a list of rows, it's fairly obvious you've arranged them vertically, and if you've got a list of columns, it's fairly obvious you've arranged them horizontally. I personally prefer the style of using angle brackets at both levels — for slightly more effort, it raises slightly less questions — but using only square brackets on the outside should not be said to be wrong<ref>Besides, in most contexts the null-space of a linear mapping is thought of as a list of vectors, rather than a matrix, but it’s generally more helpful for us here to think of it smooshed together as a matrix.</ref>.
Line 520: Line 520:
There’s nothing special about the pairing of meantone and magic. We could have chosen meantone|hanson, or magic|negri, etc. A matrix formed out of the meet of any two of these particular commas will capture the same exact null-space of {{vector|{{map|19 30 44}}}}.
There’s nothing special about the pairing of meantone and magic. We could have chosen meantone|hanson, or magic|negri, etc. A matrix formed out of the meet of any two of these particular commas will capture the same exact null-space of {{vector|{{map|19 30 44}}}}.


We already have the tools to check that each of these commas’ vectors is tempered out individually by the mapping-row {{map|19 30 44}}; we learned this bit in the very first section: all we have to do is make sure that the comma maps to zero steps in this ET. But that's not a special relationship between 19-ET and any of these commas ''individually''; each of these commas are tempered out by many different ETs, not just 19-ET. The special relationship 19-ET has is to a null-space which can be expressed in basis form as the meet of ''two'' commas (at least in the 5-limit; more on this later). In this way, the comma bases which represent the meet of two commas are greater than the sum of their individual parts.
We already have the tools to check that each of these commas’ vectors is tempered out individually by the mapping-row {{map|19 30 44}}; we learned this bit in the very first section: all we have to do is make sure that the comma maps to zero steps in this ET. But that's not a special relationship between 19-ET and any of these commas ''individually''; each of these commas are tempered out by many different ETs, not just 19-ET. The special relationship 19-ET has is to a null-space which can be expressed in basis form as the meet of ''two'' commas (at least in the 5-limit; more on this later). In this way, the comma-bases which represent the meet of two commas are greater than the sum of their individual parts.


We can confirm the relationship between an ET and its null-space by converting back and forth between them. There exists a mathematical function which — when input any one of these comma bases — will output {{vector|{{map|19 30 44}}}}, thus demonstrating the various bases' equivalence with respect to it. If the operation called "taking the null-space" is what gets you from {{vector|{{map|19 30 44}}}} to one basis for the null-space, then ''this'' mathematical function is in effect ''undoing'' the null-space operation; maybe we could call it an anti-null-space operation.
We can confirm the relationship between an ET and its null-space by converting back and forth between them. There exists a mathematical function which — when input any one of these comma-bases — will output {{vector|{{map|19 30 44}}}}, thus demonstrating the various bases' equivalence with respect to it. If the operation called "taking the null-space" is what gets you from {{vector|{{map|19 30 44}}}} to one basis for the null-space, then ''this'' mathematical function is in effect ''undoing'' the null-space operation; maybe we could call it an anti-null-space operation.


And interestingly enough, as you'll soon see, the process is almost the same to take the null-space as it is to undo it.
And interestingly enough, as you'll soon see, the process is almost the same to take the null-space as it is to undo it.
Line 726: Line 726:
=== the other side of duality ===
=== the other side of duality ===


So we can now convert back and forth between a mapping-row basis and a comma-basis. We could imagine drawing a diagram with a line of duality down the center, with a temperament's mapping-row basis on the left, and its comma-basis on the right. Either side ultimately gives the same information, but sometimes you want to come at it in terms of the maps, and sometimes in terms of the commas.
So we can now convert back and forth between a mapping-row-basis and a comma-basis. We could imagine drawing a diagram with a line of duality down the center, with a temperament's mapping-row-basis on the left, and its comma-basis on the right. Either side ultimately gives the same information, but sometimes you want to come at it in terms of the maps, and sometimes in terms of the commas.


So far we've looked at how to meet comma vectors to form a comma-basis. Next, let's look at the other side of duality, and see how to form a mapping-row basis out of joining maps. In many ways, the approaches are similar; the line of duality is a lot like a mirror in that way.
So far we've looked at how to meet comma vectors to form a comma-basis. Next, let's look at the other side of duality, and see how to form a mapping-row-basis out of joining maps. In many ways, the approaches are similar; the line of duality is a lot like a mirror in that way.


When we join two maps, we put them together into a matrix, just like how we put two vectors together into a matrix. But again, where vectors are vertical columns, maps are horizontal rows. So when we combine {{map|5 8 12}} and {{map|7 11 16}}, we get a matrix that looks like
When we join two maps, we put them together into a matrix, just like how we put two vectors together into a matrix. But again, where vectors are vertical columns, maps are horizontal rows. So when we combine {{map|5 8 12}} and {{map|7 11 16}}, we get a matrix that looks like
Line 743: Line 743:
Again, we find ourselves in the position where we must reconcile a strange new representation of an object with an existing one. We already know that meantone can be represented by the vector for the comma it tempers out, {{vector|-4 4 -1}}. How are these two representations related?
Again, we find ourselves in the position where we must reconcile a strange new representation of an object with an existing one. We already know that meantone can be represented by the vector for the comma it tempers out, {{vector|-4 4 -1}}. How are these two representations related?


Well, it’s actually quite simple! They’re related in the same way as {{vector|{{map|19 30 44}}}} was related to {{map|{{vector|-4 4 -1}} {{vector|-10 -1 5}}}}: by the null-space operation. Specifically, {{map|{{vector|-4 4 -1}}}} is a basis for the null-space of the temperament with mapping-row basis {{vector|{{map|5 8 12}} {{map|7 11 16}}}}, because it is the minimal representation of all the commas tempered out by meantone temperament, which means mapped to zeros by the meantone mapping.
Well, it’s actually quite simple! They’re related in the same way as {{vector|{{map|19 30 44}}}} was related to {{map|{{vector|-4 4 -1}} {{vector|-10 -1 5}}}}: by the null-space operation. Specifically, {{map|{{vector|-4 4 -1}}}} is a basis for the null-space of the temperament with mapping-row-basis {{vector|{{map|5 8 12}} {{map|7 11 16}}}}, because it is the minimal representation of all the commas tempered out by meantone temperament, which means mapped to zeros by the meantone mapping.


We can work this one out by hand too:
We can work this one out by hand too:
Line 832: Line 832:
|}
|}


And there’s our {{map|{{vector|4 -4 1}}}}<ref>Interestingly, the other two columns in the bottom half of this matrix are valuable too. They tell you prime count vectors that would work for your generators. In this case, the two vectors are {{vector|1 0 0}} and {{vector|-8 5 0}}, so that tells you that the octave and the [[diesis]] could generate meantone. They're not necessarily the ''best'' generators, though. You can find other generators from these by adding or subtracting temperament commas, because of course — being tempered out — don't change anything.</ref>. Feel free to try reversing the operation by working out the mapping-row basis from this if you like. And/or you could try working out that {{map|{{vector|4 -4 1}}}} is a basis for the null-space of any other combination of ETs we found that could specify meantone, such as 7&12, or 12&19.
And there’s our {{map|{{vector|4 -4 1}}}}<ref>Interestingly, the other two columns in the bottom half of this matrix are valuable too. They tell you prime count vectors that would work for your generators. In this case, the two vectors are {{vector|1 0 0}} and {{vector|-8 5 0}}, so that tells you that the octave and the [[diesis]] could generate meantone. They're not necessarily the ''best'' generators, though. You can find other generators from these by adding or subtracting temperament commas, because of course — being tempered out — don't change anything.</ref>. Feel free to try reversing the operation by working out the mapping-row-basis from this if you like. And/or you could try working out that {{map|{{vector|4 -4 1}}}} is a basis for the null-space of any other combination of ETs we found that could specify meantone, such as 7&12, or 12&19.


It’s worth noting that, just as 2 commas were exactly enough to define a rank-1 temperament, though there were an infinitude of equivalent pairs of commas we could choose to fill that role, there’s a similar thing happening here, where 2 maps are exactly enough to define a rank-2 temperament, but an infinitude of equivalent pairs of them. We can even see that we can convert between these maps using Gauss-Jordan addition and subtraction, just like we could manipulate commas to get from one to the other. For example, the map for 12-ET {{map|12 19 28}} is exactly what you get from summing the terms of 5-ET {{map|5 8 12}} and 7-ET {{map|7 11 16}}: {{map|5+7 8+11 12+16}} = {{map|12 19 28}}. Cool!
It’s worth noting that, just as 2 commas were exactly enough to define a rank-1 temperament, though there were an infinitude of equivalent pairs of commas we could choose to fill that role, there’s a similar thing happening here, where 2 maps are exactly enough to define a rank-2 temperament, but an infinitude of equivalent pairs of them. We can even see that we can convert between these maps using Gauss-Jordan addition and subtraction, just like we could manipulate commas to get from one to the other. For example, the map for 12-ET {{map|12 19 28}} is exactly what you get from summing the terms of 5-ET {{map|5 8 12}} and 7-ET {{map|7 11 16}}: {{map|5+7 8+11 12+16}} = {{map|12 19 28}}. Cool!
Line 845: Line 845:
</math>
</math>


supposed to be a mapping-row basis, or mapping, for meantone? What does that even mean?
supposed to be a mapping-row-basis, or mapping, for meantone? What does that even mean?


=== rank-2 mappings ===
=== rank-2 mappings ===
Line 945: Line 945:


* We’ve made it to a critical point here: we are now able to explain why RTT is called “regular” temperament theory. Regular here is a mathematical term, and I don’t have a straightforward definition of it for you, but it apparently refers to the fact that all intervals in the tuning are combinations of only these specified generators. So there you go.
* We’ve made it to a critical point here: we are now able to explain why RTT is called “regular” temperament theory. Regular here is a mathematical term, and I don’t have a straightforward definition of it for you, but it apparently refers to the fact that all intervals in the tuning are combinations of only these specified generators. So there you go.
* Both {{vector|{{map|5 8 12}} {{map|7 11 16}}}} and {{vector|{{map|1 1 0}} {{map|0 1 4}}}} are equivalent mappings, then. In other words, they are both mapping-row bases of the same mapping row-space. Converting between them is sometimes called a “change of basis”, though this is a different sort of “basis” than the basis of a space, like comma bases or mapping-row bases. Using what we know now, it may be clearer to think of it as a “change of generators”. We’ll look at this idea more in the tuning section later.
* Both {{vector|{{map|5 8 12}} {{map|7 11 16}}}} and {{vector|{{map|1 1 0}} {{map|0 1 4}}}} are equivalent mappings, then. In other words, they are both mapping-row-bases of the same mapping row-space. Converting between them is sometimes called a “change of basis”, though this is a different sort of “basis” than the basis of a space, like comma-bases or mapping-row-bases. Using what we know now, it may be clearer to think of it as a “change of generators”. We’ll look at this idea more in the tuning section later.
* Note well: this is not to say that {{map|1 1 0}} or {{map|0 1 4}} ''are'' the generators for meantone. They are generator ''mappings'': when assembled together, they collectively describe behavior of the generators, but they are ''not'' themselves the generators. This situation can be confusing; it confused me for many weeks. I thought of it this way: because the first generator is 2/1 — i.e. {{vector|1 0 0}} maps to {{vector|1 0}} — referring to {{map|1 1 0}} as the octave or period seems reasonable and is effective when the context is clear. And similarly, because the second generator is 3/2 — i.e. {{vector|-1 1 0}} maps to {{vector|0 1}} — referring to {{map|0 1 4}} as the fifth or the generator seems reasonable as is effective when the context is clear. But it's critical to understand that the first generator "being" the octave here is ''contingent upon the definition of the second generator'', and vice versa, the second generator "being" the fifth here is ''contingent upon the definition of the first generator''. Considering {{map|1 1 0}} or {{map|0 1 4}} individually, we cannot say what intervals the generators are. What if the mapping was {{vector|{{map|0 1 4}} {{map|1 2 4}}}} instead? We'd still have the first generator mapping as {{map|1 1 0}}, but now that the second generator mapping is {{map|1 2 4}}, the two generators must be the fourth and the fifth. In summary, neither mapping-row describes a generator in a vacuum, but does so in the context of all the other mapping-rows.
* Note well: this is not to say that {{map|1 1 0}} or {{map|0 1 4}} ''are'' the generators for meantone. They are generator ''mappings'': when assembled together, they collectively describe behavior of the generators, but they are ''not'' themselves the generators. This situation can be confusing; it confused me for many weeks. I thought of it this way: because the first generator is 2/1 — i.e. {{vector|1 0 0}} maps to {{vector|1 0}} — referring to {{map|1 1 0}} as the octave or period seems reasonable and is effective when the context is clear. And similarly, because the second generator is 3/2 — i.e. {{vector|-1 1 0}} maps to {{vector|0 1}} — referring to {{map|0 1 4}} as the fifth or the generator seems reasonable as is effective when the context is clear. But it's critical to understand that the first generator "being" the octave here is ''contingent upon the definition of the second generator'', and vice versa, the second generator "being" the fifth here is ''contingent upon the definition of the first generator''. Considering {{map|1 1 0}} or {{map|0 1 4}} individually, we cannot say what intervals the generators are. What if the mapping was {{vector|{{map|0 1 4}} {{map|1 2 4}}}} instead? We'd still have the first generator mapping as {{map|1 1 0}}, but now that the second generator mapping is {{map|1 2 4}}, the two generators must be the fourth and the fifth. In summary, neither mapping-row describes a generator in a vacuum, but does so in the context of all the other mapping-rows.
* This also gives us a new way to think about the scale tree patterns. Remember how earlier we pointed out that {{map|12 19 28}} was simply {{map|5 8 12}} + {{map|7 11 16}}? Well, if {{vector|{{map|5 8 12}} {{map|7 11 16}}}} is a way of expressing meantone in terms of its two generators, you can imagine that 12-ET is the point where those two generators converge on being the same exact size<ref>For real numbers <span><math>p,q</math></span> we can make the two generators respectively <span><math>\frac{p}{5p+7q}</math></span> and <span><math>\frac{q}{5p+7q}</math></span> of an octave, e.g. <span><math>(p,q)=(1,0)</math></span> for 5-ET, <span><math>(0,1)</math></span> for 7-ET, <span><math>(1,1)</math></span> for 12-ET, and many other possibilities.</ref>. If they become the same size, then they aren’t truly two separate generators, or at least there’s no effect in thinking of them as separate. And so for convenience you can simply combine their mappings into one. You could imagine gradually increasing the size of one generator and decreasing the size of the other until they were both 100¢. As long as you maintain the correct proportion, you'll stay along the meantone line..
* This also gives us a new way to think about the scale tree patterns. Remember how earlier we pointed out that {{map|12 19 28}} was simply {{map|5 8 12}} + {{map|7 11 16}}? Well, if {{vector|{{map|5 8 12}} {{map|7 11 16}}}} is a way of expressing meantone in terms of its two generators, you can imagine that 12-ET is the point where those two generators converge on being the same exact size<ref>For real numbers <span><math>p,q</math></span> we can make the two generators respectively <span><math>\frac{p}{5p+7q}</math></span> and <span><math>\frac{q}{5p+7q}</math></span> of an octave, e.g. <span><math>(p,q)=(1,0)</math></span> for 5-ET, <span><math>(0,1)</math></span> for 7-ET, <span><math>(1,1)</math></span> for 12-ET, and many other possibilities.</ref>. If they become the same size, then they aren’t truly two separate generators, or at least there’s no effect in thinking of them as separate. And so for convenience you can simply combine their mappings into one. You could imagine gradually increasing the size of one generator and decreasing the size of the other until they were both 100¢. As long as you maintain the correct proportion, you'll stay along the meantone line..
Line 1,069: Line 1,069:
Because we're starting in 4D here, if we temper out one comma, we still have a rank-3 temperament, with 3 independent generators. Temper out two commas, and we have a rank-2 temperament, with 2 generators (remember, one of them is the period, which is usually the octave). And we’d need to temper out 3 commas here to pinpoint a single ET.
Because we're starting in 4D here, if we temper out one comma, we still have a rank-3 temperament, with 3 independent generators. Temper out two commas, and we have a rank-2 temperament, with 2 generators (remember, one of them is the period, which is usually the octave). And we’d need to temper out 3 commas here to pinpoint a single ET.


The particular case I’d like to focus our attention on here is the rank-2 case. This is the first situation we’ve been able to achieve which boasts both an infinitude of matrices made from comma vectors which can represent the temperament by its comma-basis, as well as an infinitude of matrices made from ET maps which can represent a temperament by its mapping-row basis. These are not contradictory. Let’s look at an example: septimal meantone.
The particular case I’d like to focus our attention on here is the rank-2 case. This is the first situation we’ve been able to achieve which boasts both an infinitude of matrices made from comma vectors which can represent the temperament by its comma-basis, as well as an infinitude of matrices made from ET maps which can represent a temperament by its mapping-row-basis. These are not contradictory. Let’s look at an example: septimal meantone.


Septimal meantone may be thought of as the temperament which tempers out the meantone comma and the starling comma (126/125), or “meantone|starling”. But it may also be thought of as “meantone|marvel”, where the marvel comma is 225/224. We don’t even necessarily need the meantone comma at all: it can even be “starling|marvel”! This speaks to the fact that any temperament with a nullity greater than 1 has an infinitude of equivalent comma bases. It’s up to you which one to use.
Septimal meantone may be thought of as the temperament which tempers out the meantone comma and the starling comma (126/125), or “meantone|starling”. But it may also be thought of as “meantone|marvel”, where the marvel comma is 225/224. We don’t even necessarily need the meantone comma at all: it can even be “starling|marvel”! This speaks to the fact that any temperament with a nullity greater than 1 has an infinitude of equivalent comma-bases. It’s up to you which one to use.


On the other side of duality, septimal meantone’s mapping-row basis has two rows, corresponding to its two generators. We don’t have PTS for 7-limit JI handy, but because septimal meantone includes, or extends plain meantone, we can still refer to 5-limit PTS, and pick ETs from the meantone line there. The difference is that this time we need to include their 7-term. So the join of {{map|12 19 28 34}} and {{map|19 30 44 53}} would work. But so would {{map|19 30 44 53}} and {{map|31 49 72 87}}. We have an infinitude of options on this side of duality too, but here it’s not because our nullity is greater than 1, but because our rank is greater than 1.
On the other side of duality, septimal meantone’s mapping-row-basis has two rows, corresponding to its two generators. We don’t have PTS for 7-limit JI handy, but because septimal meantone includes, or extends plain meantone, we can still refer to 5-limit PTS, and pick ETs from the meantone line there. The difference is that this time we need to include their 7-term. So the join of {{map|12 19 28 34}} and {{map|19 30 44 53}} would work. But so would {{map|19 30 44 53}} and {{map|31 49 72 87}}. We have an infinitude of options on this side of duality too, but here it’s not because our nullity is greater than 1, but because our rank is greater than 1.


=== canonical form ===
=== canonical form ===
Line 1,097: Line 1,097:
The latter is sometimes called the “musician’s form” of the temperament, because it’s easy to reason about from a musical perspective. But it turns out there’s not a particularly clean function for consistently getting to it, or even defining it.
The latter is sometimes called the “musician’s form” of the temperament, because it’s easy to reason about from a musical perspective. But it turns out there’s not a particularly clean function for consistently getting to it, or even defining it.


Another form you might want the mapping-row basis in is the type Graham Breed's temperament finder puts them in, where all values in a mapping-row basis row may be negative, but this is in the service of the generator being positive, and less than half the size of the period. For example, for meantone, we'd want the fourth instead of the fifth, and we can see that
Another form you might want the mapping-row-basis in is the type Graham Breed's temperament finder puts them in, where all values in a mapping-row-basis row may be negative, but this is in the service of the generator being positive, and less than half the size of the period. For example, for meantone, we'd want the fourth instead of the fifth, and we can see that


<math>
<math>
Line 1,108: Line 1,108:
maps the fourth (4/3, {{vector|2 -1 0 }}) to {{vector|0 1}}.
maps the fourth (4/3, {{vector|2 -1 0 }}) to {{vector|0 1}}.


It’s often the case that a temperament’s nullity is greater than 1 or its rank is greater than 1, and therefore we have an infinitude of equivalent ways of expressing the comma-basis or the mapping-row basis. This can be problematic, if we want to efficiently communicate about and catalog temperaments. It’s good to have a standardized form in these cases. The approach RTT takes here is to get these matrices into '''“canonical” form'''. In plain words, this just means: we have a function which takes in a matrix and spits out a matrix of the same shape, and no matter which matrix we input from a set of matrices which we consider all to be equivalent to each other, it will spit out the same result. This output is what we call the “canonical” matrix, and it can therefore uniquely identify a temperament.
It’s often the case that a temperament’s nullity is greater than 1 or its rank is greater than 1, and therefore we have an infinitude of equivalent ways of expressing the comma-basis or the mapping-row-basis. This can be problematic, if we want to efficiently communicate about and catalog temperaments. It’s good to have a standardized form in these cases. The approach RTT takes here is to get these matrices into '''“canonical” form'''. In plain words, this just means: we have a function which takes in a matrix and spits out a matrix of the same shape, and no matter which matrix we input from a set of matrices which we consider all to be equivalent to each other, it will spit out the same result. This output is what we call the “canonical” matrix, and it can therefore uniquely identify a temperament.


To be clear, canonical form isn’t necessary to avoid ambiguity: you will never find a comma-basis that could represent more than one temperament.
To be clear, canonical form isn’t necessary to avoid ambiguity: you will never find a comma-basis that could represent more than one temperament.


I've seen many specialized matrix forms used in RTT for problems like this, such as "[[IRREF|integer canonical form]]", [https://en.wikipedia.org/wiki/Hermite_normal_form Hermite Normal Form], and maybe others. What we will be using here is a form I’ve developed recently in collaboration with Dave Keenan that we’re calling [[TBD canonical form]].<ref>Historically, Hermite Normal Form was used as if it gave a unique identifier for each temperament, when in fact it did not. It failed to remove possibly-hidden common factors in the columns of comma bases and rows of mapping-row bases, leading to situations which were named "[[torsion]]" and "[[contorsion]]", respectively. Hermite Canonical Form goes too far; it reduces the matrix's diagonals to all 1's or 0's, which loses important information for temperaments with non-octave periods. Integer canonical form removes such common factors without compromising non-octave periods, therefore truly giving a unique identifier, and also eliminating the need to deal with enfactored mappings or comma-bases.</ref>.
I've seen many specialized matrix forms used in RTT for problems like this, such as "[[IRREF|integer canonical form]]", [https://en.wikipedia.org/wiki/Hermite_normal_form Hermite Normal Form], and maybe others. What we will be using here is a form I’ve developed recently in collaboration with Dave Keenan that we’re calling [[TBD canonical form]].<ref>Historically, Hermite Normal Form was used as if it gave a unique identifier for each temperament, when in fact it did not. It failed to remove possibly-hidden common factors in the columns of comma-bases and rows of mapping-row-bases, leading to situations which were named "[[torsion]]" and "[[contorsion]]", respectively. Hermite Canonical Form goes too far; it reduces the matrix's diagonals to all 1's or 0's, which loses important information for temperaments with non-octave periods. Integer canonical form removes such common factors without compromising non-octave periods, therefore truly giving a unique identifier, and also eliminating the need to deal with enfactored mappings or comma-bases.</ref>.


For example, the canonical form of meantone is:
For example, the canonical form of meantone is:
Line 1,125: Line 1,125:
If you take the integer canonical form of {{vector|{{map|5 8 12}} {{map|7 11 16}}}}, that’s what you get. It’s also what you get if you take the integer canonical form of {{vector|{{map|12 19 28}} {{map|19 30 44}}}}, etc. That’s the power of canonicalization.
If you take the integer canonical form of {{vector|{{map|5 8 12}} {{map|7 11 16}}}}, that’s what you get. It’s also what you get if you take the integer canonical form of {{vector|{{map|12 19 28}} {{map|19 30 44}}}}, etc. That’s the power of canonicalization.


To find the integer canonical form, we can combine the two processes we already know how to do: null-space for getting from a mapping-row basis to a comma-basis, and anti-null-space to get from a comma-basis to a mapping-row basis. Basically, to achieve canonical form of one type of basis, we convert it into the other type of basis, then back, and voilà: canonicalization.
To find the integer canonical form, we can combine the two processes we already know how to do: null-space for getting from a mapping-row-basis to a comma-basis, and anti-null-space to get from a comma-basis to a mapping-row-basis. Basically, to achieve canonical form of one type of basis, we convert it into the other type of basis, then back, and voilà: canonicalization.


For this, we need to up our game to Wolfram computable notebooks. You can click "Make Your Own Copy" in the top left of the screen if you want to modify this notebook to make your own calculations.
For this, we need to up our game to Wolfram computable notebooks. You can click "Make Your Own Copy" in the top left of the screen if you want to modify this notebook to make your own calculations.
Line 1,168: Line 1,168:
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: {{multicovector|1 4 4}}. As you can see, it is a bicovector, or bimap, because it has two of each bracket.
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: {{multicovector|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 canonical form of a temperament’s mapping-row basis: the process for converting a mapping-row basis to a multimap will convert any equivalent mapping-row basis to the same exact multimap. In other words, a multimap can serve as a unique identifier for its temperament.
Why care about multimaps? Well, a key reason is that they can serve the same purpose as the canonical form of a temperament’s mapping-row-basis: the process for converting a mapping-row-basis to a multimap will convert any equivalent mapping-row-basis to the same exact multimap. In other words, a multimap can serve as a unique identifier for its temperament.


Alright, then, sounds great! But how do I convert a mapping-row basis to a multimap? The process is doable. It’s closely related to the wedge product<ref>The wedge product is also known as the exterior product. Exterior and interior products (∧ and ⨼) should not be confused with outer and inner products, which in RTT are ordinary matrix products between a vector and a covector. The outer product gives a matrix and the inner product a scalar. e.g. [1 2⟩⟨3 4] = ⟨[3 4⟩ [6 8⟩] and ⟨3 4][1 2⟩ = 11. In our application, the inner product is the same as the dot product used for maps and intervals.</ref> (hence the name “wedgie”), which we write it with the symbol ∧.
Alright, then, sounds great! But how do I convert a mapping-row-basis to a multimap? The process is doable. It’s closely related to the wedge product<ref>The wedge product is also known as the exterior product. Exterior and interior products (∧ and ⨼) should not be confused with outer and inner products, which in RTT are ordinary matrix products between a vector and a covector. The outer product gives a matrix and the inner product a scalar. e.g. [1 2⟩⟨3 4] = ⟨[3 4⟩ [6 8⟩] and ⟨3 4][1 2⟩ = 11. In our application, the inner product is the same as the dot product used for maps and intervals.</ref> (hence the name “wedgie”), which we write it with the symbol ∧.


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 different from the strict definition of the wedge 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.
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 different from the strict definition of the wedge 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>.
# 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>.
# 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-row basis and putting them together.
# 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-row-basis and putting them together.
# Take each matrix's determinant.
# Take each matrix's determinant.
# Set the results inside <span><math>r</math></span> brackets.
# Set the results inside <span><math>r</math></span> brackets.
Line 1,201: Line 1,201:
We have rank <span><math>r</math></span> = 2, so we’re looking for every combination of two primes. That’s out of the three total primes we have in the 5-limit: 2, 3, and 5. So those combinations are <span><math>(2,3)</math></span>, <span><math>(2,5)</math></span>, and <span><math>(3,5)</math></span>. Those are already in lexicographic order, or in other words, just like how alphabetic order works, but generalized to work for size of numbers too (so that 11 comes after 2, not before).
We have rank <span><math>r</math></span> = 2, so we’re looking for every combination of two primes. That’s out of the three total primes we have in the 5-limit: 2, 3, and 5. So those combinations are <span><math>(2,3)</math></span>, <span><math>(2,5)</math></span>, and <span><math>(3,5)</math></span>. Those are already in lexicographic order, or in other words, just like how alphabetic order works, but generalized to work for size of numbers too (so that 11 comes after 2, not before).


Here's the meantone mapping-row basis again, with some color applied which should help identify the combinations:
Here's the meantone mapping-row-basis again, with some color applied which should help identify the combinations:


<math>
<math>
Line 1,210: Line 1,210:
</math>
</math>


So now each of those combinations becomes a square matrix, made out of bits from the mapping-row basis, which again is:
So now each of those combinations becomes a square matrix, made out of bits from the mapping-row-basis, which again is:


<math>
<math>
Line 1,268: Line 1,268:
Let’s try a slightly harder example now: a rank-3 temperament, and in the 7-limit. There are four different ways to take 3 of 4 primes: <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>.
Let’s try a slightly harder example now: a rank-3 temperament, and in the 7-limit. There are four different ways to take 3 of 4 primes: <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>.


If the mapping-row basis is
If the mapping-row-basis is


<math>
<math>
Line 1,318: Line 1,318:
|}
|}


Now for canonical form. We need the first term to be positive; this doesn’t make a difference in how things behave, but is done because it canonicalizes 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-row basis, which doesn’t affect how it works as a mapping at all, or mean there's anything different about the temperament). And so we change the signs<ref>If it helps you, you could think of this sign-changing step as paired with the GCD extraction step, if you think of it like extracting a GCD of -1.</ref>, 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>. There's no GCD to extract. So now we have {{multicovector|rank=3|2 -3 -1 11}}.
Now for canonical form. We need the first term to be positive; this doesn’t make a difference in how things behave, but is done because it canonicalizes 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-row-basis, which doesn’t affect how it works as a mapping at all, or mean there's anything different about the temperament). And so we change the signs<ref>If it helps you, you could think of this sign-changing step as paired with the GCD extraction step, if you think of it like extracting a GCD of -1.</ref>, 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>. There's no GCD to extract. So now we have {{multicovector|rank=3|2 -3 -1 11}}.


As for getting from a multimap back to the mapping-row basis, 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 find yourself with a multimap but without a corresponding mapping-row basis anyway.
As for getting from a multimap back to the mapping-row-basis, 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 find yourself with a multimap but without a corresponding mapping-row-basis anyway.


=== multicommas ===
=== multicommas ===
Line 1,328: Line 1,328:
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. Analogously, we call the thing the multivector represents a '''multicomma'''.
# 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 multicomma from a comma-basis much in the same way we can calculate a multimap from a mapping-row basis
# We can calculate a multicomma from a comma-basis much in the same way we can calculate a multimap from a mapping-row-basis
# We can convert between multimaps and multicommas using an operation called “taking '''[[the dual]]'''”<ref>This operation uses the same process as is used for finding the complement in exterior algebra, however, whereas exterior algebra does not convert between vectors and covectors (it can be used on either one, staying within that category), with RTT's dual you switch which type it is as the last step. More details can be found below. The dual we use in RTT is #2 in the table. It essentially combines elements from both #1 and #3.
# We can convert between multimaps and multicommas using an operation called “taking '''[[the dual]]'''”<ref>This operation uses the same process as is used for finding the complement in exterior algebra, however, whereas exterior algebra does not convert between vectors and covectors (it can be used on either one, staying within that category), with RTT's dual you switch which type it is as the last step. More details can be found below. The dual we use in RTT is #2 in the table. It essentially combines elements from both #1 and #3.


Line 1,586: Line 1,586:
So we now understand how to get to canonical 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!
So we now understand how to get to canonical 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 canonical multimap pertains to a different combination of primes. We already know this: it’s how we calculated it from the mapping-row basis. For example, in the canonical multimap for meantone, {{multicovector|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>.
The first thing to understand is that each term of the canonical multimap pertains to a different combination of primes. We already know this: it’s how we calculated it from the mapping-row-basis. For example, in the canonical multimap for meantone, {{multicovector|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 canonical 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.
Now, let’s convert every term of the canonical 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.
Line 1,600: Line 1,600:
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 canonical 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 canonical multimap term is zero generates so little of the tempered lattice that it's completely missing one 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 canonical multimap {{map|rank=3|0 1 1 4 4 -8 4 4 -12 -16}} and mapping-row basis {{vector|{{map|1 0 -4 0 -12}} {{map|0 1 4 0 8}} {{map|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.
One day you might come across a canonical 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 canonical multimap term is zero generates so little of the tempered lattice that it's completely missing one 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 canonical multimap {{map|rank=3|0 1 1 4 4 -8 4 4 -12 -16}} and mapping-row-basis {{vector|{{map|1 0 -4 0 -12}} {{map|0 1 4 0 8}} {{map|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.
Line 1,619: Line 1,619:
!RTT application
!RTT application
|map, mapping-row (often an ET)
|map, mapping-row (often an ET)
|mapping, mapping-row basis
|mapping, mapping-row-basis
|multimap
|multimap
|multicomma
|multicomma