Parse
Meantonal provides some classes to parse to and from common formats:
SPNhandles Scientific Pitch NotationLilyPondhandles LilyPond strings.Helmholtzhandles Helmholtz Pitch Notation.ABChandles 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");