Godtone
Joined 17 December 2020
→Isomorphic keyboard code for launchpads with programmer mode: add various functions for generating visually and mathematically interesting subsets of the approximation of 6-bit colour |
→My Python 3 code: IMPORTANT BUGFIX (correct et_badness's default badness parameter to *actually* use the square of the error measured in octaves, so that the default error for an `optimal_edo_sequence` is *actually* in terms of the square of the absolute error) |
||
| Line 1,303: | Line 1,303: | ||
# the default badness is the sum of the squares of the errors with each interval's contribution weighted proportional to its odd-limit complexity, | # the default badness is the sum of the squares of the errors with each interval's contribution weighted proportional to its odd-limit complexity, | ||
# in terms of absolute (cent/octave) error (corresponding to the multiplication by et2) and divided by the sum of the weightings of the intervals. | # in terms of absolute (cent/octave) error (corresponding to the multiplication by et2) and divided by the sum of the weightings of the intervals. | ||
def et_badness(ivs,v,badness=lambda rel_err,x,et2: rel_err**2 * et2,weighting=lambda x: iv_complexity(x),combine='avg',et2=0): | def et_badness(ivs,v,badness=lambda rel_err,x,et2: rel_err**2 * et2**2,weighting=lambda x: iv_complexity(x),combine='avg',et2=0): | ||
# if the weighting is unspecified, use the default of: | # if the weighting is unspecified, use the default of: | ||
# weighting an interval x proportional to its odd-limit complexity iv_complexity(x); | # weighting an interval x proportional to its odd-limit complexity iv_complexity(x); | ||