Retrieve a scale based on a given mode and starting note.
Retrieve a scale based on a given mode and starting note. Information about these scales can be found on Wikipedia.
Currently supported scales:
- super locrian
- bebop dominant
- double harmonic
- harmonic major
- harmonic minor
- hungarian minor
- hungarian major
- lydian augmented
- locrian major
- pentatonic major
- melodic minor ascending
- melodic minor descending
- pentatonic minor
- neapolitan major
- neapolitan minor
- octatonic c-d
- octatonic c-c#
- phrygian dominant
- two-semitone tritone
- ukranian dorian
- whole-tone scale
The Note class
Notes can be specified with either a name or a given number of semitones above middle C (C3). Octaves are done MIDI-style, so B2 is immediately followed by C3. Example notes:
Note("D")the first D above middle C
Note(2)two semitones above middle C, which is the same as
Notes have two fundamental properties:
You can retrieve both together MIDI style with:
You can add an integer to a note to raise it by that many semitones:
Note("C") + 12the first C above middle C
musical_scales.scale("D") # Defaults to major scale # [D3, E3, F#3, G3, A3, B3, C#4, D4] musical_scales.scale("F#", "blues") # [F#3, A3, B3, C4, C#4, E4, F#4]
Detailed documentation can be found at readthedocs.io as well as in the docstrings of the python files themselves.
The source code is available under the MIT licence and can be found on Hector Miller-Bakewell's github.
This package was created as part of the QuTune Project.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.