2.2.2 • Published 5 years ago

tonal-detect v2.2.2

Weekly downloads
10
License
MIT
Repository
github
Last release
5 years ago

Detect

npm version

Find chord and scale names from a collection of notes or pitch classes

This is part of tonal music theory library.

Example

import { chord } from "tonal-detect"
chord(["C", "E", "G", "A"]) // => ["CM6", "Am7"]

Example

const Detect = require("tonal-detect")
Detect.chord(["C", "E", "G", "A"]) // => ["CM6", "Am7"]

Detect.chord(notes)Array.<String>

Given a collection of notes or pitch classes, try to find the chord name

Kind: static method of Detect
Returns: Array.<String> - chord names or empty array

ParamType
notesArray.<String>

Example

Detect.chord(["C", "E", "G", "A"]) // => ["CM6", "Am7"]

Detect.scale(notes)Array.<String>

Given a collection of notes or pitch classes, try to find the scale names

Kind: static method of Detect
Returns: Array.<String> - scale names or empty array

ParamType
notesArray.<String>

Example

Detect.scale(["f3", "a", "c5", "e2", "d", "g2", "b6"]) // => [
"C major",
"D dorian",
"E phrygian",
"F lydian",
"G mixolydian",
"A aeolian",
"B locrian"
]