Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

tonal-detect

danigb30MIT2.2.2

Find the name of pitch class sets

pcset, detector, scale, chord, music theory, tonal

readme

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

Param Type
notes Array.<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

Param Type
notes Array.<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"
]