UNPKG

@tonaljs/abc-notation

Version:

Parse musical notes in abc notation

29 lines (27 loc) 1.04 kB
type AbcTokens = [string, string, string]; declare function tokenize(str: string): AbcTokens; /** * Convert a (string) note in ABC notation into a (string) note in scientific notation * * @example * abcToScientificNotation("c") // => "C5" */ declare function abcToScientificNotation(str: string): string; /** * Convert a (string) note in scientific notation into a (string) note in ABC notation * * @example * scientificToAbcNotation("C#4") // => "^C" */ declare function scientificToAbcNotation(str: string): string; declare function transpose(note: string, interval: string): string; declare function distance(from: string, to: string): string; /** @deprecated */ declare const _default: { abcToScientificNotation: typeof abcToScientificNotation; scientificToAbcNotation: typeof scientificToAbcNotation; tokenize: typeof tokenize; transpose: typeof transpose; distance: typeof distance; }; export { abcToScientificNotation, _default as default, distance, scientificToAbcNotation, tokenize, transpose };