Module:MOS tunings: Difference between revisions
mNo edit summary |
m todo, comments |
||
| Line 12: | Line 12: | ||
-- TODO: | -- TODO: | ||
-- - Diatonic interval category lookup? | -- - Diatonic interval category lookup? | ||
| Line 120: | Line 118: | ||
-- normalized to x:1.) | -- normalized to x:1.) | ||
-- Tolerance is how many cents away from an et-step a ratio can be. This is | -- Tolerance is how many cents away from an et-step a ratio can be. This is | ||
-- 30% of the small step size, and maxes out at 30 | -- by default 30% of the small step size, and maxes out at 30 cent. Can be | ||
-- overridden with a custom tolerance value. | |||
local steps_in_et = input_mos.nL * avg_step_ratio[1] + input_mos.ns * avg_step_ratio[2] | local steps_in_et = input_mos.nL * avg_step_ratio[1] + input_mos.ns * avg_step_ratio[2] | ||
local tolerance = tolerance or math.min((mos.equave_to_cents(input_mos) / steps_in_et) * 0.30, 30) | local tolerance = tolerance or math.min((mos.equave_to_cents(input_mos) / steps_in_et) * 0.30, 30) | ||