Module:ED intro: Difference between revisions

Ganaram inukshuk (talk | contribs)
Bugfix for ed-constant and invalid input
Ganaram inukshuk (talk | contribs)
m tonumber(steps)
Line 30: Line 30:
local intro_text = ""
local intro_text = ""
if ed == 1 then
if ed == 1 then
intro_text = "'''''k'' equal divisions of the octave''' (abbreviated '''''k''edo''' or '''''k''ed2'''), also called '''''k''-tone equal temperament''' ('''''k''tet''') or '''''k'' equal temperament''' ('''''k''et''') when viewed under a [[regular temperament]] perspective, is the [[tuning system]] where adjacent pitches are one interval of 2/1 (one [[octave]]) apart, or exactly/about ''s'' [[¢]]."
intro_text = "'''1 equal division of the octave''' (abbreviated '''1edo''' or '''1ed2'''), also called '''1-tone equal temperament''' ('''1tet''') or '''1 equal temperament''' ('''1et''') when viewed under a [[regular temperament]] perspective, is the [[tuning system]] where adjacent pitches are one interval of 2/1 (one [[octave]]) apart, or exactly/about ''s'' [[¢]]."
else
else
intro_text = "'''''k'' equal divisions of the octave''' (abbreviated '''''k''edo''' or '''''k''ed2'''), also called '''''k''-tone equal temperament''' ('''''k''tet''') or '''''k'' equal temperament''' ('''''k''et''') when viewed under a [[regular temperament]] perspective, is the [[tuning system]] that divides the [[octave]] into ''k'' [[equal]] parts of exactly/about ''s'' [[¢]] each. Each step represents a [[frequency ratio]] of 2<sup>1/''k''</sup>, or the ''kth'' root of 2."
intro_text = "'''''k'' equal divisions of the octave''' (abbreviated '''''k''edo''' or '''''k''ed2'''), also called '''''k''-tone equal temperament''' ('''''k''tet''') or '''''k'' equal temperament''' ('''''k''et''') when viewed under a [[regular temperament]] perspective, is the [[tuning system]] that divides the [[octave]] into ''k'' [[equal]] parts of exactly/about ''s'' [[¢]] each. Each step represents a [[frequency ratio]] of 2<sup>1/''k''</sup>, or the ''kth'' root of 2."
Line 57: Line 57:
local intro_text = ""
local intro_text = ""
if ed == 1 then
if ed == 1 then
intro_text = "'''''k'' equal divisions of the tritave''', '''perfect twelfth''', or '''3rd harmonic''' (abbreviated '''''k''edt''' or '''''k''ed3'''), is the [[nonoctave]] [[tuning system]] where adjacent pitches are one interval of 3/1 (one [[tritave]]) apart, or exactly/about ''s'' [[¢]]."
intro_text = "'''1 equal division of the tritave''', '''perfect twelfth''', or '''3rd harmonic''' (abbreviated '''1edt''' or '''1ed3'''), is the [[nonoctave]] [[tuning system]] where adjacent pitches are one interval of 3/1 (one [[tritave]]) apart, or exactly/about ''s'' [[¢]]."
else
else
intro_text = "'''''k'' equal divisions of the tritave''', '''perfect twelfth''', or '''3rd harmonic''' (abbreviated '''''k''edt''' or '''''k''ed3'''), is the [[nonoctave]] [[tuning system]] that divides the interval of [[3/1]] into ''k'' [[equal]] parts of exactly/about ''s'' [[¢]] each. Each step represents a [[frequency ratio]] of 3<sup>1/''k''</sup>, or the ''kth'' root of 3."
intro_text = "'''''k'' equal divisions of the tritave''', '''perfect twelfth''', or '''3rd harmonic''' (abbreviated '''''k''edt''' or '''''k''ed3'''), is the [[nonoctave]] [[tuning system]] that divides the interval of [[3/1]] into ''k'' [[equal]] parts of exactly/about ''s'' [[¢]] each. Each step represents a [[frequency ratio]] of 3<sup>1/''k''</sup>, or the ''kth'' root of 3."
Line 84: Line 84:
local intro_text = ""
local intro_text = ""
if ed == 1 then
if ed == 1 then
intro_text = "'''''k'' equal divisions of the perfect fifth''' (abbreviated '''''k''edf''' or '''''k''ed3/2'''), is the [[nonoctave]] [[tuning system]] where adjacent pitches are one interval of 3/2 (one [[tritave]]) apart, or exactly/about ''s'' [[¢]]."
intro_text = "'''1 equal division of the perfect fifth''' (abbreviated '''1edf''' or '''1ed3/2'''), is the [[nonoctave]] [[tuning system]] where adjacent pitches are one interval of 3/2 (one [[tritave]]) apart, or exactly/about ''s'' [[¢]]."
else
else
intro_text = "'''''k'' equal divisions of the perfect fifth''' (abbreviated '''''k''edf''' or '''''k''ed3/2'''), is the [[nonoctave]] [[tuning system]] that divides the interval of [[3/2]] into ''k'' [[equal]] parts of exactly/about ''s'' [[¢]] each. Each step represents a [[frequency ratio]] of (3/2)<sup>1/''k''</sup>, or the ''kth'' root of 3/2."
intro_text = "'''''k'' equal divisions of the perfect fifth''' (abbreviated '''''k''edf''' or '''''k''ed3/2'''), is the [[nonoctave]] [[tuning system]] that divides the interval of [[3/2]] into ''k'' [[equal]] parts of exactly/about ''s'' [[¢]] each. Each step represents a [[frequency ratio]] of (3/2)<sup>1/''k''</sup>, or the ''kth'' root of 3/2."
Line 112: Line 112:
local intro_text = ""
local intro_text = ""
if ed == 1 then
if ed == 1 then
intro_text = "'''''k'' equal divisions of the hth harmonic''' (abbreviated '''''k''ed''h'''''), is the [[nonoctave]] [[tuning system]] where adjacent pitches are one interval of [[''h''/1]] apart, or exactly/about ''s'' [[¢]]."
intro_text = "'''1 equal division of the hth harmonic''' (abbreviated '''1ed''h'''''), is the [[nonoctave]] [[tuning system]] where adjacent pitches are one interval of [[''h''/1]] apart, or exactly/about ''s'' [[¢]]."
else
else
intro_text = "'''''k'' equal divisions of the hth harmonic''' (abbreviated '''''k''ed''h'''''), is the [[nonoctave]] [[tuning system]] that divides the interval of [[''h''/1]] into ''k'' [[equal]] parts of exactly/about ''s'' [[¢]] each. Each step represents a [[frequency ratio]] of ''h''<sup>1/''k''</sup>, or the ''kth'' root of ''h''."
intro_text = "'''''k'' equal divisions of the hth harmonic''' (abbreviated '''''k''ed''h'''''), is the [[nonoctave]] [[tuning system]] that divides the interval of [[''h''/1]] into ''k'' [[equal]] parts of exactly/about ''s'' [[¢]] each. Each step represents a [[frequency ratio]] of ''h''<sup>1/''k''</sup>, or the ''kth'' root of ''h''."
Line 142: Line 142:
local intro_text = ""
local intro_text = ""
if ed == 1 then
if ed == 1 then
intro_text = "'''''k'' equal divisions of ''p/q''''' (abbreviated '''''k''ed''p/q''''') is the [[nonoctave]] [[tuning system]] where adjacent pitches are one interval of [[p/q]] apart, or exactly/about ''s'' [[¢]]."
intro_text = "'''1 equal division of ''p/q''''' (abbreviated '''1ed''p/q''''') is the [[nonoctave]] [[tuning system]] where adjacent pitches are one interval of [[p/q]] apart, or exactly/about ''s'' [[¢]]."
else
else
intro_text = "'''''k'' equal divisions of ''p/q''''' (abbreviated '''''k''ed''p/q''''') is the [[nonoctave]] [[tuning system]] that divides the interval of [[''p/q'']] into ''k'' [[equal]] parts of exactly/about ''s'' [[¢]] each. Each step represents a [[frequency ratio]] of ''p/q''<sup>1/''k''</sup>, or the ''kth'' root of ''p/q''."
intro_text = "'''''k'' equal divisions of ''p/q''''' (abbreviated '''''k''ed''p/q''''') is the [[nonoctave]] [[tuning system]] that divides the interval of [[''p/q'']] into ''k'' [[equal]] parts of exactly/about ''s'' [[¢]] each. Each step represents a [[frequency ratio]] of ''p/q''<sup>1/''k''</sup>, or the ''kth'' root of ''p/q''."
Line 195: Line 195:
end
end
return steps, parsed_equave
return tonumber(steps), parsed_equave
end
end