User:Xenoindex/MOS Production Rules

From Xenharmonic Wiki
Jump to navigation Jump to search

MOSes have a recursive structure so they have rules to produce them.

I'm not really sure how to explain what I've done here with words so I'll just show an example worked out by hand.


Lets figure out the MOS Production Rules for the 4L3s MOS scale LLsLsLs.

We begin by chunking also known as dividing the scale into segments called chunks that each contain exactly one s on the right-most end.

Start chunking from the brightest mode to avoid having to wrap around.


LLsLsLs chunks into the three chunks LLs, Ls, and Ls.

The largest chunk LLs will be replaced with L and the smallest chunk Ls will be replaced with s.

Note the length of the largest chunk LLs is 3, add it to the beginning of a list: [3]


LLs -> L

Ls -> s

LLsLsLs becomes Lss


Lss chunks into two chunks Ls and s.

The largest chunk Ls will be replaced with L and the smallest chunk s will be replaced with s.

Note the length of the largest chunk is 2, add it to the beginning of the list. [2, 3]


Ls -> L

s -> s

Lss becomes Ls


Ls chunks into only one chunk so the process is complete.

Note the length of the final chunk is 2, add it to the beginning of the list. [2, 2, 3]

[2, 2, 3] are the production rules for this MOS (LLsLsLs).

In a less compact form the production rules [2, 2, 3] would be something like:


axiom: Ls

iteration 1 rules: (L -> Ls), (s -> s)

iteration 2 rules: (L -> LLs), (s -> Ls)


But that isn't as nice and compact as a simple list of numbers.


Now to use the production rules [2, 2, 3] to generate the MOS.


The first element from the rules [2, 2, 3] is 2 which is the axiom.

Start with a chunk size of 2: Ls


The next element from the rules [2, 2, 3] is 2 which is the size of chunk to replace each L by.

2 means each L is to be replaced with a chunk of size 2 or the replacement rule: L -> Ls

The replacement rule for s is always one smaller than the one for L. (This feels like a discovery)

2-1 is 1 so that means each s is to be replaced with a chunk of size 1 or the replacement rule: s -> s


L -> Ls

s -> s

Ls becomes Lss


The next and final element from the rules [2, 2, 3] is 3 which is the size of chunk to replace each L by.

3 means each L is to be replaced with a chunk of size 3 or the replacement rule: L -> LLs

3-1 is 2 so that means each s is to be replaced with a chunk of size 2 or the replacement rule: s -> Ls


L -> LLs

s -> Ls

Lss becomes LLsLsLs


The end of the production rules has been reached so the process is complete.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