tonal-detect
v2.2.2
Published
Find the name of pitch class sets
Downloads
22
Maintainers
Readme
Detect
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>.scale(notes)
⇒ Array.<String>
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"
]