Val: Difference between revisions
m →Shorthand notation: group the temperament finder's features together |
massive rework |
||
Line 6: | Line 6: | ||
}} | }} | ||
{{Beginner|Vals and tuning space}} | {{Beginner|Vals and tuning space}} | ||
(Note this description will omit certain details to make the basic idea easier to understand for beginners, then explain them later for correctness and completeness; the details are mainly footnotes to and applications of these core ideas.) | |||
A [[val]] — short for ''valuation'' — is like an algorithm/procedure for finding out how to approximate frequency ratios ([[interval]]s of [[just intonation]]) with the intervals/intervals of an [[edo]]. Note that this therefore assumes either that you want to use an edo to approximate specific harmonies or that you have some other more indirect use in mind. | |||
A | |||
''The immediate question is:'' why would you need an algorithm instead of just looking at the nearest approximation possible in the edo? The answer is ''to avoid contradictions''. | |||
For example, it might not be true that 6/5 * 5/4 = 3/2 or that 9/1 * 5/1 = 45/1 if you are just always using the ''nearest approximation'' of each of these frequency ratios (6:5, 5:4, 3:2, etc.) in the edo. Why? Because of something called ''inconsistency'', which means (read carefully): | |||
For a more | If you know what intervals (frequency ratios) that you want to combine (multiply) are, then ''combining their approximations'' (in the edo) '''''does not''''' give you the same result as ''multiplying their ratios first'' and ''then'' using the nearest approximation of ''that'' in the edo. When this happens, we say that the arithmetic is ''inconsistent''. (Therefore when this doesn't happen, we say that the result is [[consistent]].) (We will work through an example in a moment in [[#What is a val exactly and how do we use it]] to help understanding.) | ||
Unfortunately, when this happens, it is not possible to fix the inconsistency, except by using a different edo that approximates the intervals in question better so that the multiplication (or division) of their approximations is consistent, but that isn't actually necessary, and plus, even if you did that, then more complex ratios (or just ''different'' ratios) will be inconsistent still, and so on (because an approximation can't be perfect), so you can't truly eliminate the inconsistency completely. Rather than giving up and saying that we can't guarantee that 6/5 * 5/4 = 3/2 or 9/1 * 5/1 = 45/1 or 135/128 * 24/25 = 81/80, etc. in our chosen edo, we ''can'' guarantee this, if we are willing to allow one or more of these ratios to '''not''' use the closest approximation. (This may seem strange in this example, as one likely wants at least 6/5 * 5/4 = 3/2, but in principle we probably don't mind if something more complex is inconsistent, like 11 * 11 * 75 = 9075, if we can guarantee that the arithmetic never fails us.) How? By using a val! So, [[#What is a val exactly and how do we use it|what is a val exactly and how do we use it]]? | |||
== What is a val exactly and how do we use it == | |||
A [[val]] is a list of [[Wikipedia:Integer|integer]]s telling you the ''approximation of each prime used'' in an edo, where by "each prime" we mean each frequency ratio ''p''/1 (where ''p'' is a [[Wikipedia:Prime number|prime number]]). This list of integers by convention corresponds to all primes up to some largest prime (the [[limit]]) so that we can tell what number represents the ''mapping'' of what prime by its place in the list (1st place is prime 2's mapping (a.k.a. the edo), 2nd place is prime 3's mapping, 3rd place is prime 5's mapping, 4th is prime 7's, etc.). The val is used to understand the edo's approximations to ratios involving those primes, like 2 * 5 / 3 / 3 = [[10/9]] for primes {2, 3, 5}. (This list [[#Warts|doesn't ''have'' to be the closest approximation]] for each prime, but it usually is.) Thus a val is essentially just a list of integers that we are interpreting as having a certain meaning. | |||
=== For example, in [[26edo]]: === | |||
* prime 2 is ''mapped'' to 26 steps (by definition, as we are equally dividing [[2/1]] into 26 steps, each representing an interval with frequency ratio 2<sup>1/26</sup>/1) | |||
* prime 3 is ''mapped '' to log(3)/log(2) * 26 = 41.209... steps, which we round to 41 steps (because otherwise we are using frequency ratios not present in 26edo), meaning 2<sup>41/26</sup> = 2.983.../1 is the frequency ratio of 26edo that we use to approximate the [[3/1]] frequency ratio, so the correct statement is prime 3 is ''mapped to 41 steps'' (not a fractional amount) | |||
* by the same procedure, prime 5 is ''mapped'' to 60 steps, as a result of rounding log(5)/log(2) * 26 = 60.370..., meaning 2<sup>60/26</sup> = 4.950.../1 is the frequency ratio of 26edo that we use to approximate the [[5/1]] frequency ratio | |||
Note that when we take the closest approximation of each prime (corresponding to rounding rather than (EG) using the second-best approximation possible) we call it a ''patent val'', therefore, the "5-limit patent val" of 26edo is {{val| 26 41 60}} (where the limit is 5 because that's the highest prime we are considering). | |||
=== So how do we use a val? === | |||
Using the 26edo val {{val| 26 41 60}} as our example, say we want to figure out how [[9/8]], [[5/4]] and 9/8 * 5/4 = [[45/32]] are mapped. | |||
First we have to find the [[Wikipedia:Integer factorization|prime factorization]] of our intervals (then we deduce the mapping from the prime factorization and the val): | |||
* 9/8 = (3 * 3)/(2 * 2 * 2) | |||
* 5/4 = 5/(2 * 2) | |||
* 45/32 = (3 * 3 * 5)/(2 * 2 * 2 * 2 * 2) | |||
Now all we do is substitute each occurrence of each prime with adding (or subtracting if we're dividing) the corresponding number of ''steps'' for that prime given by our val: | |||
* 9/8 is mapped to (41 + 41) - (26 + 26 + 26) = 82 - 78 = 4 steps (so represented by a frequency ratio of 2<sup>4/26</sup> = 1.112.../1 = ''4\26'') | |||
* 5/4 is mapped to 60 - (26 + 26) = 60 - 52 = 8 steps (so represented by a frequency ratio of 2<sup>8/26</sup> = 1.237.../1 = ''8\26'') | |||
* 45/32 is mapped to (41 + 41 + 60) - (26 + 26 + 26 + 26 + 26) = 142 - 130 = 12 steps (so represented by a frequency ratio of 2<sup>12/26</sup> = 1.377.../1 = ''12\26'') | |||
That's it! You've successfully used a val. The arithmetic works out nicely: the approximation of 5/4 times the approximation of 9/8 is the approximation of 45/32. What about that funny ''backslash'' notation? That's just a shorthand: ''k''\''N'' = 2<sup>''k''/''N''</sup> (the ''N''th root of 2, to the ''k''th power). Note that it can also be used ambiguously, as 2<sup>4/26</sup> + 2<sup>8/26</sup> = 2<sup>12/26</sup> is clearly invalid (the correct statement is 2<sup>4/26</sup> * 2<sup>8/26</sup> = 2<sup>12/26</sup>) but 4\26 + 8\26 = 12\26 need not be. It is used a lot in the xen community so is provided here for familiarization. | |||
Now let's compare to the closest approximations: | |||
* log(9/8)/log(2) * 26 = 4.418... which rounds to 4 steps | |||
* log(5/4)/log(2) * 26 = 8.370... which rounds to 8 steps | |||
* log(45/32)/log(2) * 26 = 12.788... which rounds to 13 steps | |||
So here we can see that 9/8 * 5/4 = 45/32 is inconsistent because 4 + 8 is not equal to 13, in other words, 4 + 8 = 12 fails. So we can see that the val "fixes" the 13 to 12 by obeying an ''internal'' logic provided by the val; in different contexts it may be different intervals that are fixed; not necessarily the more complex one, though usually that's how it works for edos of interest. | |||
So you may have noticed that there was quite a bit of repeated addition we can simplify, so let's note how we can simplify it exactly. Specifically, using exponent notation and not omitting implicit "to the power of 0"'s, the prime factorizations we worked out above are equivalent to: | |||
* 9/8 = 2<sup>-3</sup> * 3<sup>2</sup> * 5<sup>0</sup> which we can notate as {{monzo| -3 2 0 }} | |||
* 5/4 = 2<sup>-2</sup> * 3<sup>0</sup> * 5<sup>1</sup> which we can notate as {{monzo| -2 0 1 }} | |||
* 45/32 = 2<sup>-5</sup> * 3<sup>2</sup> * 5<sup>1</sup> which we can notate as {{monzo| -5 2 1 }} | |||
These notations are called [[monzo]]s; in other words, all a monzo really is is a shorthand for the prime factorization of an interval! Notice that the angle bracket on a monzo is on the right while on a val it's on the left, to indicate the naturalness of combining vals with monzos and to distinguish them, though often you can just use only square brackets if it's clear from context. | |||
Did you notice that {{monzo| -3 2 0 }} + {{monzo| -2 0 1 }} = {{monzo| -5 2 1 }}? Specifically, try adding corresponding numbers in the lists; -3 with -2 gives -5, 2 with 0 gives 2, 0 with 1 gives 1. That's not a coincidence! That's the same thing as multiplication except we're doing it with an "additive" notation. | |||
Now equipped with our funny notation for a val and a monzo, we can do the exact same thing we did before — calculating the mappings — but using this very dense but efficient notation, where we express "mapping the interval described by the monzo by a val" as simple juxtaposition (with angle brackets on the outskirts), where we ''multiply'' corresponding numbers in the list and then add them together, like so: | |||
* mapping of 9/8: {{val| 26 41 60}}{{monzo| -3 2 0 }} = 26 * -3 + 41 * 2 + 60 * 0 = -78 + 82 + 0 = 4 (steps of 26edo) | |||
* mapping of 5/4: {{val| 26 41 60}}{{monzo| -2 0 1 }} = 26 * -2 + 41 * 0 + 60 * 1 = -52 + 0 + 60 = 8 (steps of 26edo) | |||
* mapping of 45/32: {{val| 26 41 60}}{{monzo| -5 2 1 }} = 26 * -5 + 41 * 2 + 60 * 1 = -130 + 82 + 60 = 12 (steps of 26edo) | |||
This is all very tedious, but in practice using a val is much simpler, because you don't need to do this, all you need to know is [[5/4]] is mapped to 8\12 and [[3/2]] is mapped to 15\26, therefore [[9/4]] is mapped to 30\26, therefore [[9/8]] is mapped to (30-26=4)\26, so that since we know 9/8 * 5/4 = 45/32, the mapped version of 45/32 will just be 4 + 8 = 12. This method guarantees that you never contradict yourself, even if you are technically using suspicious approximations. | |||
(For the mathematically inclined, note that this operation is the same as taking the {{Wikipedia:dot product|dot product}} between the monzo and val interpreted as ordinary vectors.) | |||
=== Is this really that valuable/important? === | |||
The guarantee that there are no "contradictions" comes with an interesting feature: somehow, you've managed to approximate [[just intonation]] (JI) in an internally-consistent way despite the fact that the approximations get worse the more you combine the errors (so can get arbitrarily inconsistent). Mathematics out of scope for this page tells us that this corresponds to ''tempering'' an infinite set of ''commas'' (though there's a finite amount of musically relevant/simple commas); that set is simply the set of all intervals that are mapped to 0 steps ([[1/1]]) by the val. This explains where the additional "structure" went — if there is two or more primes, then don't you need to specify two or more integers in the exponents of the prime factorization (a.k.a. in the monzo)? The answer is yes, so we've lost information and structure by simplifying everything to a single integer coordinate; exactly the information that corresponds to ''equating'' any two intervals whose difference is one of the commas tempered, so we've found a precise sense in which we can ''equate'' two nearby intervals (frequency ratios) that are not actually equal — by mapping according to a val that maps the difference to zero! In fact, you don't have to use an [[edo]] tuning as you could use multiple vals ''simultaneously'' to map a single interval if you want to preserve more of the information in JI (rather than just increasing the size of the edo); this corresponds to [[regular temperaments]] generally rather than just the 1-dimensional ("rank 1") case that vals correspond to. Therefore, a ''val'' specifies a ''rank 1 temperament'' a.k.a. an ''equal temperament''. | |||
Furthermore, there is actually a lot of applications of vals and monzos that are not necessarily about approximating things in edos (or even regular temperaments for that matter), discussed in [[#Applications]], though all of them do still use the idea of the ''mapping'' provided by the val, so really, a val is a ''mapping'' from [[just intonation]] (JI) to the integers with certain properties... which brings us to: | |||
=== Mathematically, what is a val? === | |||
Mathematically, a val is a type of function that inputs a [[Wikipedia: Rational number|rational number]] (ratio) and outputs an integer (whole number) that represents what interval of the edo we use to approximate that frequency ratio. If ''a''/''b'' is our ratio and ''k'' is the output of the function, then the interval* of ''N'' edo is 2<sup>''k''/''N''</sup> (if we [[#Warts and generalized patent vals|assume a pure octave tuning]]) which is often written with the shorthand ''k''\''N'' and pronounced "''k'' steps of ''N'' edo", so that ''k'' is how many [[step]]s the interval is mapped to. | |||
It is not just any such function though; it is a function with a special property called {{Wikipedia: Linearity|Linearity}} that allows our arithmetic to be "internally consistent" (having an "internal logic") in the way described above; here "internally consistent" is meant in the English sense, so shouldn't be confused with [[consistency]] in the aforediscussed technical sense. The most obvious use of a val (the one discussed in the example) is to algorithmically determine ''JI interpretations'' of intervals in edo, which is called using the edo as an ''equal temperament'' or ''rank 1 temperament'', where "rank 1" means that it corresponds to a 1 dimensional grid of notes related by the same (usually [[Wikipedia: Irrational number|irrational]]) frequency ratios. | |||
Also note that in practice vals are ''very far'' from just any list of positive integers; rather, they are generally equal to or one off from the lists of integers that correspond to a ''patent val'', which [[#For example, in 26edo:|as a reminder,]] is "when we take the closest approximation of each prime (corresponding to rounding rather than (EG) using the second-best approximation possible)". | |||
=== Warts and generalized patent vals === | |||
The algorithm/process for producing a val does not actually require us to use a purely-tuned 2/1 (octave); instead we can stretch or compress the octave, resulting in potentially different mappings for primes, which is more common the more off the prime is and the more we alter the octave. This can give us a sense in which certain vals which are not "patent vals" are "patent" in a more broad sense, hence "generalized". | |||
This works by instead of doing log(''p'')/log(2) (where ''p'' is prime) we use log(''p'')/log(2.01...) or something to that effect, where 2.01/1 is our altered version of 2/1. The ''val'' produced by a slight alteration is usually the same, so there are actually continuous ranges where the val produced is the same. | |||
{{todo | add 17edo example}} | |||
== Applications == | |||
{{todo | cleanup/accessibility}} | |||
As discussed, vals are important in regular temperament theory because they provide a way to mathematically formalize how, specifically, the intervals in some set of equally spaced pitches are viewed as the tempered versions of more fundamental just intonation intervals. They can also be viewed as a way to map JI "onto" the chain, imbuing it with a harmonic context. Vals will enable you to figure out what commas your temperament eliminates, what [[comma pump]]s are available in the temperament, what the most consonant chords in the temperament are, how to optimize the octave stretch of the temperament to minimize tuning error, what EDOs support your temperament, and other operations as of yet undiscovered. | |||
For a more mathematically intensive introduction to vals, see [[Vals and tuning space]]. For the characterization of higher-rank temperaments, see [[Mapping]]. | |||
=== Another example (12edo) === | |||
Consider the 5-limit patent val {{val| 12 19 28 }}. This val tells us that you should view 12 generator steps as mapping to the octave 2/1. Since the temperament which maps 12 generator steps to the octave is 12edo, this means you're describing a val for 12edo. | |||
The val {{val| 12 19 28 }}, in addition to saying that 12 steps of 12-equal represents 2/1, also states explicitly that 19 steps of 12-equal represents a tempered 3/1, and 28 steps of 12-equal represents a tempered 5/1. | |||
Now assume you'd like to extend 12edo into the 7-limit. If you would like to assume the perspective that the 10 step interval in 12-equal (representing 1000 cents) is a very tempered 7/4, then that means that 7/1, which is 7/4 with two octaves stacked on top, is equal to 10 steps + 12 steps + 12 steps = 34 steps. This decision can hence be represented by using the 7-limit patent val for 12edo: {{val| 12 19 28 34 }}. | |||
If for some strange reason you'd instead like to say that 900 cents is 7/4, then that would be represented by the {{val| 12 19 28 33 }} val (notated 12d), and if you'd like to say that 1100 cents is 7/4, that would be represented by the {{val| 12 19 28 35 }} (12dd) val. | |||
== Warts explanation == | |||
{{ todo | rework }} | |||
The general rules: | The general rules: | ||
Line 43: | Line 105: | ||
* In Graham Breed's temperament finder, the wart letter "p" is used to make explicit that the number refers to the patent val (though the letter originally was intended to stand for "prime"). Note that "p" is logically the letter for prime 53. | * In Graham Breed's temperament finder, the wart letter "p" is used to make explicit that the number refers to the patent val (though the letter originally was intended to stand for "prime"). Note that "p" is logically the letter for prime 53. | ||
* In Graham Breed's temperament finder, the wart letter "q" and after refers each non-prime basis of composite/fractional subgroup, respectively and temporarily. | * In Graham Breed's temperament finder, the wart letter "q" and after refers each non-prime basis of composite/fractional subgroup, respectively and temporarily. | ||
=== Sparse Offset Val notation === | === Sparse Offset Val notation === | ||
In 2022 [[User:Mike Battaglia|Mike Battaglia]] proposed '''SOV notation''' as a way to be explicit about which primes are being affected and in which direction. In 2024 it was further refined by him and [[User:Frostburn|Lumi Pakkanen]] to be more analogous to [[Ups and downs notation]]. | In 2022 [[User:Mike Battaglia|Mike Battaglia]] proposed '''SOV notation''' as a way to be explicit about which primes are being affected and in which direction. In 2024 it was further refined by him and [[User:Frostburn|Lumi Pakkanen]] to be more analogous to [[Ups and downs notation]]. | ||
Line 69: | Line 130: | ||
== Vals in JI subgroups == | == Vals in JI subgroups == | ||
We can generalize the concept of monzos and vals from the ''p''-limit to other [[JI subgroup]]s. This can be useful when considering different edo tunings of [[subgroup temperaments]]. [[Gene Ward Smith]] called these "[[sval]]s" for short. | We can generalize the concept of monzos and vals from the ''p''-limit (for some prime ''p'') to other [[JI subgroup]]s. This can be useful when considering different edo tunings of [[subgroup temperaments]]. [[Gene Ward Smith]] called these "[[sval]]s", short for "[[subgroup val]]s", and correspondingly "[[smonzo]]s" as short for "[[subgroup monzo]]s". | ||
To notate a subgroup val, we typically precede the "bra" notation with an indicator regarding the subgroup (and choice of basis). For instance, the patent val for 12 equal on the 2.3.7 subgroup is often notated "2.3.7 {{val|12 19 34}}". If the subgroup indicator isn't present, the subgroup can be inferred from context. It is very typical for a val with no explicit subgroup indicator to be interpreted as representing some prime limit, e.g. {{val| a b c }} would represent a 5-limit val. | To notate a subgroup val, we typically precede the "bra" (angle bracket) notation with an indicator regarding the subgroup (and choice of basis, as we don't have to use only ascending primes). For instance, the patent val for 12 equal on the 2.3.7 subgroup is often notated "2.3.7 {{val|12 19 34}}". If the subgroup indicator isn't present, the subgroup can be inferred from context. It is very typical for a val with no explicit subgroup indicator to be interpreted as representing some prime limit, e.g. {{val| a b c }} would represent a 5-limit val. | ||
Note that we could, for instance, use a different basis for the same subgroup - for instance, we could instead write "2.3.21 {{val| 12 19 53 }}", which is the 12 equal patent val in the "2.3.21" subgroup. Since the "2.3.21" subgroup is the same as the "2.3.7" subgroup, just written with a different basis, these two apparently "different" svals represent the same map from this subgroup to a rank-1 generator chain. (It is a matter of semantics if these are thought of as "different" svals or "the same sval" written using a different basis.) | Note that we could, for instance, use a different basis for the same subgroup - for instance, we could instead write "2.3.21 {{val| 12 19 53 }}", which is the 12 equal patent val in the "2.3.21" subgroup. Since the "2.3.21" subgroup is the same as the "2.3.7" subgroup, just written with a different basis, these two apparently "different" svals represent the same map from this subgroup to a rank-1 generator chain. (It is a matter of semantics if these are thought of as "different" svals or "the same sval" written using a different basis.) |