The name of the scale type, e.g. 'Major', 'Harmonic Minor', 'Phrygian', 'My Special Scale', etc.
The shape property defines which notes make up a scale of this type.
For example, the major scale would have shape [0,2,4,5,7,9,11], because when you create a major scale, it will have a note 2 semi-tones above the root, a note 4 semi-tones above the root, etc.
If 0 is omitted from the shape, then it will automatically be added, so the above example could also be expressed as [2,4,5,7,9,11].
The relativityToMajor property is used by some of the functions for fetching related scales. For example, the natural minor scale would have relativityToMajor = -3 (or 9), because the root of the natural minor scale is expected to be 3 semi-tones below (or 9 above) the root of its relative major scale. Meanwhile Dorian would have relativityToMajor = 2.
The name of the scale type, e.g. 'Major', 'Harmonic Minor', 'Phrygian', 'My Special Scale', etc.
The relativityToMajor property is used by some of the functions for fetching related scales. For example, the natural minor scale would have relativityToMajor = -3 (or 9), because the root of the natural minor scale is expected to be 3 semi-tones below (or 9 above) the root of its relative major scale. Meanwhile Dorian would have relativityToMajor = 2.
The shape property defines which notes make up a scale of this type.
For example, the major scale would have shape [0,2,4,5,7,9,11], because when you create a major scale, it will have a note 2 semi-tones above the root, a note 4 semi-tones above the root, etc.
Returns the name of this type. This can be used rather than instanceof which is sometimes unreliable.
Static
aeolianSame as ScaleTemplate.naturalMinor, but more old school.
Static
diminishedThe pre-defined diminished scale template.
Static
dorianThe pre-defined dorian scale template.
Static
harmonicThe pre-defined harmonic minor scale template.
Static
ionianSame as ScaleTemplate.major, but more old school.
Static
locrianThe pre-defined locrian scale template.
Static
lydianThe pre-defined lydian scale template.
Static
majorThe pre-defined major scale template.
Static
majorThe pre-defined major pentatonic scale template.
Static
melodicThe pre-defined melodic minor scale template. Note, this is the jazz version of the scale, since shimi has no concept of scales being different when ascending vs descending.
Static
minorThe pre-defined minor pentatonic scale template.
Static
mixolydianThe pre-defined mixolydian scale template.
Static
naturalThe pre-defined natural minor scale template.
Static
phrygianThe pre-defined phrygian scale template.
Static
wholeThe pre-defined whole tone scale template.
Returns a new Scale object for a specific root, with properties inherited from the Template that created it.
The root of the new Scale object. Can also take pitch names, see the pitch method for more information.
Generated using TypeDoc
The ScaleTemplate class represents a scale in abstract, before it has been associated with any specific root. It instead defines some of the qualities of any scale to be created from it.
The expected usage of this is to use one of the pre-defined scale templates already provided to generate scale objects, for example:
shimi.ScaleTemplate.major.create(shimi.pitch('D'))
However, you can also use this class to define your own custom scale types, for example: