Mu (μ) is a function for equal tuning badness provided by Vector Graphics.

It is defined as:

[math]\displaystyle{ \mu\left(x\right)=\sum_{k=1}^{\infty}f\left(x,k\right) }[/math]

where

[math]\displaystyle{ f\left(x,k\right)=\frac{\operatorname{abs}\left(\operatorname{mod}\left(2g\left(k\right)x,2\right)-1\right)}{k^{2}} }[/math]

and

[math]\displaystyle{ g\left(k\right)=\log_{2}\left(k\right) }[/math]

It is derived as follows:

For each integer k, the relative error on that integer in the continuum of equal tunings follows a zigzag line where 0 is an equal division of k, and 1 is an odd equal division of 2k (which has the largest possible error on k). Such a zigzag line takes the form of:

[math]\displaystyle{ \operatorname{abs}\left(\operatorname{mod}\left(2x,2\right)-1\right) }[/math]

for k = 2, if integer values of x are edos.

Equal divisions of any integer k can be found by multiplying 2x by

[math]\displaystyle{ g\left(k\right)=\log_{2}\left(k\right) }[/math].


As such, finding our final function is simply a matter of summing up

[math]\displaystyle{ \operatorname{abs}\left(\operatorname{mod}\left(2g\left(k\right)x,2\right)-1\right) }[/math]

for all integers k. To make the sum finite at all values, we weight each term by 1/(k^2), producing our final formula for f, and thus for μ.


WIP