gregchapman-dev / converter21

A music21-based music notation file format converter CLI app, and some new sub converter plug-ins
Other
16 stars 1 forks source link

Vocal tenor clef #4

Closed craigsapp closed 1 year ago

craigsapp commented 1 year ago

It would be useful to implement the vocal tenor clef export from Humdrum to MusicXML:

Example: the first column contains *clefGv2 which is a vocal tenor clef. The note 4c will be displayed an octave higher than the sounding pitch. A regular treble clef is given in the second column for comparision:

**kern  **kern
*clefGv2    *clefG2
=   =
4c  4c
4d  4d
4e  4e
4f  4f
==  ==
*-  *-

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

Expected rendering (as in VHV):

Screen Shot 2022-06-18 at 9 34 09 AM

Translated MusicXML Rendered n MuseScore:

Screen Shot 2022-06-18 at 9 33 35 AM

Current MusicXML export:

Click to view MusicXML data ```xml 2022-06-18 7 40 1 2 G 2 G 2 C 4 1 1 quarter 1 D 4 1 1 quarter 1 E 4 1 1 quarter 1 F 4 1 1 quarter 1 4 C 4 1 1 quarter 2 D 4 1 1 quarter 2 E 4 1 1 quarter 2 F 4 1 1 quarter 2 light-heavy ```

The <clef-octave-change> element needs to be added to the vocal tenor clef: https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/clef-octave-change/

Expected MusicXML conversion with that element added:

Expected MusicXML export ```xml 2022-06-18 7 40 1 2 G 2 G 2 -1 C 4 1 1 quarter 1 D 4 1 1 quarter 1 E 4 1 1 quarter 1 F 4 1 1 quarter 1 4 C 4 1 1 quarter 2 D 4 1 1 quarter 2 E 4 1 1 quarter 2 F 4 1 1 quarter 2 light-heavy ```

This addition to the clef description will result in the expected rendering in Musescore:

Screen Shot 2022-06-18 at 9 48 54 AM
gregchapman-dev commented 1 year ago

Hmmm.... looks like this might be a music21 MusicXML export bug. There might be something I can do to work around it in converter21, or maybe I'll just need to propose a music21 pull request.

gregchapman-dev commented 1 year ago

Yep. Under certain circumstances, music21 can drop a clef-octave-change during export to MusicXML. music21 issue #1333, to be fixed by music21 PR # 1334 which I am just finishing up. Should easily make it into music21 v8.

gregchapman-dev commented 1 year ago

Thanks! Closing this issue, since it's being tracked by music21 PR # 1334.