beaming bug / automatic sight reading project

65 views
Skip to first unread message

Sam Post

unread,
Mar 7, 2015, 4:39:13 PM3/7/15
to vex...@googlegroups.com
Hi vexflow people / Mohit,

So I'm pretty sure the auto-beam function in vexflow has a bug (see screenshot from above at 4:28). In a measure of 3/4 with a dotted quarter and three eighths, it beams together the second two eighth notes, instead of the 2nd and 3rd. Weird. I wrote my own beam functions that beam the correct notes; they work really well but occasionally something weird happens (see other screenshot above)

Anyway, you can see it in action here (click level 3 for some 8th notes), or see the other screenshot. If anyone can help me fix the weird thing that's happening now, I'd appreciate it!

Cheers,

Sam
Screen Shot 2015-03-07 at 4.28.13 PM.png
Screen Shot 2015-03-07 at 4.27.27 PM.png

Sam Post

unread,
Mar 7, 2015, 4:40:11 PM3/7/15
to vex...@googlegroups.com
Oh yeah, you can see the code for the new auto-beam functions (I wrote them to work for 8th notes, not 16th notes yet) here in the scripts folder.

Gregory Ristow

unread,
Mar 7, 2015, 5:08:28 PM3/7/15
to vex...@googlegroups.com
Quick guess: In your second example, be sure to set the stem direction for both beamed notes to go the same way.

Glad you're looking at this -- it's been the next thing on my major to-do list for VexFlow. The entire automatic beaming routines need a big rewrite.  You've spotted the first big bug (auto beaming is currently calculated by beaming beat-length units, regardless of where they start in a measure).  When you dive into the sixteenth note level you'll start noticing issues of the 16th-level beam direction when eighths & sixteenths are mixed (such as 6/8 patterns of dotted eighth + sixteenth + eighth; or sixteenth + eighth + sixteenth + eighth).

In any case: if you're able to solve all these, that would be delightful.  If not, I've set aside a full week of programming time the second week of May to tackle this, as it's critical for a commercial app I'm working on.  So... it'll eventually get fixed.

Greg

Sam Post

unread,
Mar 11, 2015, 2:07:46 AM3/11/15
to vex...@googlegroups.com
Cool, thanks! I added some functions in my beamfunctions script so that each time it makes a beam it checks the notes' stem directions and goes with whichever is farthest from the center. Much better to look at, methinks. Will have to deal with more complex rhythmic groups soon (some of my current code is lazy in this respect, assuming quarter notes will always be the beat value....will have to fix that soon...)

Luuk de Waal Malefijt

unread,
Mar 11, 2015, 6:10:52 AM3/11/15
to vex...@googlegroups.com

What kind of commercial project are you working on Gregory? We might be competitors ;)

Op 7 mrt. 2015 23:08 schreef "Gregory Ristow" <gri...@gmail.com>:
--
--
You received this message because you are subscribed to the Google
Groups "vexflow" group.
To post to this group, send email to vex...@googlegroups.com
To unsubscribe from this group, send email to
vexflow+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/vexflow?hl=en

---
You received this message because you are subscribed to the Google Groups "vexflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vexflow+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gregory Ristow

unread,
Mar 11, 2015, 7:27:42 AM3/11/15
to vex...@googlegroups.com
It's a music theory pedagogy product -- in beta right now, and moving towards a public launch around May.
Reply all
Reply to author
Forward
0 new messages