GSoC 2020 Week 9 Recap: Playback Plus

Posted 1 month ago

Update from last week

Since the playback algorithms already had handling for one-measure repeats, it turned out to require only small changes to get the two-measure and four-measure repeats to play correctly. (However, in some circumstances it is questionable what it is to "play correctly"—see Please don't put your musician in a circumstance where it is questionable what it is to "play correctly.") And I was pleased to find that, by investing in playback, I got MIDI export for free.

That was the only thing I had put on my project schedule for week 9, but I found a few other small things to do, as well.

Parts had not formerly been handled—the element itself was added and deleted synchronously across parts, but the measures weren't associated and disassociated except in the part or score where the edit was made. Now the measures and the symbol are securely tied together no matter where the edit is made. A couple of other corner case bugs with different types of edits were solved, too.

I mentioned in my previous blog post that Marc Sabatella, my assigned mentor, had fixed a layout bug that was confusing me. In so doing, reviewing the layout code I had written, he left some helpful TODO comments, which this week I was able to address.

Although I take a principled stand that the one-measure, two-measure, and four-measure repeats are the only types that MuseScore should allow the user to create, it was decided early on that the architecture should allow for that decision to be changed in the future. In a few spots, I had written explicit if/else or switch statements regarding what to do for those specific numbers. I returned to those spots and refactored them to be fully generalized (mostly just by having separate handling for odd and even numbers) . Now the only thing preventing support for a 3-measure repeat, for instance, is the lack of a font symbol for it, and (of course) the fact that it is a bad idea.

Looking forward to this week

This week I plan to enhance MuseScore's MusicXML import and export capabilities to include measure repeats (thus far, even one-measure repeats have not been supported for MusicXML). This was where a previous effort to implement multi-measure repeats, using a quite different approach, got bogged down. MusicXML has some unusual requirements, especially for export. However, with the advantage of being able to draw on experience gleaned from Eric Fontaine's previous effort, I am optimistic.

Countdown to the end

My schedule, from now until the end of GSoC, is as follows:

  • Week 10 (August 3–9)
    • Implement file I/O of measure repeats for MusicXML
  • Week 11 (August 10–16)
    • Implement ID-ing sequences of measure repeats
    • Add style options for automatically numbering them
  • Week 12 (August 17-23)
    • Create tests
    • Rebase as needed to resolve conflicts with other GSoC projects
  • Week 13 (August 24–31)
    • Final evaluation of mentor due
    • Complete work product
Previous post Next post