Godtone
Joined 17 December 2020
m →Novation Launchpad Pro MK3 isomorphic keyboard code: (note potential error) |
m →My Python 3 code: as the badness function is undefined, although the names are intuitive, it's much more practical to directly specify the weighting. |
||
| Line 1,341: | Line 1,341: | ||
# strict_optimal_edo_sequence is unaffected however. | # strict_optimal_edo_sequence is unaffected however. | ||
def et_badness(ivs,v,badness=lambda rel_err,x,et2: rel_err**2 * et2**2,weighting=lambda x: iv_complexity(x),combine='avg',mapping=True,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',mapping=True,et2=0): | ||
# | # weighting=2 is recommended for MSE so that we weight intervals proportional to their odd-limit complexity. | ||
# by contrast, the default, weighting=1, is perhaps the only weighting that makes maximal sense generally (w/ badness unspecified). | |||
# | # if you feel some EDOs are missing, try half-integer weightings, tweaking badness, changing combine and even setting mapping=False. | ||
# (or simply adjusting the set of intervals you wish to approximate.) | |||
# | |||
if type(weighting) in [int,float]: | if type(weighting) in [int,float]: | ||
weighting = lambda x,w=weighting: iv_complexity(x)**w | weighting = lambda x,w=weighting: iv_complexity(x)**w | ||