Spent some time putting various scales into step values for cpsmidiin
Now I’m just wondering if there’s a more elegant way to do this (selecting the scale from the combobox) other than endless elseif
's.
I was thinking of using a 2d array but I think it might use the same amount of code… anyway this is really ugly so looking forward to seeing if anyone has a better suggestion
iScaleSelect=chnget("Scale")
if iScaleSelect == 1 then
giNotes[] fillarray 0, 2, 4, 7, 11, 12, 14, 17 ;Major
elseif iScaleSelect == 2 then
giNotes[] fillarray 0, 2, 3, 7, 10, 12, 15, 19 ;minor
elseif iScaleSelect == 3 then
giNotes[] fillarray 0, 2, 4, 7, 9, 12, 16, 19 ;Major Pent
elseif iScaleSelect == 4 then
giNotes[] fillarray 0, 3, 5, 7, 9, 12, 15, 19 ;minor Pent
elseif iScaleSelect == 5 then
giNotes[] fillarray 0, 3, 5, 7, 8, 11, 12, 14 ;Harmonic Minor
elseif iScaleSelect == 6 then
giNotes[] fillarray 0, 3, 5, 7, 9, 11, 12, 14 ;Melodic Minor
elseif iScaleSelect == 7 then
giNotes[] fillarray 0, 1, 4, 5, 7, 8, 11, 12 ;Hijaz Kar
elseif iScaleSelect == 8 then
giNotes[] fillarray 0, 2, 3, 7, 8, 12, 15, 20 ;Hirajoshi
elseif iScaleSelect == 2 then
giNotes[] fillarray 0, 2, 5, 7, 9, 12, 2, 14 ;Yo
elseif iScaleSelect == 9 then
giNotes[] fillarray 0, 2, 3, 6, 7, 8, 11, 12 ;Hungarian Minor
elseif iScaleSelect == 10 then
giNotes[] fillarray 0, 2, 4, 6, 7, 9, 11, 12 ;Lydian
elseif iScaleSelect == 11 then
giNotes[] fillarray 0, 2, 4, 5, 7, 9, 10, 12 ;mixolydian
elseif iScaleSelect == 12 then
giNotes[] fillarray 0, 2, 3, 5, 7, 9, 10, 12 ;Dorian
elseif iScaleSelect == 13 then
giNotes[] fillarray 0, 2, 3, 5, 7, 8, 10, 12 ;Aeolian
elseif iScaleSelect == 14 then
giNotes[] fillarray 0, 1, 3, 5, 7, 8, 10, 12 ;Phrygian
elseif iScaleSelect == 15 then
giNotes[] fillarray 0, 1, 3, 5, 6, 8, 10, 12 ;Locrian
endif