Git Product home page Git Product logo

musical-scales's Introduction

Generate Musical Scales

qutune-logo-2

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 C
  • Note(2) two semitones above middle C, which is the same as Note("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.

musical-scales's People

Contributors

hmillerbakewell avatar iccmr-quantum avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.