tonal-detect

2.2.2 • Public • Published

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"
]

Package Sidebar

Install

npm i tonal-detect

Weekly Downloads

2

Version

2.2.2

License

MIT

Unpacked Size

56.2 kB

Total Files

16

Last publish

Collaborators

  • danigb