# Patent val

The **patent val** (aka **nearest edomapping**) for some edo is the val that you obtain by finding the closest rounded approximation to each prime in the tuning, assuming octaves are pure (or in other words, assuming the edo number is an integer).

For example, the patent val for 17edo is ⟨17 27 39], indicating that the closest mapping for 2/1 is 17 steps, the closest mapping for 3/1 is 27 steps, and the closest mapping for 5/1 is 39 steps. This means, if octaves are pure, that 3/2 is 706 cents, which is what you get if you round off 3/2 to the closest location in 17-equal, and that 5/4 is 353 cents, which is what you get is you round off 5/4 to the closest location in 17-equal.

## Generalized patent val

This val can be extended to the case where the number of steps in an octave is a real number rather than an integer; this is called a **generalized patent val**, or **GPV**. For instance the 7-limit generalized patent val for 16.9 is ⟨17 27 39 47], since 16.9 × log_{2}7 = 47.444, which rounds down to 47.

There are other vals worth considering besides the patent val. Consider the case of 5-limit 17et. ⟨17 27 39] is the patent val, meaning each prime individually is as closely approximated as possible (again, assuming pure octaves). However, if that constraint is lifted, and we're allowed to choose the next-closest approximations for prime 5, the overall damage to the consonances we care about can be reduced; in other words, even though 39 steps can take you just a tiny bit closer to prime 5 than 40 steps can, this is a naïve choice which does not take into account whether the errors tend to cancel or reinforce in simple ratios that combine different primes. Considering the problem more deeply in this manner may lead to choosing ⟨17 27 40] instead. And there are other harmonic reasons to choose ⟨17 27 40] over ⟨17 27 39] as well; it tempers different commas.

We can show that ⟨17 27 40] is a generalized patent val because it would be the patent val for 17.1et: 17.1 × log_{2}5 = 39.705, which rounds up to 40. Essentially this is showing that there does exist some generator size, 2^{1/17.1}, for which it is truly the case that 17, 27, and 40 are the respective best approximations of primes 2, 3, and 5. That is, we are not "forcing" an interpretation of a prime which is not closest to the truth. A counterexample would be ⟨17 27 41]: it is possible to find a generator that maps 2 to 17 steps and 5 to 41 steps, but it would require 3 to be 28 steps (this type of information can be read easily off the nearby visualization).

Another name for generalized patent val is uniform map (and an integer uniform map, or simple map, is another name for patent val).

## Further explanation

A *p*-limit val contains the number of steps it takes to get to each prime number up to *p*, in prime number order:

⟨[2/1] [3/1] [5/1] [7/1] … [*p*/1]]

Given *N*-edo, the equal division of the octave into *N* parts, we may define vals that map a specific number of N-edo steps to these primes.

For any prime *p* we can find a corresponding *p*-limit val in a canonical manner by scalar multiplying ⟨1 log_{2}3 log_{2}5 … log_{2}*p*] by *N* and rounding to the nearest integer. In general this is not guaranteed to be the most accurate available val, but if *N*-edo has enough relative accuracy in the *p*-limit, it will be. The name *patent* comes from the fact that "patent" in one sense of the word is a synonym for "obvious"; the patent val may or may not be the best choice but it's the obvious choice.

One way to think of this process is to first ask, "How many 1200-cent steps (octaves) does it take to get to each prime?" It takes one full-octave step to get to 2/1, log_{2}3 steps to get to 3/1, log_{2}5 to get to 5/1, and so on. This gives us ⟨1 1.585 2.322 2.807 3.459 … log_{2}*p*].

Then ask, "How many more *N*-edo steps does it take to get to the same places?" One 12edo step is 1/12th of an octave, by definition; therefore, you need 12 times as many steps to reach 2/1, 3/1, 5/1, … Similarly, one 31edo step is 1/31 of an octave, so you need 31 times as many steps to reach 2/1, 3/1, 5/1, …

Thus, the way to get the *p*-limit patent val for *N*-edo is to multiply ⟨1 1.585 2.322 2.807 … log_{2}*p*] by *N*. Then, since you can't take fractional steps in an edo, you round the results to the nearest integers.

## Examples

### Example for 12edo

Multiplying 12 times ⟨1 1.585 2.322 2.807 3.459]

yields ⟨12 19.020 27.863 33.688 41.513],

rounded to ⟨12 19 28 34 42],

which is the *11-limit patent val for 12edo*.

### Alternate and expanded example for 31edo

As stated above, the val contains the number of steps it takes to get to a given prime number, in prime number order:

⟨[2/1] [3/1] [5/1] [7/1] [etc.]]

By definition, for any edo, the number of steps to 2/1 is the edo division: 31 for 31edo. The 2-limit patent val is ⟨31].

What's the number of steps to 3/1?

The step size for 31edo is 38.70967742 cents.

3/1 is 1901.96 in cents.

1901.96 cents / 38.70967742 cents/step = 49.13383752 steps.

This is an edo, so we can't take 0.13383752 steps. Instead, we round. This is clearly closer to 49 steps, so that's the "obvious" or "patent" choice. The 3-limit patent val is

⟨31 49].

Doing the same thing up through 17, and we get a 17-limit patent val of

⟨31 49 72 87 107 115 127]

To see how to extend from one limit to another, we may look at what to do for 19/1 and use that to go from the 17-limit to the 19-limit.

19/1 = 5097.51 cents, 5097.51 / 38.70967742 cents/step = 131.6857529 steps. Round to get 132. The 19-limit patent val is

⟨31 49 72 87 107 115 127 132]

Note that these are the same answers you would get if you multiplied 31 times ⟨1 1.585 2.322 2.807 3.459 3.700 4.087 4.248] and rounded the result.

## Properties

## How this defines a rank-1 temperament

A val defines a rank-1 temperament by defining the deliberate introduction of an error into one or more primes. In 12edo, for instance, the perfect fifth (ratio 3/2, or exactly 1.5) is mapped to 700 cents, which is actually just barely flat: a ratio of 2^{(700/1200)}, or 1.4983070769.

As stated above, the 2/1 in the patent val is perfect. The patent val for 12edo, ⟨12 19 28 34 42 …], implies that it takes 12 steps to get the octave, which is does: 12 steps × 100 cents / step = 1200 cents = 1 octave.

In the patent val for 12edo, the number 19 is in the second spot – the place reserved for 3/1. That implies that it takes 19 steps to get to 3/1. We know that's not true: we rounded numbers off when we created the val in the first place, so essentially we are just *acting as if* 19 steps gets you to 3/1. To put it differently, we are deliberately introducing an error into 3/1. More precisely, any time we would have used 3/1 (e.g. in 9/8, 3/2, etc.), we are going to use a slightly different number instead.

We can calculate the error we are introducing into 3/1 as follows for 12edo:

12edo steps are 100.0 cents each.

19 steps of 12edo = 19 steps × 100.0 cents/step = 1900.0 cents.

1900.0 cents => 2^{1900/1200}, or 2.9966141538. This is the value that 12edo uses in place of prime 3.

That means that the 12edo patent val substitutes 2.9966141538 any time you would have had prime 3 in a ratio. 9/8 and 3/2 will be somewhat flat. 4/3 will be somewhat sharp. (Note that, for now, the example intervals (3/2, 4/3, 9/8) deliberately avoid any primes other than 3 and 2, and 2 is pure, so the sharpness and flatness comes only from the impure 3/1 value.)

We can do the same calculations for 31edo.

The patent val for 31edo is ⟨31 49 72 87 107 …]. The 49 implies that it takes 49 steps to get to 3/1.

31edo steps are 38.70967742 cents each.

49 steps of 31edo = 49 steps × 38.70967742 cents/step = 1896.774194 cents.

1896.774194 cents => 2^{1896.774194/1200}, or 2.991035765. This is what 31edo uses in place of prime 3.

Again, as in 12edo, it is less than 3, so 9/8 and 3/2 will be somewhat flat, and 4/3 will be somewhat sharp. Note that 31edo's prime 3 is a little farther away from 3/1 than 12edo's 3/1 – i.e. it has a greater error. That means 31edo's 3/2 will be even flatter, and its 4/3 will be even sharper, than in 12edo.

That does not make 31edo better or worse than 12; it just means there's more error in the 3/1 ratio in 31edo than in 12edo. If you run these calculations for 5/1 using the patent vals for 12edo and 31edo, you will find that 5/1 has more error in 12edo than in 31edo: 5.0396842 vs. 5.002262078, respectively. 31edo may therefore be preferred by people who like sweeter thirds (5/4 ratios) and are willing to have flatter fifths (3/2 ratios).

## How this relates to commas

These deliberate errors ensure that certain commas get tempered out. The patent vals for both 12edo and 31edo temper out 81/80. Here are the calculations:

81 = 3×3×3×3. This can also be written as a power of a prime – 3^{4} – or as a monzo – [0 4⟩.

80 = 2×2×2×2×5. This can also be written as a product of powers of primes – 2^{4}×5^{1} – or as a monzo – ⟨4 0 1].

Substitute in the values for 81/80 in 12edo and get this: 2.9966141538^{4} / (2^{4}×5.0396842) = 80.6349472 / 80.6349472 = 1/1.

Substitute in the values for 81/80 in 31edo and get this: 2.991035765^{4} / (2^{4}×5.002262078) = 80.036193 / 80.036193 = 1/1.

The lesson here is that even though the errors in the primes are different for each edo + patent val in these cases, 81/80 is still tempered out. However, that's not true for all commas; for instance, 12edo tempers out 128/125, the diesis, while 31edo does not; and 31edo tempers out 393216/390625, the Würschmidt comma, while 12edo does not.

By the way, there is a faster way to find out if a comma is being tempered out. Recall that multiplying by a number means adding logarithms: for instance, to go up an octave you can multiply a ratio by 2/1 or you can add 1200 to the cents value. Since the patent val shows you how many edo steps it takes to get to a prime number, you can add that many steps instead of multiplying things out like we did above. Similarly, you can subtract if you need to divide.

81/80 = 3×3×3×3 / (2×2×2×2 × 5).

To get 81, we need to multiply by three, four times. That means we add the number of steps to 3/1 in the patent val, four times. Using the 31edo patent val, that is 49 + 49 + 49 + 49, or 4×49, or 196.

To get 80, we need to multiply by two, four times, and multiply again by five, once. So add together the number of steps to 2/1, four times, and then add the number of steps to 5/1. Using the 31edo patent val, that is 31 + 31 + 31 + 31 + 72, or 4×31 + 72, or 196.

You're dividing 81 by 80, so (assuming we're starting at zero, though it works no matter where you start) you add the steps for 81 (+196) and subtract the steps for 80 (-196). 196-196 = 0. This means that it takes zero steps to reach 81/80 – in other words, 81/80 "vanishes".