humdrum-tools / verovio-humdrum-viewer

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

*Ipiano for grand staff with three or four staves #829

Open bel28kent opened 11 months ago

bel28kent commented 11 months ago

When the grand staff has the normal two staves, VHV appropriately only displays one "Piano:"

Screen Shot 2023-08-13 at 8 00 41 PM

However, when the grand staff has three or four staves, the instrument code for each staff is printed:

Screen Shot 2023-08-13 at 7 56 55 PM Screen Shot 2023-08-13 at 8 01 50 PM

(A related issue for kern encoding of piano music broadly is whether the third or fourth staff should really be encoded as a third or fourth spine. In the case of piano music, the third or fourth staff is really a type of subspine, and not a spine in the same way that it would be in trio or quartet music. It might be more appropriate to create a new spine locally ad hoc in the kern file, rather than having a global spine that is mostly unused except for whole rests.)

craigsapp commented 11 months ago

For three staves it is possible by labeling only the middle staff:

Screenshot 2023-08-14 at 14 54 38

https://verovio.humdrum.org?t=KiprZXJuCSoqa2VybgkqKmtlcm4KKnBhcnQxCSpwYXJ0MQkqcGFydDEKKnN0YWZmMwkqc3RhZmYyCSpzdGFmZjEKKgkqSSJwaWFubwkqCipjbGVmRjQJKmNsZWZGNAkqY2xlZkcyCjFDQwkxQwkxY2MKPQk9CT0KKi0JKi0JKi0KISEhc3lzdGVtLWRlY29yYXRpb246IHsoKil9Cg==

When there are three staves, *part# should also be given to indicate that all three staves are for a single part. *part1 for all spines in the above case. Technically for two staves this should also be done, but I instead detect that there are two identical names in adjacent spines, and when that happens, the text is placed between the two staves.

I could implement:

**kern  **kern  **kern
*part1  *part1  *part1
*staff3 *staff2 *staff1
*I"piano    *I"piano    *I"piano
*clefF4 *clefF4 *clefG2
1CC 1C  1cc
=   =   =
*-  *-  *-
!!!system-decoration: {(*)}

Where three adjacent staves have the same name and are merged into a single name on the middle staff. But this is not very necessary since the middle staff can be labeled, and the other two can be unlabeled, or have an empty name *I".

craigsapp commented 11 months ago

A related issue for kern encoding of piano music broadly is whether the third or fourth staff should really be encoded as a third or fourth spine. In the case of piano music, the third or fourth staff is really a type of subspine, and not a spine in the same way that it would be in trio or quartet music. It might be more appropriate to create a new spine locally ad hoc in the kern file, rather than having a global spine that is mostly unused except for whole rests.

There is a way of doing this in Humdrum:

**kern  **kern
*clefF4 *clefG2
=       =
1C      1c
=       =
*       *+
*       *       **kern
1C      1c      1cc
=       =       =
*       *       *-
1C      1c
=       =
*-      *-

But MEI and MusicXML cannot represent such things, so it is difficult to determine how to implement in a converter (other than adding lots of invisible rests for when the part is not present). Don't try in VHV as it will crash the webpage :-)

craigsapp commented 11 months ago

For four staves, how should the staves be labeled?

Screenshot 2023-08-14 at 15 13 26 Screenshot 2023-08-14 at 15 16 46

https://verovio.humdrum.org?t=KiprZXJuCSoqa2VybgkqKmtlcm4JKiprZXJuCipwYXJ0MQkqcGFydDEJKnBhcnQxCSpwYXJ0MQoqc3RhZmY0CSpzdGFmZjMJKnN0YWZmMgkqc3RhZmYxCipJIkxFRlQgSEFORAkqSSJMRUZUIEhBTkQJKkkiUklHSFQgSEFORAkqSSJSSUdIVCBIQU5ECipjbGVmRjQJKmNsZWZGNAkqY2xlZkcyCSpjbGVmRzIKPQk9CT0JPQoxQ0MJMUMJMWMJMWNjCj0JPQk9CT0KKi0JKi0JKi0JKi0KISEhc3lzdGVtLWRlY29yYXRpb246IHsoczFzMil9eyhzM3M0KX0K

Or:

Screenshot 2023-08-14 at 15 17 41

https://verovio.humdrum.org?t=KiprZXJuCSoqa2VybgkqKmtlcm4JKiprZXJuCipwYXJ0MQkqcGFydDEJKnBhcnQxCSpwYXJ0MQoqZ3JvdXAyCSpncm91cDIJKmdyb3VwMQkqZ3JvdXAxCipzdGFmZjQJKnN0YWZmMwkqc3RhZmYyCSpzdGFmZjEKKkkiTEVGVCBIQU5ECSpJIkxFRlQgSEFORAkqSSJSSUdIVCBIQU5ECSpJIlJJR0hUIEhBTkQKKmNsZWZGNAkqY2xlZkY0CSpjbGVmRzIJKmNsZWZHMgo9CT0JPQk9CjFDQwkxQwkxYwkxY2MKPQk9CT0JPQoqLQkqLQkqLQkqLQohISFzeXN0ZW0tZGVjb3JhdGlvbjogeyhnMSl9eyhnMil9Cg==

bel28kent commented 11 months ago

Is it not useful to have each **kern spine labelled with an instrument code for viewing the file in vim or standard output? I can imagine someone who is not familiar with the music looking at a file in the terminal and examining the file to see if it is piano solo music or some type of chamber music. This may not be an issue if the corpus only contains piano music; but my corpus will eventually be a mixed corpus with piano solo music and orchestral music. (And Scriabin's orchestral music has piano parts.)

craigsapp commented 11 months ago

Yes, it is best to include an instrument code in every spine. In this case *Ipiano (which is different from the staff label such as *I"piano which is for visual purposes rather than analytical). Here is an example of including the instrument codes for a four-staff piano part:

Screenshot 2023-08-14 at 21 43 04

https://verovio.humdrum.org?t=KiprZXJuCSoqa2VybgkqKmtlcm4JKiprZXJuCipwYXJ0MQkqcGFydDEJKnBhcnQxCSpwYXJ0MQoqZ3JvdXAyCSpncm91cDIJKmdyb3VwMQkqZ3JvdXAxCipzdGFmZjQJKnN0YWZmMwkqc3RhZmYyCSpzdGFmZjEKKklwaWFubwkqSXBpYW5vCSpJcGlhbm8JKklwaWFubwoqSSJMRUZUIEhBTkQJKkkiTEVGVCBIQU5ECSpJIlJJR0hUIEhBTkQJKkkiUklHSFQgSEFORAoqY2xlZkY0CSpjbGVmRjQJKmNsZWZHMgkqY2xlZkcyCj0JPQk9CT0KMUNDCTFDCTFjCTFjYwo9CT0JPQk9CiotCSotCSotCSotCiEhIXN5c3RlbS1kZWNvcmF0aW9uOiB7KGcxKX17KGcyKX0K

Also useful is to inlcude an !!!AIN: reference record which lists the instrumentation in the score by instrument code (arranged alphabetically:

https://github.com/pl-wnifc/humdrum-polish-scores/blob/main/pl-gd/kern/pl-gd--ee-1638--002-001_marenzio-luca--motettorum-pro-festis-totius-anni-in-festo-nativitatis-domini-hodie-christus-natus-est.krn#L24

!!!AIN: 1 alto 1 bass 1 soprn 1 tenor

The instrument codes are given in alphabetic order and an optional number of parts is given before each instrument code.

For a four-staff piano part:

!!!AIN: piano

or

!!!AIN: 1 piano
Screenshot 2023-08-14 at 21 52 02

https://verovio.humdrum.org?t=KiprZXJuCSoqa2VybgkqKmtlcm4JKiprZXJuCipwYXJ0MQkqcGFydDEJKnBhcnQxCSpwYXJ0MQoqZ3JvdXAyCSpncm91cDIJKmdyb3VwMQkqZ3JvdXAxCipzdGFmZjQJKnN0YWZmMwkqc3RhZmYyCSpzdGFmZjEKKklwaWFubwkqSXBpYW5vCSpJcGlhbm8JKklwaWFubwoqSSJMRUZUIEhBTkQJKkkiTEVGVCBIQU5ECSpJIlJJR0hUIEhBTkQJKkkiUklHSFQgSEFORAoqY2xlZkY0CSpjbGVmRjQJKmNsZWZHMgkqY2xlZkcyCj0JPQk9CT0KMUNDCTFDCTFjCTFjYwo9CT0JPQk9CiotCSotCSotCSotCiEhIXN5c3RlbS1kZWNvcmF0aW9uOiB7KGcxKX17KGcyKX0KISEhQUlOOiBwaWFubwo=