Val: Difference between revisions

Consolidate discussions on wart notation and others. It makes no sense to separate them.
Eufalesio (talk | contribs)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{interwiki
{{Interwiki
| en = Val
| de = Val  
| de = Val  
| en = Val
| es =  
| es =  
| ja = ヴァル
| ja = ヴァル
Line 7: Line 7:
{{Beginner|Vals and tuning space}}
{{Beginner|Vals and tuning space}}


A [[val]] – short for ''valuation'' – is like an algorithm or procedure for finding out how to represent intervals of [[just intonation|just intonation (JI)]] with the pitches of an [[equal tuning]] such as an [[edo]]. The basic principle of using a val is to assign [[prime harmonic]]s to edosteps, and then deduce the number of edosteps of an arbitrary interval based on its [[prime factorization]]. This therefore assumes either that you want to use an equal tuning 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 represent intervals of [[just intonation|just intonation (JI)]] with the pitches of an [[equal tuning]] such as an [[edo]]. They are typically written using the notation {{val| ''a''<sub>1</sub> ''a''<sub>2</sub> ''a''<sub>3</sub> ''a''<sub>4</sub> ''a''<sub>5</sub> ''a''<sub>6</sub> … }}, where ''a''<sub>''i''</sub> are numbers that represent how the primes 2, 3, 5, 7, 11, 13, etc., in that order, are represented in edosteps, up to some [[harmonic limit|prime limit]].
 
The val is one of the fundamental concepts in [[regular temperament theory]]. The basic principle of using a val is to assign [[prime harmonic]]s to edosteps, and then deduce the number of edosteps of an arbitrary interval based on its [[prime factorization]]. This therefore assumes either that you want to use an equal tuning to approximate specific harmonies or that you have some other more indirect use in mind.


== Motivation ==
== Motivation ==
One obvious way to find an approximation to a just interval is to use [[direct approximation]], that is, rounding the interval to the nearest edostep. While this may seem simple, it creates contradictions. For example, a [[just major triad]] consists of a [[5/4]] major third and a [[6/5]] minor third combining to a [[3/2]] perfect fifth, but the sum of direct approximations of 5/4 and 6/5 might not be the direct approximation of 3/2. More generally, combining the approximations in an edo does not necessarily 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]].  
One obvious way to find an approximation to a just interval is to use [[direct approximation]], that is, rounding the interval to the nearest edostep. While this may seem simple, it can create contradictions in arithmetic. For example, a [[just major triad]] consists of a [[5/4]] major third and a [[6/5]] minor third combining to a [[3/2]] perfect fifth, but the sum of direct approximations of 5/4 and 6/5 might not be the direct approximation of 3/2. More generally, combining the approximations in an edo does not necessarily give you the same result as multiplying their ratios first and then using the direct approximation of that in the edo, so direct approximations of chords are not guaranteed to exist.  


Unfortunately, it is not possible to fix inconsistency, except by avoiding this particular harmony in this particular edo, but rather than giving up and saying that we cannot use it, it turns out we ''can'' if we are willing to allow one or more of these ratios to use an alternative approximation, especially considering that we probably do not mind using the second-best approximation in more complex intervals if we can guarantee that the arithmetic never fails us. A val will show us how to do that.  
Rather than giving up and saying that we cannot use this particular harmony in this particular edo, it turns out we ''can'' if we look at interval approximation in a different way.
 
In direct approximation, we are treating the approximations as isolated, unrelated free variables, but as we see, ''two'' intervals on top of each other form a triad with ''three'' component intervals that cannot be altered individually. That is why it is important to recognize the fact that intervals like 3/2, 5/4 and 6/5 are related to each other: by stacking 5/4 and 6/5, 3/2 is found; by removing 6/5 from 3/2, 5/4 is found; and by removing 5/4 from 3/2, 6/5 is found. It follows that for the ''three'' intervals in the [[5-odd-limit]], there are ''two'' free variables. If we know any two of them, the third can always be derived (even though it might not be the closest approximation).
 
To take this idea further, we notice that the infinitely many intervals of JI can be reduced to a few representatives from which the rest can be derived by some form of combination, so we only need to keep track of the steps of the representatives. Usually, we choose the steps of the [[prime interval|prime harmonics]], by which we mean each interval with frequency ratio ''p''/1 where ''p'' is a {{w|prime number}}.  


== Definition ==
== Definition ==
A val is a list of numbers that shows 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. First place is prime 2's mapping (a.k.a. the edo), second place is prime 3's mapping, third place is prime 5's mapping, fourth is prime 7's, etc.  
A val is a list of numbers that shows the approximation of each prime harmonic used in an edo in terms of steps. 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. First place is prime 2's mapping (a.k.a. the edo), second place is prime 3's mapping, third place is prime 5's mapping, fourth 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 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.
The val can be used to compute the edo's approximations to ratios involving those primes, like 2 × 5 / 3 / 3 = [[10/9]] for primes {2, 3, 5}. This list 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.


== Examples ==
== Examples ==
Line 25: Line 31:
* Prime 5 is mapped to 60 steps, which is rounded from log<sub>2</sub>(5) × 26 = 60.370… steps, 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.  
* Prime 5 is mapped to 60 steps, which is rounded from log<sub>2</sub>(5) × 26 = 60.370… steps, 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 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.
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. If we somehow want to say prime 5 is 61 steps, then that would be represented by the {{val| 26 41 61 }} val. If we want to say that prime 5 is 59 steps, that would be represented by the {{val| 26 41 59 }} val.
 
{{Tip| On the wiki, the [[Template:Val|val template]] helps you getting correct brackets. }}


=== Using a val to find the number of edosteps for a just interval ===
=== Using a val to find the number of edosteps for a just interval ===
Line 69: Line 77:
For the mathematically inclined, note that this operation is the same as taking the {{w|dot product}} between the monzo and val interpreted as ordinary vectors.
For the mathematically inclined, note that this operation is the same as taking the {{w|dot product}} between the monzo and val interpreted as ordinary vectors.


== Relationship with equal temperaments ==
=== Other applications ===
{{Todo|inline=1| improve readability }}
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.


The guarantee that there are no contradictions comes with an interesting feature: somehow, you have managed to approximate 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. This corresponds to [[tempering out]] an infinite set of [[comma]]s, though there is a finite number of simple/musically relevant 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 are two or more primes, then you need to specify two or more integers in the exponents of the prime factorization (i.e. in the monzo). So we have 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 have found a precise sense in which we can equate two nearby intervals that are not actually equal – by mapping according to a val that maps the difference to zero. In fact, you do not 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.
For a more mathematically intensive introduction to vals, see [[Vals and tuning space]]. For the characterization of higher-rank temperaments, see [[Mapping]].


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 JI to the numbers with certain properties.
== Relationship with (equal) temperaments ==
 
{{Todo|inline=1| improve readability }}
== Mathematical definition ==
Mathematically, a val is a type of function that inputs a {{w|rational number}} (ratio) and outputs a number of steps 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 assume a pure octave tuning which is often written with the backslash notation.


It is not just any such function though; it is a function with a special property called {{w|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 should not 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 {{w|irrational number|irrational}}) frequency ratios.
Despite having no contradictions, stacking the tempered intervals of the val will inevitably cause error to accumulate, when compared to the JI counterpart that is supposed to be represented. This is because temperaments temper out an infinite set of commas, which can be derived from a select set of simple/musically relevant commas that are all nullified in the val.


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''.  
All temperaments compromise JI by reducing the number of primes used, so for instance, 5-limit requires 2,3,5 to represent any pitch. If a 5-limit comma is tempered out, the structure is collapsed, and error is introduced to compensate for something that was not a unison now being one. In mathematical terms, this is equivalent to making one of the basis vectors of JI linearly dependent.


=== Generalized patent vals ===
When tempering out enough commas, JI is collapsed onto a quantized line; an equal temperament or rank-1 tuning. This is where vals come into play. Each of the primes is determined by a certain number of quanta, corresponding to octave divisions (edosteps) in [[EDO|edos]], tritave divisions in [[EDT|edts]], et cetera. There are many applications of vals and monzos disjoint from RTT, discussed in [[#Applications]], though all of them still treat vals as providing ''mappings'' from JI to the numbers, with constraints.
{{Main| Generalized patent val }}
{{See also| patent val }}


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''.
== Patent val and generalized patent val ==
{{Main| Patent val }}


This works by instead of doing log<sub>2</sub>(''p'') (where ''p'' is prime) we use log<sub>2.01…</sub>(''p'') 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.
As discussed, a patent val is a val derived from rounding prime harmonics to the nearest edosteps. This process for producing a val does not actually require us to use a purely-tuned 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''.


For example, let us say we want to interpret [[104edo]] (104-tone equal temperament) as a [[19-limit]] temperament; there is two possible mappings to use for 5; all primes up to and including 19 are sharp except for 5 which is quite flat, which causes a lot of inconsistencies; therefore a more natural val to use than the patent val is using the second-best mapping for 5, as log<sub>2</sub>(5) × 104 = 241.4805 is very close to exactly off anyways, and given the precision of 104edo, using the second-best mapping is very reasonable, as usually the sharpness of prime 5 cancels out with the sharpness of other primes when constructing ratios from them.  
This works exactly like ordinary vals, but instead of plugging integer ''N'' into ''N''⋅log<sub>2</sub>(''p'') where ''p'' is a prime, we use a non-integer ''N'' or something to that effect. The val produced by a slight alteration is usually the same, so there are actually continuous ranges where the val produced is the same.


== Applications ==
For example, let us say we want to interpret [[104edo]] (104-tone equal temperament) as a [[19-limit]] temperament; there are two possible mappings to use for 5; all primes up to and including 19 are sharp except for 5 which is quite flat, which causes a lot of inconsistencies; therefore a more natural val to use than the patent val is using the second-best mapping for 5, as 104⋅log<sub>2</sub>(5) = 241.4805 is very close to exactly off anyways, and given the precision of 104edo, using the second-best mapping is very reasonable, as usually the sharpness of prime 5 cancels out with the sharpness of other primes when constructing ratios from them.
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.


== Shorthand notations ==
== Shorthand notations ==
If we basically always want to use the patent val except for a slight modification to a second-best mapping for a handful of primes, it will be tedious to specify the full val every time, so the following shorthand notations are developed to address that.  
If we basically always want to use the patent val except for a slight modification to a second-best mapping for a handful of primes, it will be tedious to specify the full val every time. Shorthand notations developed to address that include '''wart notation''' and '''Sparse Offset Val notation''' ('''SOV notation''').  


=== Wart notation ===
=== Wart notation ===
Line 121: Line 114:


The general rules:
The general rules:
* Wart letters specify prime approximations being altered from the patent val. The ''n''-th letter of the alphabet refers to the ''n''-th prime: a~2, b~3, c~5, d~7, e~11 etc.
* Wart letters that ''suffix'' the number specify prime approximations being altered from the patent val. The ''n''-th letter of the alphabet refers to the ''n''-th prime: a~2, b~3, c~5, d~7, e~11, etc. A letter which appears ''m'' times refers to the (''m'' + 1)-th most accurate mapping for that prime. So, if a number representing a val is wartless, it is taken to mean the patent val.  
* A letter which appears ''m'' times refers to the (''m'' + 1)-th most accurate mapping for that prime.  
* A wart letter that ''prefixes'' the number specifies the corresponding prime as the [[interval of equivalence]] to be divided by the following number. For example, b13 refers to the patent val of [[13edt|13ed3]]. The octave is assumed, so "a" is typically not written out.  
* So, if a number representing a val is wartless, it is taken to mean the patent val.  
 
* A wart letter may ''prefix'' the number, in which case it specifies the corresponding prime as the [[interval of equivalence]] to be divided by the following number. For example, b13 refers to the patent val of [[13edt|13ed3]]. The octave is assumed, so "a" is typically not written out.
[[Graham Breed]]'s [https://x31eq.com/temper/ Temperament Finder], [[Sintel]]'s [https://sintel.pythonanywhere.com Temperament Calculator], and [[Flora Canou]]'s [https://github.com/FloraCanou/temperament_evaluator Temperament Evaluator] have implementations of wart notation that differ from each other slightly. For example, in the 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"), despite that "p" is logically the letter for prime 53, and the wart letter "q" and after refers to each non-prime basis element of composite/fractional subgroup, respectively and temporarily.
* 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.
For a full specification and a deeper dive into the nuances in each implementation, see Flora's [https://github.com/FloraCanou/temperament_evaluator/wiki/Commonwart Commonwart] document.  


=== 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 [[Mike Battaglia]] proposed this 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 [[Lumi Pakkanen]] to be more analogous to [[Ups and downs notation]].


In this notation, patent vals are notated using the number of divisions followed by square brackets e.g. 17[] for {{val| 17 27 39 }}. To indicate a wider mapping for a prime, it is prefixed with a carret (^) e.g. 17[^5] for {{val| 17 27 40 }}. To indicate a narrower mapping for a prime it is prefixed with a vee (v) e.g. 17[v5] for {{val| 17 27 38 }}. The prefixes stack e.g. 17[^^5] corresponds to {{val| 17 27 41 }}. Multiple modifications are separated by commas (and optionally spaces) e.g. 17[v3, ^5] for {{val| 17 26 40 }}.
In this notation, patent vals are notated using the number of divisions followed by square brackets e.g. 17[] for {{val| 17 27 39 }}. To indicate a wider mapping for a prime, it is prefixed with a carret (^) e.g. 17[^5] for {{val| 17 27 40 }}. To indicate a narrower mapping for a prime it is prefixed with a vee (v) e.g. 17[v5] for {{val| 17 27 38 }}. The prefixes stack e.g. 17[^^5] corresponds to {{val| 17 27 41 }}. Multiple modifications are separated by commas (and optionally spaces) e.g. 17[v3, ^5] for {{val| 17 26 40 }}.
Line 139: Line 132:
For patent vals the empty square brackets are optional when using an "at" sign. The subgroup itself is optional if its obvious from context e.g. 12@ for {{val| 12 19 28 }} (subgroup 2.3.5).
For patent vals the empty square brackets are optional when using an "at" sign. The subgroup itself is optional if its obvious from context e.g. 12@ for {{val| 12 19 28 }} (subgroup 2.3.5).


The 2022 version used a plus sign (+) in place of the caret and a minus sign (-) in place of the vee. [https://sintel.pythonanywhere.com Sintel's temperament calculator] is a notable implementation of this notation.  
The 2022 version used a plus sign (+) in place of the caret and a minus sign (-) in place of the vee. Sintel's Temperament Calculator is a notable implementation of this version of the notation.


== Vals vs. mappings ==
== Vals vs. mappings ==
Line 197: Line 190:
[[Category:Regular temperament theory]]
[[Category:Regular temperament theory]]
[[Category:Tuning]]
[[Category:Tuning]]
[[Category:Val]]
[[Category:Val| ]] <!-- main article -->
[[Category:Terms]]
[[Category:Terms]]
[[Category:Math]]
[[Category:Math]]
[[Category:Notation]]
[[Category:Notation]]
{{Todo| cleanup }}
{{Todo| cleanup }}
Retrieved from "https://en.xen.wiki/w/Val"