music-theory

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

README

Build Status GoDoc Go Report Card codebeat badge

https://gopkg.in/music-theory.v0

Music theory models in Go

There's an example command-line utility music-theory.go to demo the libraries, with a bin/ wrapper.

To build and install music-theory to your machine:

make install

Then, to calculate the note pitch classes for a specified Chord:

$ music-theory chord "Cm nondominant -5 679"

root: C
tones:
  3: D#
  6: A
  7: A#
  9: D

To list the names of all the known chord-building rules:

$ music-theory chords

- Basic
- Nondominant
- Major Triad
- Minor Triad
- Augmented Triad
- Diminished Triad
- Suspended Triad
- Omit Fifth
- Flat Fifth
- Add Sixth
- Augmented Sixth
- Omit Sixth
- Add Seventh
- Dominant Seventh
- Major Seventh
- Minor Seventh
- Diminished Seventh
- Half Diminished Seventh
- Diminished Major Seventh
- Augmented Major Seventh
- Augmented Minor Seventh
- Harmonic Seventh
- Omit Seventh
- Add Ninth
- Dominant Ninth
- Major Ninth
- Minor Ninth
- Sharp Ninth
- Omit Ninth
- Add Eleventh
- Dominant Eleventh
- Major Eleventh
- Minor Eleventh
- Omit Eleventh
- Add Thirteenth
- Dominant Thirteenth
- Major Thirteenth
- Minor Thirteenth

To calculate the note pitch classes for a specified Scale:

$ music-theory scale "C aug"

root: C
tones:
  1: C
  2: D#
  3: E
  4: G
  5: G#
  6: B

To list the names of all the known scale-building rules:

$ music-theory scales

- Default (Major)
- Minor
- Major
- Natural Minor
- Diminished
- Augmented
- Melodic Minor Ascend
- Melodic Minor Descend
- Harmonic Minor
- Ionian
- Dorian
- Phrygian
- Lydian
- Mixolydian
- Aeolian
- Locrian

To determine a key:

$ music-theory key Db

root: Db
mode: Major
relative:
  root: Bb
  mode: Minor
Credit

Charney Kaye

XJ Music

Note

A Note is used to represent the relative duration and pitch of a sound.

GoDoc Coverage

Key

The key of a piece is a group of pitches, or scale upon which a music composition is created in classical, Western art, and Western pop music.

GoDoc Coverage

Chord

In music theory, a chord is any harmonic set of three or more notes that is heard as if sounding simultaneously.

GoDoc Coverage

Scale

In music theory, a scale is any set of musical notes ordered by fundamental frequency or pitch.

GoDoc Coverage

Documentation

Overview

Notes, Keys, Chords and Scales

There's an example command-line utility `music-theory.go` to demo the libraries, with a `bin/` wrapper.

Build and install `music-theory` to your machine

make install

Determine a Chord

$ music-theory chord "Cm nondominant -5 679"

root: C
tones:
  3: D#
  6: A
  7: A#
  9: D

List known chord-building rules

$ music-theory chords

- Basic
- Nondominant
- Major Triad
- Minor Triad
- Augmented Triad
- Diminished Triad
- Suspended Triad
- Omit Fifth
- Flat Fifth
- Add Sixth
- Augmented Sixth
- Omit Sixth
- Add Seventh
- Dominant Seventh
- Major Seventh
- Minor Seventh
- Diminished Seventh
- Half Diminished Seventh
- Diminished Major Seventh
- Augmented Major Seventh
- Augmented Minor Seventh
- Harmonic Seventh
- Omit Seventh
- Add Ninth
- Dominant Ninth
- Major Ninth
- Minor Ninth
- Sharp Ninth
- Omit Ninth
- Add Eleventh
- Dominant Eleventh
- Major Eleventh
- Minor Eleventh
- Omit Eleventh
- Add Thirteenth
- Dominant Thirteenth
- Major Thirteenth
- Minor Thirteenth

Determine a Scale

$ music-theory scale "C aug"

root: C
tones:
1: C
2: D#
3: E
4: G
5: G#
6: B

List known scale-building rules

$ music-theory scales

- Default (Major)
- Minor
- Major
- Natural Minor
- Diminished
- Augmented
- Melodic Minor Ascend
- Melodic Minor Descend
- Harmonic Minor
- Ionian
- Dorian
- Phrygian
- Lydian
- Mixolydian
- Aeolian
- Locrian

Determine a key

$ music-theory key Db

root: Db
mode: Major
relative:
  root: Bb
  mode: Minor

Credit

Charney Kaye <hi@charneykaye.com> https://charneykaye.com

XJ Music https://xj.io

Directories

Path Synopsis
A chord, in music, is any harmonic set of three or more notes that is heard as if sounding simultaneously.
A chord, in music, is any harmonic set of three or more notes that is heard as if sounding simultaneously.
Key Difference to another Key can be calculated in +/- semitones The key of a piece is a group of pitches, or scale upon which a music composition is created in classical, Western art, and Western pop music.
Key Difference to another Key can be calculated in +/- semitones The key of a piece is a group of pitches, or scale upon which a music composition is created in classical, Western art, and Western pop music.
Note has an adjustment symbol (Sharp or Flat) to render the "accidental notes for a given name (e.g.
Note has an adjustment symbol (Sharp or Flat) to render the "accidental notes for a given name (e.g.
A Scale Interval is how the members of the scale are counted, from 1 (the "root") to e.g.
A Scale Interval is how the members of the scale are counted, from 1 (the "root") to e.g.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL