Module:JI ratios: Difference between revisions
Found a way to use mediant search with ratios 1/1 and 1/0 to find ratios from 1/1 to arbitrary equave, without finding ratios from 1/1 to 2/1 and then multiplying by (powers of) 2; requires significant rewrites to int limit search and dependent modules; updated todo |
m m.member_name -> med.member_name; use standalone int-limit search function |
||
| Line 2: | Line 2: | ||
local utils = require("Module:Utils") | local utils = require("Module:Utils") | ||
local tip = require("Module:Template input parse") | local tip = require("Module:Template input parse") | ||
local | local med = require("Module:Mediants") | ||
p = {} | p = {} | ||
| Line 54: | Line 54: | ||
local init_ratios = {{1,1}, {2,1}} | local init_ratios = {{1,1}, {2,1}} | ||
local ratios = med.find_only_mediants_by_int_limit(init_ratios, integer_limit) | |||
local ratios = | |||
-- If the max cents is greater than the octave, duplicate all existing | -- If the max cents is greater than the octave, duplicate all existing | ||
| Line 425: | Line 423: | ||
search_args["equave"] = {5,4} | search_args["equave"] = {5,4} | ||
search_args["int_limit"] = 30 | search_args["int_limit"] = 30 | ||
local ratios = | local ratios = med.find_only_mediants_by_search_func({{1,1},{1,0}}, p.int_limit_equave_cutoff_search, search_args) | ||
--local ratios = p.search_by_int_limit(30) | --local ratios = p.search_by_int_limit(30) | ||