@tonaljs/abc-notation
TypeScript icon, indicating that this package has built-in type declarations

4.8.3 • Public • Published

@tonaljs/abc-notation tonal npm version

Convert note names between scientific and abc notation

Usage

ES6:

import { AbcNotation } from "tonal";

nodejs:

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

API

abcToScientificNotation(noteNameInAbc: string) => string

AbcNotation.abcToScientificNotation("c"); // => "C5"

scientificToAbcNotation(noteNameInScientific: string) => string

AbcNotation.scientificToAbcNotation("C#4"); // => "^C"

transpose(note: string, interval: string) => string

Transpose an note in abc notation:

AbcNotation.transpose("=C", "P19"); // => "g'"

distance(from: string, to: string) => string

Find the interval between two notes in abc notation:

AbcNotation.distance("=C", "g"); // => "12P"

References

Package Sidebar

Install

npm i @tonaljs/abc-notation

Weekly Downloads

554

Version

4.8.3

License

MIT

Unpacked Size

17.1 kB

Total Files

9

Last publish

Collaborators

  • danigb