Scale Compendium by Bryan Appel, v1.7
This script will quantize incoming MIDI notes to a preset scale, of which over 30 are included along with their associated modes. Also included are an assortment of common triads and 7th chords.
Scales are organized in three banks. There are up to ten scales per bank, with each scale having a number of modes equal to the number of notes in the scale (except for the symetrical scales, which are a special case).
Press the SHIFT key to change banks. Use the SCALE knob to select the scale and the MODE knob to select the mode. The KEY knob changes the root note.
It is possible to link two or more instances of Scale Compedium together so that any control change made in one instance will be reflected in the other(s). Press and hold the SHIFT key for one second to toggle LINK MODE on and off (the log screen will display the mode). All instances that have LINK enabled will synchronize when the host transport is playing.
the STYLE knob determines what the script will do when it encounters a note outside the scale. STYLE 1 will filter out all out-of-scale notes; only notes in the scale will sound. STYLE 2 & 3 will move out-of-scale notes to the nearest scale note, but if there are two equally distant notes, STYLE 2 will move to the higher note while STYLE 3 will move to the lower note. STYLE 4 will always move up to the next scale step regardless of distance whereas STYLE 5 will always move down to the previous step. STYLE 6 will quantize toward the root, perfect fifth, or major or minor third whenever possible. STYLE 7 uses a random coin toss to determine whether to quantize up or down.
STYLE 8 maps every scale to a chromatic row. This is intended to be used with controllers such as the Novation Launchpad that do not have a traditional piano keyboard.
STYLE 9 is White Keys Mode. This style allows you play scales using only the white keys. Keep in mind that in this style the sounding pitch of a note does not correspond to the value of the key that plays it.
NOTE: Both STYLE 8 & 9 have a starting note that is set by the variable ‘startNote.’ All notes below this note will be ignored. There is another variable called ‘startNotePitch.’ This variable controlls the pitch of the lowest note (and thus all subsequent notes). By default both these variables are set to MIDI Note 60 (middle C). You can find these variables at the top of the code.
For a scale quantizer with user-adjustable scales, see Wim’ Simple Sacler here: https://patchstorage.com/simple-scaler/