humdrum-tools / verovio-humdrum-viewer

Verovio Humdrum Viewer
http://verovio.humdrum.org
37 stars 9 forks source link

Optional note in parenthesis #769

Open jacekiwaszko1 opened 2 years ago

jacekiwaszko1 commented 2 years ago

In the example below there's optional top note notated in parenthesis in the chord:

example

Whould it be possible to encode it in Humdrum?

Test data:

**kern  **text
*clefG2 *
*k[b-]  *
*F: *
*M4/4   *
*met(c) *
=50 =50
*^  *
1aa [1ff    [1cc    bój!_
=51 =51 =51
4ff/]   4cc\]   .
4ryy    4ryy    .
2ryy    2ryy    .
*   *   *
*v  *v  *
==  ==
*-  *-
craigsapp commented 2 years ago

It could be encoded as:

**kern  **text
*clefG2 *
*k[b-]  *
*F: *
*M4/4   *
*met(c) *
=50 =50
*^  *
!LO:N:n=1:paren !   !
1aa [1ff    [1cc    bój!_
=51 =51 =51
4ff/]   4cc\]   .
4ryy    4ryy    .
2ryy    2ryy    .
*   *   *
*v  *v  *
==  ==
*-  *-

where n=1 is the first token in the chord, and paren means place parentheses around the note. This would be a graphical interpretation of the parentheses. If the parentheses has the meaning of being editorial, then the best would be:

!LO:N:n=1:ed=paren

Which I would allow as an alternate encoded. And there could be:

!LO:N:n=1:paren=ed

To mean the same thing (but the graphical aspect is more important then the editorial one).

For an optional note for performance in parentheses:

!LO:N:n=1:paren=optional

In other words, the meaning of the parentheses can be encoded as a value of the paren parameter.

This would also be similar for brack for brackets.

note@enclose would be the mapping for this parameter, but not currently implemented in verovio. See issue https://github.com/music-encoding/music-encoding/issues/672