Module:MOS intro: Difference between revisions

Ganaram inukshuk (talk | contribs)
Broke up the function that generates the intro into several helper functions to make it easier to add additional info
Ganaram inukshuk (talk | contribs)
m Fixed error with links and link text
Line 98: Line 98:
-- Is the scale nonoctave?
-- Is the scale nonoctave?
if equave_in_cents == 1200 then
if equave_in_cents == 1200 then
sentence = sentence .. string.format("an [[octave-equivalent]] [[moment of symmetry]] scale")
sentence = sentence .. string.format("an [[octave-equivalent|octave equivalence]] [[moment of symmetry]] scale")
else
else
sentence = sentence .. string.format("a [[non-octave]], [[%s]]-equivalent [[moment_of_symmetry]] scale", equave_as_ratio)
sentence = sentence .. string.format("a [[non-octave]], [[%s]]-equivalent [[moment_of_symmetry]] scale", equave_as_ratio)
Line 174: Line 174:
local dark_gen_max = equave_in_cents / n - bright_gen_min
local dark_gen_max = equave_in_cents / n - bright_gen_min
local sentence = string.format("[[Generating intervals|generator]] that produce this scale range from %.3f¢ to %.3f¢, or from %.3f¢ to %.3f¢.", bright_gen_min, bright_gen_max, dark_gen_min, dark_gen_max)
local sentence = string.format("[[generator|Generating intervals]] that produce this scale range from %.3f¢ to %.3f¢, or from %.3f¢ to %.3f¢.", bright_gen_min, bright_gen_max, dark_gen_min, dark_gen_max)
return sentence
return sentence