Cents and ratios | Ratios with factors | Mean tone in cents | Under / Over | UO, non octave & scale tree | Quintic | Music and virtual flowers |
The value for x needs to be at least 2. You can enter it as a decimal or as a ratio such as 7/2.
Dan's idea is that when you set x to be 2 you get an undertone series. When you set it to be infinite you get an overtone series. Try x = 1e20 for the overtone series - this means x followed by 20 zeroes, which is large enough. In between, you get interesting rational scales that are in between an overtone and an undertone series.
When you set x to be 2 + sqrt(2) you get closest to an equal temperament scale (for octave scales). In order to make the result rational you need to use an approximation to the square root of two. Try x = 3.4. Values in the range x = 3 to x = 4 are the ones Dan refers to as equal series.
The OU scales are the inversions of the UO scales
This is Dan's algorithm in pseudo code (i.e. computer code, but with some of it in ordinary english):
Initialising values: x = whatever value it has (e.g. 3.4). n = notes in scale (e.g. 5) Calculation: a = n*x b = n*x for degree = 0, incremented by 1 until you reach n { scale value for this degree = a / b a = a + x - 2 b = b - 1 } Example: x = 4 n = 5 a = 20 b = 20 x-2 = 2 so a -> a + 2 b -> b - 1 scale is: 20/20 22/19 24/18 26/17 28/16 30/15 = 1/1 22/19 12/9 26/17 7/4 2/1 It works because nx + n(x - 2) = n(2x - 2) = 2 (nx - n) For x = 2, a is constant, and b decreases by 1, so you get an undertone series For x very large, a increases by x each time and b is effectively constant as the 1 is small compared with x, so you get the overtone series. You get the closest to the equal temperament scale when it is symmetrical. So lets do the calculation for this too. In the case where n is even, you want the centre interval to be its own inversion. Let n be even n = 2m and the centre interval is (2mx + m(x-2)) / (2mx - m) so you want (2x + x-2) / (2x-1) to be its own inversion in the octave This means you want it to equal sqrt(2) Lets write s = sqrt(2) So you want (3x-2) / (2x-1) = s => 3x - 2 = 2sx - s => (3 - 2s)x = 2-s => x = (2 - r2) / (3 - 2s) multiply top and bottom by (3 + 2s) to get x = (2 - s) (3 + 2s) / (9 - 8) so x = 6 + s - 4 = 2 + s This only takes account of the even cases, but for n odd, just consider 2n, which has the values for n as every second entry in the scale.