On Displaying Musical Scores » History » Version 12
On Displaying Musical Scores¶
- Illustrating recordings by attaching a full publication-style score
- ...where the score is not intended to be read closely, but rather used as a sort of key-frame reference for navigating the audio
- ...or where user expects to be able to zoom the score far enough to actually read it properly
- Linear rather than page-based score that a user is expected to read, e.g. to play along with, or to check specific notes in a transcription or spectrogram
- On-the-fly score display of transcriptions and related annotation layers (score from MIDI)
- Score editing for correction (making usually small edits to substantial scores)
- Score editing for annotation (generating small scores from scratch)
Sources of score data¶
- Score-encoding formats, e.g. MusicXML, MEI
- PDFs of published scores
- "Tidy" MIDI files and other cleaned-up annotation data (e.g. chord charts)
- Untidy output from transcription methods and the like, in MIDI or MIDI-like formats
- Integrate code from an existing application (most likely one that is also in C++ using Qt)
- Suitable for all use cases, with limitation of requiring score to be available in a digital format
- Only possibility if editing is required (but note that adding editing is likely to be very involved even with this approach, maybe prohibitively so)
- MuseScore -- most obvious option
- Rosegarden -- has a notation editor component but is primarily a sequencer (but does have the advantage that I wrote much of it and so know a lot of the code!)
- Invoke external application to render to PDF or sequence of images, then display PDF/image pages
- Suitable for use case 1; unsuitable for use cases 2, 4, 5; uncertain for use case 3
- Replaces problem of "integrating score display" with problem of "integrating PDF/image page display"
- Could use MuseScore as the external application (it has a batch mode) or Lilypond, or something else like VexFlow, or more than one option depending on platform & input format
- Has advantage of also introducing ability to display other PDF material than scores
- Adds access to non-digital (scanned) score content
Both have their technical challenges, but there is also a conceptual question about how to align score pages or bars in the time axis (more on this below).
Which code to use for option 1?¶
I think the only reasonable options are MuseScore and Rosegarden. MuseScore produces much better output and has fairly well-organised code. Rosegarden has a more limited renderer and currently lacks MusicXML import. The only reason to consider anything other than MuseScore is that I'm quite familiar with the Rosegarden code myself already. At any rate, Rosegarden makes a useful baseline comparison.
Here are some examples, deliberately choosing small sizes in order to see how a zoomed-out scale looks, and considering both linear and paginated layouts.
Linear layouts with "good" source material¶
Both applications are displaying their own example files here, so we have two different pieces but both are pieces that are expected to work well.
Paginated layouts with "good" source material¶
Same pieces as above.
Imported from an approximate transcription¶
This is an input that is not expected to work well -- a transcription obtained from the Silvet Vamp plugin on one of the MAPS database recordings, exported to MIDI. Shown below is the result of taking that MIDI file as exported by Sonic Visualiser and importing it into each application with the default quantization/tidying settings.
Despite the substantially different appearances of the two, these are both displaying the same MIDI data. As well as the quantization differences, the two programs use different numbers of staffs and different clefs, keys, and time signatures. (None of those things are defined in the MIDI. MuseScore has guessed the key [wrongly] and time signature [correctly]. Rosegarden has guessed the key [correctly], but always uses a 4/4 time signature if none is specified.)
See if you can identify the piece!