Perfect balance: Difference between revisions

A (talk | contribs)
No edit summary
A (talk | contribs)
No edit summary
Line 26: Line 26:
It is easy to construct perfectly balanced scales that are not a subset of any EDO, by superimposing two scales within EDOs transposed by an irrational amount. There also exists a continuum of perfectly balanced scales that have no such decomposition. The space of perfectly balanced scales of size ''K'' > 1 forms a ''K''-dimensional manifold, which is in general complex and poorly understood.
It is easy to construct perfectly balanced scales that are not a subset of any EDO, by superimposing two scales within EDOs transposed by an irrational amount. There also exists a continuum of perfectly balanced scales that have no such decomposition. The space of perfectly balanced scales of size ''K'' > 1 forms a ''K''-dimensional manifold, which is in general complex and poorly understood.


Milne at al. showed that an efficient convex optimization procedure exists that, given an arbitrary scale, computes the closest perfectly balanced scale according to a simple squared-difference metric. This is accomplished by the following steps: place the scale on a circle in 2D space about the origin, translate the points by a vector (''u'', ''v''), project the points back onto the original circle by dividing by the norm, then compute the cost function <math>\left(\sum \mathbf{x}\right)^2 + \left(\sum \mathbf{y}\right)^2</math> where <math>\mathbf{x}</math> and <math>\mathbf{y}</math> are vectors of the ''x''- and ''y''-coordinates. Use any standard unconstrained optimization procedure to find ''u'' and ''v'' so that the cost function is minimized. It can be seen that the cost is 0 iff perfect balance is achieved.
Milne at al. found a procedure that, given an arbitrary scale, computes the closest perfectly balanced scale according to a simple squared-difference metric. This is accomplished by the following steps: place the scale on a circle in 2D space about the origin, translate the point set so that its [https://en.wikipedia.org/wiki/Geometric_median geometric median] coincides with the origin, and project the points back onto the circle by dividing each point by its distance to produce a perfectly balanced scale. The geometric median does not have a closed-form expression in general, but can be efficiently computed with a convex optimization procedure. This procedure fails if the geometric median exactly coincides with one of the points, which can happen if the original scale is "too unbalanced" (e.g. a three-tone scale whose triangle has an angle exceeding 120 degrees and therefore has a [https://en.wikipedia.org/wiki/Fermat_point Fermat point] located at a vertex).
 
Due to the convexity of the problem the minimum is guaranteed global, but it may not always exist if the original scale is too unbalanced. It is unclear from sources whether the minimal cost is always 0 if it exists, but this seems to be the case in practice.


For example, a perfectly balanced approximation to Ptolemy's intense diatonic scale [1, 9/8, 5/4, 4/3, 3/2, 5/3, 15/8] displaces by the following cent values: [0, +8.61, +20.00, +23.60, +20.03, +9.97, +0.72]. The resulting scale is given by the following [[Scala]] file:
For example, a perfectly balanced approximation to Ptolemy's intense diatonic scale [1, 9/8, 5/4, 4/3, 3/2, 5/3, 15/8] displaces by the following cent values: [0, +8.61, +20.00, +23.60, +20.03, +9.97, +0.72]. The resulting scale is given by the following [[Scala]] file: