Tonal
Notation

ABC Notation

Convert note names between scientific and abc notation

import { AbcNotation } from "tonal";
 
AbcNotation.abcToScientificNotation("c"); // => "C5"

API

AbcNotation.abcToScientificNotation

abcToScientificNotation(noteNameInAbc: string) => string

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

AbcNotation.scientificToAbcNotation

scientificToAbcNotation(noteNameInScientific: string) => string

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

AbcNotation.transpose

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

Transpose an note in abc notation:

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

AbcNotation.distance

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

Find the interval between two notes in abc notation:

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

References

On this page