Module:MOS gamut: Difference between revisions

Ganaram inukshuk (talk | contribs)
m Corrected UDP calculation
Ganaram inukshuk (talk | contribs)
mNo edit summary
Line 5: Line 5:
local p = {}
local p = {}


-- Helper function for creating a genchain, a sequence of named pitches where consecutive
-- Helper function for creating a genchain, or specifically, a nominal-accidental chain.
-- pitches are a generator apart. This can only work in one direction at a time, so it's
-- This can only work in one direction at a time, so it's necessary to call this twice,
-- necessary to call this twice if both an ascending and descending chain are needed. For
-- once for each direction (going up by the bright generator, or down). One genchain
-- a multi-period mos, multiple genchains are returned as an array of arrays, where each
-- is generated for each period, so this returns an array of arrays.
-- array has indices denote the number of generators going up (or down) and the element
-- denote the named pitch. For the single-period case, it's a size-1 array whose element
-- is a single genchain.
-- This genchain is agnostic of notation, and only denotes the mossteps needed to reach
-- This genchain is agnostic of notation, and only denotes the mossteps needed to reach
-- a note, followed by the number of chromas. For example, F# is reached going up 3
-- a note, followed by the number of chromas. For example, F# is reached going up 3
-- mossteps and adding one chroma; Fb is the same except subtracting one chroma.
-- mossteps and adding one chroma; Fb is the same except subtracting one chroma.
-- Specific notation is needed to interpret this into note names.
-- Parameters:
-- Parameters:
-- - input_mos - the mos itself represented as a data structure from Module:MOS
-- - input_mos - the mos itself represented as a data structure from Module:MOS