4.8.5 • Published 3 months ago

@tonaljs/chord-detect v4.8.5

Weekly downloads
447
License
MIT
Repository
-
Last release
3 months ago

@tonaljs/chord-detect tonal npm version

Usage

With ES6 import:

import { Chord } from "tonal";

With ES5 require:

const { Chord } = require("tonal");

Standalone:

import { detect } from "@tonaljs/chord-detect";

API

Chord.detect(notes: string[], options?: { assumePerfectFifth?: boolean }) => string[]

Examples:

Chord.detect(["D", "F#", "A", "C"]); // => ["D7"]
Chord.detect(["F#", "A", "C", "D"]); // => ["D7/F#"]
Chord.detect(["A", "C", "D", "F#"]); // => ["D7/A"]
Chord.detect(["E", "G#", "B", "C#"]); // => ["E6", "C#m7/E"]

This function is also exposed in Chord module.

Options

  • assumePerfectFifth: assumes perfect fifth if no fifth is present
detect(["D", "F", "C"], { assumePerfectFifth: true }); // => ["Dm7"]
detect(["D", "F", "C"], { assumePerfectFifth: false }); // => []
4.8.5

3 months ago

4.8.4

3 months ago

4.8.3

4 months ago

4.8.1

11 months ago

4.8.2

11 months ago

4.7.2

1 year ago

4.8.0

1 year ago

4.7.1

1 year ago

4.7.3

1 year ago

4.7.0

1 year ago

4.6.10

1 year ago

4.6.5

3 years ago

4.6.2

3 years ago

4.5.1

3 years ago

4.5.0

3 years ago

3.7.0

3 years ago

3.6.1

4 years ago

3.6.0

4 years ago

3.5.6

4 years ago

3.5.5

4 years ago

3.5.4

4 years ago

3.5.3

4 years ago

3.5.2

4 years ago

3.5.1

4 years ago

3.5.0

4 years ago