tonal-abc-notation

2.2.2 • Public • Published

Abc

npm version

Convert note strings between ABC and scientific notation

This is part of tonal music theory library.

Example

const Abc = require("tonal-abc-notation")
Abc.toNote("c") // => "C5"
Abc.toAbc("Db2") // =>  "_D,,"

Example

import Tonal from "tonal"
import { toAbc } from "tonal-abc-notation"
Tonal.Scale.notes("C major").map(toAbc);

Abc.toNote(abcNote)string

Convert a (string) note in ABC notation into a (string) note in scientific notation

Kind: static method of Abc
Returns: string - the note in scientific notation of null if not valid

Param Type Description
abcNote string the note in ABC notation

Example

Abc.toNote("c") // => "C5"

Abc.toAbc(note)string

Convert a (string) note in scientific notation into a (string) note in ABC notation

Kind: static method of Abc
Returns: string - the note in ABC notation or null if not valid note

Param Type Description
note string a note in scientific notation

Example

abc.toAbc("C#4") // => "^C"

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i tonal-abc-notation

    Weekly Downloads

    0

    Version

    2.2.2

    License

    MIT

    Unpacked Size

    59.9 kB

    Total Files

    17

    Last publish

    Collaborators

    • danigb