Parse
Meantonal provides some classes to parse to and from common formats:
SPN
handles Scientific Pitch NotationLilyPond
handles LilyPond strings.Helmholtz
handles Helmholtz Pitch Notation.ABC
handles ABC notation.
Each provides static toPitch
and fromPitch
methods to convert between strings and Pitch
vectors.
Using SPN
, here’s an example usage:
let p = SPN.toPitch("C#4");
SPN.fromPitch(p); // "C#4");