Normal forms: Difference between revisions

m Notes & references
m Normal forms for mappings: hyphenation, de-bold anything that's not a redirect target, and misc. style fixes
Line 40: Line 40:
The key advantage of the defactored Hermite form is its purity and simplicity, while sidestepping many of the issues with [[contorsion]]/[[enfactoring]] matrices. If your primary need is uniquely identifying temperaments, this is the ideal choice. The remaining normal forms each introduce further constraints on the sizes of the generators, which can be nice and convenient if that matters for your use case, but otherwise is unnecessary.
The key advantage of the defactored Hermite form is its purity and simplicity, while sidestepping many of the issues with [[contorsion]]/[[enfactoring]] matrices. If your primary need is uniquely identifying temperaments, this is the ideal choice. The remaining normal forms each introduce further constraints on the sizes of the generators, which can be nice and convenient if that matters for your use case, but otherwise is unnecessary.


=== Positive generator forms ===
=== Positive-generator forms ===
Even though by using the HNF the defactored Hermite form ensures that the pivot (first nonzero entry) of each mapping row is a positive ''number'', this does not necessarily mean that the corresponding generators are all positive ''in pitch''. For example, the defactored Hermite form of porcupine is the matrix {{rket| {{map| 1 2 3 }} {{map| 0 3 5 }} }}. The second column of this matrix tells us it takes 2 of the first generator and 3 of the second generator to reach its approximation of 3/1. But as we can tell from the first column of this matrix, it takes only 1 of the first generator and nothing else to reach its approximation of 2/1. Therefore, if we move by 2 of the first generator, we are already at this temperament's approximation of 4/1, and so if we still need to move by 3 of the second generator to reach its approximation of 3/1, then the second generator must be negative. Indeed, it is about 163 cents ''downward'' in pitch. Negative generators like this can be surprising and confusing, and so ''positive generator forms'' were developed to address this concern.  
Even though by using the HNF the defactored Hermite form ensures that the pivot (first nonzero entry) of each mapping row is a positive ''number'', this does not necessarily mean that the corresponding generators are all positive ''in pitch''. For example, the defactored Hermite form of porcupine is the matrix {{rket| {{map| 1 2 3 }} {{map| 0 3 5 }} }}. The second column of this matrix tells us it takes 2 of the first generator and 3 of the second generator to reach its approximation of 3/1. But as we can tell from the first column of this matrix, it takes only 1 of the first generator and nothing else to reach its approximation of 2/1. Therefore, if we move by 2 of the first generator, we are already at this temperament's approximation of 4/1, and so if we still need to move by 3 of the second generator to reach its approximation of 3/1, then the second generator must be negative. Indeed, it is about 163 cents ''downward'' in pitch. Negative generators like this can be surprising and confusing, and so ''positive-generator forms'' were developed to address this concern.  


To obtain one of these forms, we first need to know whether each generator is positive or negative in pitch. This is conventionally found through the [[Frobenius generator]]s of the temperament, where we find the [[pseudoinverse]] of the mapping ''V'', which we notate ''V''<sup>+</sup>, and multiply this from the left by the just tuning map, {{nowrap| ''J'' {{=}} {{val| 1 log<sub>2</sub>3 log<sub>2</sub>5 … log<sub>2</sub>''p'' }} }}. Otherwise normed tunings technically do the same. [[Flora Canou]]'s [https://github.com/FloraCanou/temperament_evaluator Temperament Evaluator] has adopted a faster method called ''fast approximate tuning'' (''FX tuning''), which short-circuits the question of optimization and focuses on the abstract property of how a temperament splits intervals<ref>[https://github.com/FloraCanou/temperament_evaluator/wiki/Performance-of-FX-tuning Github | ''Performance of FX tuning'' · FloraCanou/temperament_evaluator Wiki]</ref>.  
To obtain one of these forms, we first need to know whether each generator is positive or negative in pitch. This is conventionally found through the [[Frobenius generator]]s of the temperament, where we find the [[pseudoinverse]] of the mapping ''V'', which we notate ''V''<sup>+</sup>, and multiply this from the left by the just tuning map, {{nowrap| ''J'' {{=}} {{val| 1 log<sub>2</sub>3 log<sub>2</sub>5 … log<sub>2</sub>''p'' }} }}. Otherwise normed tunings technically do the same. [[Flora Canou]]'s [https://github.com/FloraCanou/temperament_evaluator Temperament Evaluator] has adopted a faster method called ''fast approximate tuning'' (''FX tuning''), which short-circuits the question of optimization and focuses on the abstract property of how a temperament splits intervals<ref>[https://github.com/FloraCanou/temperament_evaluator/wiki/Performance-of-FX-tuning Github | ''Performance of FX tuning'' · FloraCanou/temperament_evaluator Wiki]</ref>.  


The first positive generator form, called <code>"flip"</code> in the Temperament Evaluator, changes the signs of every entry in a row if the corresponding generator is negative.  
The first positive-generator form, called <code>"flip"</code> in the Temperament Evaluator, changes the signs of every entry in a row if the corresponding generator is negative.  


Another form, called <code>shift</code>, also makes sure the generators are positive, but it maniplates the mapping to equave-reduce the negative generators instead, except when the temperament is (-1)-sheared, in which case it uses the <code>flip</code> routine. This form may be more musically useful as the prime harmonics are more often in positive numbers of generator steps.  
Another form, called <code>shift</code>, also makes sure the generators are positive, but it maniplates the mapping to equave-reduce the negative generators instead, except when the temperament is (-1)-sheared, in which case it uses the <code>flip</code> routine. This form may be more musically useful as the prime harmonics are more often in positive numbers of generator steps.  
Line 51: Line 51:
'''Note:''' Most mappings (though not the "[[mapping to lattice]]") listed on temperament data pages of this wiki are in the <code>"flip"</code> form.  
'''Note:''' Most mappings (though not the "[[mapping to lattice]]") listed on temperament data pages of this wiki are in the <code>"flip"</code> form.  


The generators in defactored Hermite form of septimal meantone is positive already, so its positive generator forms are the same as its defactored Hermite form, {{mapping| 1 0 -4 -13 | 0 1 4 10 }}, corresponding to generators of ~2/1 and ~3/1. An example of positive generator form that is different from the defactored Hermite form is the porcupine temperament, elaborated below.  
The generators in defactored Hermite form of septimal meantone is positive already, so its positive-generator forms are the same as its defactored Hermite form, {{mapping| 1 0 -4 -13 | 0 1 4 10 }}, corresponding to generators of ~2/1 and ~3/1. An example of positive-generator form that is different from the defactored Hermite form is the porcupine temperament, elaborated below.  


{{Databox| Positive generator form example |  
{{Databox| Positive-generator form example |  
The defactored Hermite form mapping matrix for porcupine is
The defactored Hermite form mapping matrix for porcupine is


Line 151: Line 151:
}}
}}


=== Equave-reduced generator form ===
=== Equave-reduced-generator form ===
The ''equave-reduced generator form''' has the matrix modified from the defactored Hermite normal form so that each generator is equave-reduced, where the [[equave]] can be found as the formal prime represented by the first ''column'' of the matrix, which is usually the octave. For more information, see [[Octave reduction #Generalization]]. This form is closely related to [[ploidacot]]s, so it may be casually called the ''ploidacot form''.  
The ''equave-reduced-generator form'' has the matrix modified from the defactored Hermite normal form so that each generator is equave-reduced, where the [[equave]] can be found as the formal prime represented by the first ''column'' of the matrix, which is usually the octave. For more information, see [[Octave reduction #Generalization]]. This form is closely related to [[ploidacot]]s, so it may be casually called the ''ploidacot form''.  


Consider the case of septimal meantone. As we know, its defactored Hermite normal form is {{rket| {{map| 1 0 -4 -13 }} {{map| 0 1 4 10 }} }} which corresponds to generators of ~2/1 and ~3/1. In this case, as is typical, the formal prime represented by the first column of the matrix is 2, and so the equave is the octave. Therefore, all generators must be octave-reduced. But our second generator is ~3/1, which is not octave-reduced. We must alter the mapping in such a way that this row represents a generator of ~3/2 instead. We can do that here by adding the second row of the mapping to the first: {{rket| {{map| 1 1 0 -3 }} {{map| 0 1 4 10 }} }}. So that is septimal meantone's equave-reduced generator form, corresponding to generators of ~2/1 and ~3/2.  
Consider the case of septimal meantone. As we know, its defactored Hermite normal form is {{rket| {{map| 1 0 -4 -13 }} {{map| 0 1 4 10 }} }} which corresponds to generators of ~2/1 and ~3/1. In this case, as is typical, the formal prime represented by the first column of the matrix is 2, and so the equave is the octave. Therefore, all generators must be octave-reduced. But our second generator is ~3/1, which is not octave-reduced. We must alter the mapping in such a way that this row represents a generator of ~3/2 instead. We can do that here by adding the second row of the mapping to the first: {{rket| {{map| 1 1 0 -3 }} {{map| 0 1 4 10 }} }}. So that is septimal meantone's equave-reduced-generator form, corresponding to generators of ~2/1 and ~3/2.  


Probably the most reliable way to achieve equave-reduced generator form in general, however, is not to work with a [[generator preimage]] such as ~3/1 and ~3/2. Instead the Frobenius generators may be used, as described in the positive generator form section just above, and reduction can be accomplished by calling modulo on their cents. For a general discussion of how to manipulate the sizes of generators in this way, see [[Generator size manipulation]].
Probably the most reliable way to achieve equave-reduced-generator form in general, however, is not to work with a [[generator preimage]] such as ~3/1 and ~3/2. Instead the Frobenius generators may be used, as described in the positive-generator form section just above, and reduction can be accomplished by calling modulo on their cents. For a general discussion of how to manipulate the sizes of generators in this way, see [[Generator size manipulation]].


This form is implemented in the Temperament Evaluator as <code>"reduce"</code>, which also makes an exception for when the temperament is (-1)-sheared.  
This form is implemented in the Temperament Evaluator as <code>"reduce"</code>, which also makes an exception for when the temperament is (-1)-sheared.  


The '''positive equave-reduced generator form''' is similar to the equave-reduced generator form, but starts from the positive generator form instead of the defactored Hermite normal form.  
The ''positive-equave-reduced-generator form'' is similar to the equave-reduced-generator form, but starts from the positive-generator form instead of the defactored Hermite normal form.  


=== Minimal generator form ===
=== Minimal-generator form ===
The '''minimal generator form''' (or '''mingen form''') is a form specific to rank-2 temperaments, where the generator is positive and no greater than half the period.<ref group="note">This is somewhat like octave reduction combined with octave inversion, because you can't just add or subtract half octaves until it's between 0 and 600 cents; you have to add or subtract octaves until it's between −600 and +600 cents, then multiply by −1 if it's negative.</ref><ref group="note">You could always find a smaller and smaller generator by going negative, so this assumes positive generators.</ref>
The ''minimal-generator form'' (or '''mingen form''') is a form specific to rank-2 temperaments, where the generator is positive and no greater than half the period.<ref group="note">This is somewhat like octave reduction combined with octave inversion, because you can't just add or subtract half octaves until it's between 0 and 600 cents; you have to add or subtract octaves until it's between −600 and +600 cents, then multiply by −1 if it's negative.</ref><ref group="note">You could always find a smaller and smaller generator by going negative, so this assumes positive generators.</ref>


[[Graham Breed]]'s [http://x31eq.com/temper/ temperament finder] uses this form for all rank-2 temperaments. Septimal meantone in minimal generator form is {{mapping| 1 2 4 7 | 0 -1 -4 -10 }}, corresponding to generators of ~2/1 and ~4/3.
[[Graham Breed]]'s [http://x31eq.com/temper/ temperament finder] uses this form for all rank-2 temperaments. Septimal meantone in minimal-generator form is {{mapping| 1 2 4 7 | 0 -1 -4 -10 }}, corresponding to generators of ~2/1 and ~4/3.


Beyond rank-2, the mingen form of a temperament is no longer unique. You can always get smaller and smaller generators. This is why on Graham Breed's temperament finding tool, beyond rank-2 he simply uses the Hermite Normal Form.
Beyond rank-2, the mingen form of a temperament is no longer unique. You can always get smaller and smaller generators. This is why on Graham Breed's temperament finding tool, beyond rank-2 he simply uses the Hermite Normal Form.