monome/teletype

N.CS lookup tables and documentation/help errors

dstroud opened this issue · 0 comments

Please describe the bug.

  1. N.CS lookup values are in a different order depending on where we look:
N.CS N.CS Documentation N.CS Help N.S
Major Major Major Major
Natural Minor Natural Minor Natural Minor Natural Minor
Harmonic Minor Harmonic Minor Harmonic Minor Harmonic Minor
Melodic Minor Melodic Minor Melodic Minor Melodic Minor
Dorian Dorian Dorian Dorian
Phrygian Phrygian Phrygian Phrygian
Lydian Lydian Lydian Lydian
Locrian Myxolidian Locrian Myxolidian
Myxolidian Locrian Myxolidian Locrian
  1. The documentation has the wrong chord indices listed for the 'myxolidian' entry. Instead of {6, 0, 1, 1, 0, 2, 1} it should be {2, 1, 6, 0, 1, 1, 0}. The Locrian entry has the correct indices but the N.CS op does not work as expected due to issue # 1.

  2. AFAIK, the conventional spelling is 'mixolydian' rather than 'myxolidian'. This might be a good opportunity to update.

I propose a fix involving changing the order of the scales to be consistent with N.S and fixing the documentation to have the correct indices.

Please include the hash displayed at startup and the release of the software (e.g. "Teletype v2.0.1 5f838c9")

I've reproduced the issue on Teletype I2M Beta 2 but it appears present in the sources below.

What steps are required to reproduce the bug?

See the following:

teletype/src/table.c

Lines 134 to 145 in 79db601

// chord scales for N.CS op - values are indices into table_n_c
const uint8_t table_n_cs[9][7] = {
{ 0, 1, 1, 0, 2, 1, 6 }, // Major
{ 1, 6, 0, 1, 1, 0, 2 }, // Natural Minor
{ 8, 6, 7, 1, 2, 0, 3 }, // Harmonic Minor
{ 8, 1, 7, 2, 2, 6, 6 }, // Melodic Minor
{ 1, 1, 0, 2, 1, 6, 0 }, // Dorian
{ 1, 0, 2, 1, 6, 0, 1 }, // Phrygian
{ 0, 2, 1, 6, 0, 1, 1 }, // Lydian
{ 6, 0, 1, 1, 0, 2, 1 }, // Locrian
{ 2, 1, 6, 0, 1, 1, 0 }, // Myxolydian
};

Chord Scales - Refer to chord indices in `N.C` OP
- `0` = Major `{0, 1, 1, 0, 2, 1, 6}`
- `1` = Natural Minor `{1, 6, 0, 1, 1, 0, 2}`
- `2` = Harmonic Minor `{8, 6, 7, 1, 2, 0, 3}`
- `3` = Melodic Minor `{8, 1, 7, 2, 2, 6, 6}`
- `4` = Dorian `{1, 1, 0, 2, 1, 6, 0}`
- `5` = Phrygian `{1, 0, 2, 1, 6, 0, 1}`
- `6` = Lydian `{0, 2, 1, 6, 0, 1, 1}`
- `7` = Myxolidian `{6, 0, 1, 1, 0, 2, 1}`
- `8` = Locrian `{6, 0, 1, 1, 0, 2, 1}`

teletype/module/help_mode.c

Lines 246 to 264 in f6bc024

"CHORD SCALE NOTE OP - N.CS",
"N.CS R S D C",
" R = ROOT (0-127)",
" S = SCALE (0-8) *",
" D = SCALE DEGREE (1-7) *",
" C = CHORD COMPONENT (0-3) *",
" * S, D, C WILL WRAP",
" NEGATIVE INDEXING OK",
" SCALES - SEE CHORDS ABOVE",
" MAJ = 0, 1, 1, 0, 2, 1, 6",
" NMI = 1, 6, 0, 1, 1, 0, 2",
" HMI = 8, 6, 7, 1, 2, 0, 3",
" MMI = 8, 1, 7, 2, 2, 6, 6",
" DOR = 1, 1, 0, 2, 1, 6, 0",
" PHR = 1, 0, 2, 1, 6, 0, 1",
" LYD = 0, 2, 1, 6, 0, 1, 1",
" LOC = 6, 0, 1, 1, 0, 2, 1",
" MYX = 2, 1, 6, 0, 1, 1, 0",
" RETURNS N TABLE VALUE" };