Module:MOS intervals: Difference between revisions

Ganaram inukshuk (talk | contribs)
Dropped support for mos-ordinals
Sintel (talk | contribs)
import gcd from utils
Line 2: Line 2:
local rat = require('Module:Rational')
local rat = require('Module:Rational')
local ord = require('Module:Ordinal')
local ord = require('Module:Ordinal')
local utils = require('Module:Utils')
local p = {}
local p = {}


Line 54: Line 55:
-- Get the number of steps per period and equave
-- Get the number of steps per period and equave
local steps_per_equave = (input_mos.nL + input_mos.ns)
local steps_per_equave = (input_mos.nL + input_mos.ns)
local steps_per_period = steps_per_equave / rat.gcd(input_mos.nL, input_mos.ns)
local steps_per_period = steps_per_equave / utils._gcd(input_mos.nL, input_mos.ns)
-- Get the step counts for the bright and dark generators
-- Get the step counts for the bright and dark generators