Skip to content

andrelmbackman/music-theory-api

Repository files navigation

Music Theory API

This API provides a simple interface for retrieving notes in different scales based on a given key.

Usage

Endpoints

The API currently responds to the following GET requests:

  • /scales/[key]/[scale_type]/notes

    Retrieves a list of notes in the specified scale for the given key.

    • key - A musical key, represented as any of the following:

      Key C C#/Db D Eb E F F#/Gb G G#/Ab A A#/Bb B
      Endpoint name C Csharp/Dflat D Eflat E F Fsharp/Gflat G Gsharp/Aflat A Bflat B
    • scale_type - The type of scale:

      major minor
    • Certain key and scale combinations will be altered to return the scale with the least key signatures.

      • Example: Db minor becomes C# minor.

Example

To retrieve the notes in the C# minor scale, you can make a GET request to:

0.0.0.0:8080/scales/Csharp/minor/notes

Response:

["C#","D#","E","F#","G#","A","B"]

TODO

  • Get the notes of a given key and scale [x]
  • Get the chords of a given key and scale [ ]
  • Return a random chord progression for a given key and scale [ ]

About

API for music theory purposes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages