Conversion between notes in ABC and scientific notation
npm install tonal-abc-notationConvert note strings between ABC and scientific notation
This is part of tonal music theory library.
Example
``js`
const Abc = require("tonal-abc-notation")
Abc.toNote("c") // => "C5"
Abc.toAbc("Db2") // => "_D,,"`
Example js`
import Tonal from "tonal"
import { toAbc } from "tonal-abc-notation"
Tonal.Scale.notes("C major").map(toAbc);
* Abc
* .toNote(abcNote) ⇒ string
* .toAbc(note) ⇒ string
⇒ stringKind: 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
`js`
Abc.toNote("c") // => "C5"
⇒ stringKind: 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
`js``
abc.toAbc("C#4") // => "^C"