vexflow
vexflow copied to clipboard
Default Style Audit - Bach Minuet in G
@0xfe has been working on a simple full-score example in VexFlow. Even though it's still in progress I thought this was a great opportunity to assess VexFlow's default style. Almost everything in the example consists of defaults except for the slurs' (ie Curve) control points, which are manually set.
Stylistic Issues:
- Key signature too far away from the clef
- Time signature too far away from key signature
- Time signature numbers are too small
- Fingering 2 not centered over notehead (Bar 6)
- Gracenote is a bit too far away from the note (Bar 8)
- Left modifiers increase spacing between objects when not needed (Bar 1, 7, 9, 15) or by too much (Bar 8)
- Beam sitting between staff lines (Bar 11) (https://github.com/0xfe/vexflow/issues/432)
- Beam angles are too aggressive
- Beams feel a bit thin
- Metronome mark too close to tempo text
- Too much spacing between beamed inner notes. (Bar 14)
- Too much spacing between last two notes (Bar 15)
- Slurs are too thick
- Slurs endpoints should be centered over the notehead if on the notehead-side
- Slur endpoints shouldn't start on staff lines
- Slur endpoints should go above staccato dots
- Augmentation dots are a bit close to notehead
- The thin/thick repeat barlines are too close to each other
- Repeat barline dots too close to barline
- Notes before/after repeat are too close to the barline
Disclaimer: This is naturally a bit opinionated, but I don't think I've said anything too controversial.
Fantastic.
M. 8 -- the "grace" note should not have a slash through it -- it's an appogiatura. (B-quarter note + A half note).
Thanks for the audit, Cyril. This is exactly what I was hoping to get from the demo. Do you mind numbering them, so it's easier to refer to them in comments?
Done!
I'm changing:
Left modifiers increasing initial stave padding by too much (Bar 9, Bar 15)
to
Left modifiers increase spacing between objects when not needed (Bar 1, 7, 9, 15) or by too much (Bar 8)
@ronyeh @mscuthbert @sschmidTU @AaronDavidNewman @0xfe @Silverwolf90 once #1519 is merged we will get the image below. I think that it is now the right time:
- to reassess the rendering of this score
- to decide which other scores we would like to add to the test suite. I have been working on https://github.com/stringsync/vexml with @jaredjj3 and it should be possible to create tests based on musicxml files.
Bravura
Gonville

Will think of other test pieces soon. There's a tradition of including Trio no 1 from the Mozart Clarinet Quintet in music notation projects. It'd be good to have a piece with texts, and also to show that Vexflow is for all people, some music not by white-male-Europeans. I have an Amy Beach score in musicxml that I use as a Vexflow demo, but it requires music21j etc. -- I haven't ever coded a whole work directly in Vexflow.
One thing that I've always wanted to PR on, but always forget is that the grace note in m8 should not have a slash through it (and often without a flag). It's a quarter note appogiatura (subtracts one beat from the dotted half note.) Oh, and the minuet isn't by Bach; it's by Christian Petzold. :-) https://en.wikipedia.org/wiki/Minuets_in_G_major_and_G_minor
Nice.
For VexFlow 5, we should rename this to "Demo - Petzold".... then we can add other standard demos to our test suite, including "Demo - Beach", "Demo - Joplin", etc....
Joplin is always a good choice -- out of copyright, fun, diverse, and often introduces cross-staff problems.
One thing that I've always wanted to PR on, but always forget is that the grace note in m8 should not have a slash through it (and often without a flag). It's a quarter note appogiatura (subtracts one beat from the dotted half note.)
Thanks for pointing it out. :-) I stole your PR with this fix: https://github.com/0xfe/vexflow/pull/1521/files
Joplin is always a good choice -- out of copyright, fun, diverse, and often introduces cross-staff problems.
@ronyeh @mscuthbert @jaredjj3 I will go for Gladiolus Rag. @sschmidTU the cross-staffs are not handled in OSMD, right?
@rvilarl If you mean cross-staff beams, no, they're not handled in OSMD, because they weren't supported in Vexflow 1.2.93. (if you're talking about Gladiolus Rag specifically, please provide a link to the MusicXML) Would be great to implement them though with Vexflow 4+, looking forward to that!
(if you're talking about Gladiolus Rag specifically, please provide a link to the MusicXML)
https://musescore.com/user/58480/scores/1749906
@rvilarl thanks! Unfortunately I can't download the MusicXML because I don't have a Musescore subscription, though I guess I don't need it for now.
By the way, actually OSMD has a lot of cross-beam support internally (data model), because we support it in our mobile app which has its own renderer, from which OSMD's code is derived. We just never activated/adapted much of the graphical code in OSMD because Vexflow didn't have cross-stave beam support.
@sschmidTU the score is public domain and I downloaded it with a free subscription. Should I make a PR to include it in your test set?
Ah, thanks, it can be downloaded just by logging in with a free account. No, I don't see the value for the test set before we have cross stave beams, and it's quite big, but thanks!
FYI getting there with Joplin
https://jsfiddle.net/v53kesbp/2/