Retrieve a scale based on a given mode and starting note.
Project description
Musical Scales
Retrieve a scale based on a given mode and starting note. Information about these scales can be found on Wikipedia.
Currently supported scales:
- acoustic
- aeolian
- algerian
- super locrian
- augmented
- bebop dominant
- blues
- chromatic
- dorian
- double harmonic
- enigmatic
- flamenco
- romani
- half-diminished
- harmonic major
- harmonic minor
- hijaroshi
- hungarian minor
- hungarian major
- in
- insen
- ionian
- iwato
- locrian
- lydian augmented
- lydian
- locrian major
- pentatonic major
- melodic minor ascending
- melodic minor descending
- pentatonic minor
- mixolydian
- neapolitan major
- neapolitan minor
- octatonic c-d
- octatonic c-c#
- persian
- phrygian dominant
- phrygian
- prometheus
- harmonics
- tritone
- two-semitone tritone
- ukranian dorian
- whole-tone scale
- yo
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 CNote(2)
two semitones above middle C, which is the same asNote("D")
.
Notes have two fundamental properties:
.name
e.g."C"
.octave
e.g.3
You can retrieve both together MIDI style with:
.midi
e.g. "F#4"
You can add an integer to a note to raise it by that many semitones:
Note("C") + 12
the first C above middle C
Examples
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]
Documentation
Detailed documentation can be found at readthedocs.io as well as in the docstrings of the python files themselves.
Licensing
The source code is available under the MIT licence and can be found on Hector Miller-Bakewell's github.
Acknowledgements
This package was created as part of the QuTune Project.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file musical-scales-1.0.1.tar.gz
.
File metadata
- Download URL: musical-scales-1.0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89cfd620903cb0de619de02f1581b2e969c48165bea011012c669d78864576b2 |
|
MD5 | b40ae5042874d640eb86c2e1f24fc7ff |
|
BLAKE2b-256 | aa7c3f10a1846a453de621418c5660a28f6b516270a82fee5fb2ddf69b019a68 |