Val
| This is a beginner page. It is written to allow new readers to learn about the basics of the topic easily. The corresponding expert page for this topic is 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 (JI) with the pitches of an equal tuning such as an edo. They are typically written using the notation ⟨a1 a2 a3 a4 a5 a6 …], where ai are numbers that represent how the primes 2, 3, 5, 7, 11, 13, etc., in that order, are represented in edosteps, up to some 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 harmonics 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
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.
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 harmonics, by which we mean each interval with frequency ratio p/1 where p is a prime number.
Definition
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 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
Let us consider a 5-limit val for 26edo, ⟨26 41 60]. From this val, we see that:
- 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 21/26/1);
- Prime 3 is mapped to 41 steps, which is rounded from log2(3) × 26 = 41.209… steps, meaning 241/26 = 2.983…/1 is the frequency ratio of 26edo that we use to approximate the 3/1 frequency ratio;
- Prime 5 is mapped to 60 steps, which is rounded from log2(5) × 26 = 60.370… steps, meaning 260/26 = 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 ⟨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 ⟨26 41 61] val. If we want to say that prime 5 is 59 steps, that would be represented by the ⟨26 41 59] val.
| Tip: | On the wiki, the val template helps you getting correct brackets. |
Using a val to find the number of edosteps for a just interval
Using the 26edo 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 prime factorization of our intervals:
- 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 are 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 24/26 = 1.112…/1)
- 5/4 is mapped to 60 - (26 + 26) = 60 - 52 = 8 steps (so represented by a frequency ratio of 28/26 = 1.237…/1)
- 45/32 is mapped to (41 + 41 + 60) - (26 + 26 + 26 + 26 + 26) = 142 - 130 = 12 steps (so represented by a frequency ratio of 212/26 = 1.377…/1)
We have used the val to find the edosteps. The arithmetic works out nicely: the approximation of 5/4 times the approximation of 9/8 is the approximation of 45/32. Using backslash notation to denote the number of steps in an edo, these are 4\26, 8\26, and 12\26, respectively, so that the underlying "logic" of the approximations being followed is 4\26 + 8\26 = 12\26.
Now let us compare to the closest approximations:
- log2(9/8) × 26 = 4.418… which rounds to 4 steps
- log2(5/4) × 26 = 8.370… which rounds to 8 steps
- log2(45/32) × 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 is how it works for edos of interest.
Vals and monzos
So you may have noticed that there was quite a bit of repeated addition we can simplify, so let us note how we can simplify it exactly. Specifically, using exponent notation and not omitting implicit zeroth powers, the prime factorizations we worked out above are equivalent to:
- 9/8 = 2-3 × 32 × 50 which we can notate as [-3 2 0⟩
- 5/4 = 2-2 × 30 × 51 which we can notate as [-2 0 1⟩
- 45/32 = 2-5 × 32 × 51 which we can notate as [-5 2 1⟩
These notations are called monzos; 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 is 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 is clear from context.
Notice that [-3 2 0⟩ + [-2 0 1⟩ = [-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 is not a coincidence, but the same thing as multiplication except we are 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: ⟨26 41 60][-3 2 0⟩ = 26 × -3 + 41 × 2 + 60 × 0 = -78 + 82 + 0 = 4 (steps of 26edo)
- mapping of 5/4: ⟨26 41 60][-2 0 1⟩ = 26 × -2 + 41 × 0 + 60 × 1 = -52 + 0 + 60 = 8 (steps of 26edo)
- mapping of 45/32: ⟨26 41 60][-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 do not need to do this, all you need to know is 5/4 is mapped to 8\26 and 3/2 is mapped to 15\26, therefore 9/4 is mapped to 30\26, therefore 9/8 is mapped to (30 - 26)\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 dot product between the monzo and val interpreted as ordinary vectors.
Other applications
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 pumps 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.
Relationship with (equal) temperaments
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.
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.
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 edos, tritave divisions in 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.
Patent val and generalized patent val
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.
This works exactly like ordinary vals, but instead of plugging integer N into N⋅log2(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.
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⋅log2(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.
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. Shorthand notations developed to address that include wart notation and Sparse Offset Val notation (SOV notation).
Wart notation
In this notation, we can specify the patent val of n-edo as just n, then we can specify each prime we want to map to the second best approximation by appending a letter, called a wart, after the number:
- adding a means you make the mapping of 2 worse
- adding b means you make the mapping of 3 worse
- adding c means you make the mapping of 5 worse
- adding d means you make the mapping of 7 worse
- etc.
So we can refer to ⟨17 27 40] by "17c" (not to be confused with 17 ¢ (cents)), where we mnemonically think "a, b, c; 3rd letter; 3rd prime is 2, 3, 5; there is one 'c' so we make the mapping of prime 5 worse (further from just) once compared to patent".
The general rules:
- 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 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 13ed3. The octave is assumed, so "a" is typically not written out.
Graham Breed's Temperament Finder, Sintel's Temperament Calculator, and Flora Canou's 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.
For a full specification and a deeper dive into the nuances in each implementation, see Flora's Commonwart document.
Sparse Offset Val 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 ⟨17 27 39]. To indicate a wider mapping for a prime, it is prefixed with a carret (^) e.g. 17[^5] for ⟨17 27 40]. To indicate a narrower mapping for a prime it is prefixed with a vee (v) e.g. 17[v5] for ⟨17 27 38]. The prefixes stack e.g. 17[^^5] corresponds to ⟨17 27 41]. Multiple modifications are separated by commas (and optionally spaces) e.g. 17[v3, ^5] for ⟨17 26 40].
The interval of equivalence may be prefixed in square brackets e.g. [3]13[] for ⟨8 13 19] (subgroup 2.3.5).
The subgroup may be made explicit separated by an "at" sign (@) at the end e.g. 46[]@2.3.7.13/5 for ⟨46 73 129 63] (subgroup 2.3.7.13/5). Formal primes are treated the same way as actual primes e.g. 46[^13/5]@2.3.7.13/5 for ⟨46 73 129 64] (subgroup 2.3.7.13/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 ⟨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. Sintel's Temperament Calculator is a notable implementation of this version of the notation.
Vals vs. mappings
A val is more specific than a mapping, both as in the general mathematical sense as well as the regular temperament sense:
- A val can be thought of as a mapping with one row. Put another way, the rows of mappings are vals. To be mathematically precise, a val is a specific type of (linear) mapping called a "linear form", or "linear functional", which means that its output is a scalar, or in other words, a single number. This corresponds to the fact that a val must be a 1xM array of numbers, or in other words a vector (specifically a row vector, AKA covector).
- In standard usage, vals must have only integer entries (when expressed in the standard, non-weighted coordinate basis), although tuning maps are sometimes considered a kind of val.
- Being short for "valuation", a val is a formal linear sum of p-adic valuations.
In practice, most single-row mappings in RTT are vals, because we usually deal with integer entries, and the other specifications only mean anything to advanced mathematicians.
Generalizations
The entries of a val measure equal-tempered steps, which can be thought of either as a generator for a rank-1 temperament (and thus the structure can be generalized to account for multiple generators, resulting in a mapping matrix) or as a logarithmic interval size measure (and thus the entries can be generalized to non-integer values to create a tuning map).
Mapping matrix
A mapping matrix is the most common generalization of a val, for a rank-2 or higher temperament. As a result, it has more than one row, To be precise, there is one row for each generator of the temperament.
Tuning map
A tuning map generalizes a val in a different way. Instead of treating the entries of a val as equal temperament steps, it treats them as a logarithmic interval size measure (usually cents). Thus, the entries of a tuning map may be any real number. ⟨1200 1901.955] is the tuning map for the justly-tuned 3-limit, and ⟨1200 1896.8 2787.1] is the tuning map for the 5-limit tuned to meantone (specifically, 31edo).
Vals in non-prime-limit spaces
Subgroup vals
It is rather intuitive to generalize the concept of monzos and vals from the p-limit (for some prime p) to other JI subgroups. This can be useful when considering different edo tunings of subgroup temperaments. Gene Ward Smith called these svals, short for subgroup vals, and correspondingly smonzos as short for subgroup monzos.
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 do not have to use only ascending primes). For instance, the patent val for 12et on the 2.3.7 subgroup is often notated 2.3.7 ⟨12 19 34]. If the subgroup indicator is not 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. ⟨a b c] would represent a 5-limit val. In fact, the ordinary vals introduced in this article can be seen as entirely contained within this special case.
Note that we could, for instance, use a different basis for the same subgroup – for instance, we could instead write 2.3.21 ⟨12 19 53], which is the 12et 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 subgroup vals represent the same map from this subgroup to a rank-1 generator chain.
Subgroup vals can also be written using subgroups that do not involve primes, e.g. 2.3.7.13/5 ⟨46 73 129 63].
Note that the notion of a patent val for a subgroup val may not agree with the patent val on a prime limit. For instance, the patent val for 13edo in the 2.9.5 subgroup can be written as 2.9.5 ⟨13 41 30], because the best approximation to 2 is 13 steps, the best approximation to 9 is 41 steps, and the best approximation to 5 is 30 steps. Note that, however, the patent val on the 2.3.5 subgroup instead maps 3/1 to 21 steps, so that the 9 induced from the 5-limit patent val is not the same as the 9 directly derived from the 2.9.5-subgroup patent val.
This notation is also used for subgroup monzos; e.g. 81/80 on the 2.9.5 subgroup is 2.9.5 [-4 2 -1⟩, and it is thus easy to see that 2.9.5 ⟨13 41 30] above makes 81/80 vanish: ⟨13 41 30 | -4 2 -1⟩ = 13 × (-4) + 41 × 2 + 30 × (-1) = 0.
Tempered vals
There is also a notion of a tempered val on a group of tempered monzos, representing intervals in some regular temperament. These names are sometimes abbreviated as tval and tmonzo, respectively. Typically, this is made explicit by writing the generators beforehand. When the tempered intervals have accepted names, such as in meantone, we can use names like P8 and P5, so that the tval P8.P5 ⟨12 7] represents the 12edo "patent tval" in meantone (given that particular basis). If the intervals do not have names, a transversal can be given instead, preceded with the temperament name, so that we have (meantone) 2.3/2 ⟨12 7], or (meantone) 2.3/2 ⟨31 18].
There are also tempered tuning maps, covered on their respective page.