Cents and ratios | Ratios with factors | Mean tone in cents | Under / Over | UO non oct | UO non oct with scale tree | Quintic | Music and virtual flowers |
When x is r / (r-1) (with r = scale repeat) you get an undertone series. You can just enter x = 1 to make the undertone series, and this will be changed into the appropriate value.
When x is 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 (r + sqrt(r))/(r-1) you get closest to an equal temperament scale. In order to make the result rational you need to use an approximation to the square root of r.
The OU scales are the inversions of the UO scales
This is the 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) r = scale repeat 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 + (r-1)*x - r b = b - 1 } Example: x = 4 n = 5 r = 3 a = 20 b = 20 (r-1)*x - r = 5 so a -> a + 5 b -> b - 1 scale is: 20/20 25/19 30/18 35/17 40/16 45/15 = 1/1 25/19 5/3 35/17 5/2 3/1 It works because nx + n((r-1)x - r) = n(rx - r) = r (nx - n) For x = r / (r-1), a is constant, and b decreases by 1, so you get an undertone series. Example: n = 5 r = 3 x = 3/2 a = 15/2 b = 15/2 scale is: 7.5/7.5 7.5/6.5 7.5/5.5 7.5/4.5 7.5/3.5 7.5/2.5 = 1/1 15/13 15/11 5/3 15/7 3/1 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((r-1)x - r)) / (2mx - m) so you want (2x + (r-1)x - r) / (2x-1) to be its own inversion in r This means you want it to equal sqrt(r) Let's write s for sqrt(r) So you want ((r+1)x - r) / (2x-1) = s => (r+1)x - r = 2sx - s => (r+1-2s)x = r-s => x = (r-s) / (r+1-2s) multiply top and bottom by (r+1+2s) to get x = (r-s)(r+1+2s) / ((r+1)^2-4r) = (r^2+r + (r-1)s - 2r) / (r^2-2r+1) = (r^2 -r + (r-1)s) / (r-1)^2 = (r-1)(r+s)/(r-1)^2 = (r+s)/(r-1) 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.