This is a purescript wrapper for VexFlow which is designed to cover just enough of the API in order to allow the engraving of music scores produced by the ABC parser.
It is intended to be a replacement for purescript-scores which itself was a wrapper for VexTab. i.e. the intention is to cut out the middle man (which is anyhow not regularly maintained).
This version is compatible with both Vexflow 4.0.2 and 4.2.3. The former exhibits a mild bug in #85 fixed in the later, which unfortunately exhibits a catastrophic bug in newlandsvalley/purescript-abc-editor#3 whenever the canvas is cleared. Therefore, 4.0.2 is recommended.
For more information, see the guide.
spago install
npm run build
npm run display-tests
npm run full-tune
npm run align-staves
npm run beaming
npm run slurs
npm run clefs
npm run chord-symbols
(a thumbnail of the initial part of a score for use in lists)
npm run thumbnail
- ABC's modified key signature (for defining non-classical modes as found in, for example, some klezmer scores) is not supported. (It is not yet supported by VexFlow.)
- Chord symbols support is an experimental feature which by default is switched off.
- Slurs are only supported if they are entirely contained within a bar. This is partly because they are problematic in ABC (being unbalanceable) and partly because the score for the ABC is engraved on a bar-by-bar basis. Although VexFlow does allow you to specify that the beginning and end notes live in separate bars, we cannot take advantage of it because, when processing the second bar, notes from the first are no longer in the stack frame.
- Polyphonic scores are not fully supported. There is no attempt made to align the staves in a multi-part piece, attached by stave ties. Rather, it is assumed that an application will split the tune into separate ABC formulations for each voice and display them separately.
Voice
headers are parsed in order to establish the clef - currently, alto, tenor, bass and treble (the default) are supported.