tonal-abc-notation
v2.2.2
Published
Conversion between notes in ABC and scientific notation
Downloads
6
Readme
Abc
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.toAbc(note)
⇒ string
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"