Val: Difference between revisions

The beginning note is covered by the header and the +"motivation" section title. Fix unencyclopedic writing (tone, abuse of parentheses, etc.). Restore old "definition" section title. Integer -> number (technically a tuning map is a val). Prime -> prime harmonic.
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 pitches 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 [[val]] — short for ''valuation'' — is like an algorithm or procedure for finding out how to approximate [[frequency ratio]]s ([[interval]]s of [[just intonation]]) with the pitches of an [[edo]]. 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.


''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''.
== Motivation ==
The immediate question is: why would you need an algorithm instead of just looking at the [[direct 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, 9:1, etc.) in the edo. Why? Because of something called ''inconsistency'', which means (read carefully):
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 direct approximation of each of these frequency ratios (6:5, 5:4, 3:2, 9:1, etc.) in the edo, because of something called ''inconsistency'', which means:  


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.)
If you know what intervals that you want to combine are, then combining their approximations in the edo does not give you the same result as multiplying their ratios ''first'' and ''then'' using the direct approximation of that in the edo. When this happens, we say that the arithmetic is ''inconsistent''. Therefore when this does not happen, we say that the result is [[consistent]].  


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, it turns out we ''can'' actually 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]]?
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 is not actually necessary. Plus, even if you did that, there would still be inconsistent ratios because an approximation cannot be perfect, so you cannot truly eliminate the inconsistency completely. Rather than giving up and saying that we cannot 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, it turns out we ''can'' actually guarantee this if we are willing to allow one or more of these ratios to '''not''' use the closest approximation by using a val. This may seem strange in this example, as one likely wants at least 6/5 * 5/4 = 3/2, but in principle we probably do not mind if something more complex is inconsistent, like (~11)(~11)(~75) = ~9075, if we can guarantee that the arithmetic never fails us.  


== What is a val exactly and how do we use it ==
== Definition ==
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.
A [[val]] is a list of numbers telling you the approximation of each [[prime harmonic]] used in an edo in terms of steps, where by ''prime harmonic'' we mean each frequency ratio ''p''/1 (where ''p'' is a {{w|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|does not have to be the closest approximation]] for each prime, but it usually is. Thus a val is essentially just a list of numbers that we are interpreting as having a certain meaning.


=== For example, in [[26edo]]: ===
=== Example ===
* 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 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)
* prime 3 is ''mapped '' to log<sub>2</sub>(3) × 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
* by the same procedure, prime 5 is ''mapped'' to 60 steps, as a result of rounding log<sub>2</sub>(5) × 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).
 
Note that when we take the closest approximation of each prime (corresponding to rounding rather than e.g. 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 is the highest prime we are considering.
 
=== So how do we use a val? ===
=== 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.
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):
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):
Retrieved from "https://en.xen.wiki/w/Val"