audiveris
audiveris copied to clipboard
How to join whole heads in chords?
One or several heads connected to the same stem lead to the creation of one chord. But what about whole heads (since for them there is no such stem)?
Current approach is to join together whole heads that are physically connected. This is not satifactory, as one can see in the following case:
On the left-hand side we have 1 chord with 3 black heads. On the right-hand side, Audiveris sees 2 chords, one for the 2 upper whole heads and one for the lower whole head. During the CURVES step, ties are recognized and Audiveris (wrongly) detects an anomaly: the chord on the left-hand side is tied to two different chords on the right-hand size. Consequently, it tries to split the left-hand chord into 2 subchords...
Such behavior was triggered by the fact that the whole heads were wrongly assigned to 2 different chords.
The real question is thus: what would be a correct strategy to correctly assign whole heads into proper chords? Please help me.
Perhaps, in the CURVES step, Audiveris could detect that the 2 ties originate from chords made only of whole heads (whose gathering into chords is often questionable as we have seen). In that case, it could decide that the two whole-based chords are in fact parts of a single chord.
In other words, we give priority to the strongly defined stem-based chord, rather than to the very weakly defined no-stem whole-head chords. And we decide to merge the 2 whole-based chords into a single one.
Any other idea?
I assume that the only solution is to provide a "number of voices" analysis over a complete staff. Then the program can decide, if a chord needs to be split into different voices or not.
Of course this is not unambiguous: there will be cases where it cannot be clearly decided, especially when the number of voices seem to change from measure to measure. But there will be a lot of cases where it more clear than actually. Using the curves step (as you propose above) is possible where there are slurs - but only in such a case. The idea to keep a chord in one voice is - in unclear situation - the best behaviour!
I'd like to mention that it is extremely seldom that there are more than 2 voices in one staff. This was the reason why I had proposed to allow the user to define the amount of voices per staff before transcription some time ago. Actually transcription sometimes generates 4 or more voices because of failures in the rhythm check ;-).
Also I come back to a miss-usage of voices in notation programs: esp. in piano staffs there are often used 2 (or - very seldom - even more) voices in order to be able to define chords with different length on a certain tick position.
The 2 voices in the top line are necessary to be able to set the correct length of the partial chords - they are all played be the right hand (physically ONE voice).
I mention this, because often there "suddenly" appears a second voice in a measure - just to provide what I described above. For Audiveris this means that it must provide to voices - as it actually does.
I agree that the "simple" case of a single chord tied to 2 should combine the 2 into one. Otherwise the ties don't make sense.
In cases such as shown above it becomes problematic what to do, as far as what the program can figure out. Just doing number of voices analysis would only help in some cases.
In choral music, for instance, it is common to see 2 voices, but only in a few measures. An example would be where Soprano and Alto sing the same part except for a small number of measures where they break into harmony.
An example of this is on the 3rd page of the Blue Skies.pdf I sent, where the Soprano/Alto parts are the same until the end of measure 18, then weave together then back apart, until measure 29 on the 4th page where they are the same again.
Hi guys, you touched a difficult topic in the music notation. The original issue related to grouping of whole heads is just the tip of the iceberg of voice assignment in the multi-voice music.
Where should we begin? Well, the whole notes lack stems that are mandatory for a proper note grouping. So we need to look at the surrounding context in order to figure out how multiple notes are usually grouped in the piece of interest.
Let us look at a couple of real-world examples first:
My musical intelligence tells me that the whole notes in the middle bar of the lower staff should be split across two voices because the stems in the surrounding bars shows clearly the polyphon setting.
In the following example, there is only one voice per staff containing chords because it's clearly indicated by the stems of the tied crotchets:
In the next example, it's logical to group the whole notes into a chord as suggested in the bar right before (homophon setting):
Now we can try to sketch an algorithm to handle these cases. Starting with a chord containing whole notes:
-
is there any chord of the same pitches right before or right after the chord of interest? If yes, do they have stems attached to it? If yes, derive the voice grouping from stems and propagate this assignment to the chord of wholes. Please note that ties aren't mandatory here.
-
if there are no chords of the same pitches around the chord of interest, search the predefined time window of 1-2 bars for notes containing stems. Derive the voice grouping from stems and propagate this assignment to the chord of interest.
-
if the conditions 1 & 2 aren't met, fall back to the default voice assignment that joins all notes with the same starting time and duration into a chord and assign them to a single voice.
As expected, this approach is based on heuristics and won't cover all real-world cases so we'd better offer a possibility of manual correction of the automatic assignment.
I'm new to this project, so I'm not sure if this will be possible given the current structure of the code etc. But I'll put this out here anyways - Would it be possible to assign a head to semibreves etc as metadata? (i.e. It has a stem in theory, that does not show up in sheet music). By using this invisible stem, it would be possible to detect chords in the same way that chords are detected for notes with stems. Would also solve problems where 1 or more notes in the chord last longer than or less than 4 beats (e.g. a chord made up of 2 minims, and a semibreve)