-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for <octave-change> at musicXML import #2725
Comments
I think it should be Also I'm wondering if we could have combined cases like <chromatic>3</chromatic>
<octave-change>-1</octave-change> |
Absolutely, my mistake.
The piccolo example at https://music-encoding.org/guidelines/v4/content/cmn.html#cmnDefs suggests to only use
That should result in |
In your example the guitar will sound two octaves lower, because you also use a clef with octave change. |
Well, no. |
if If See "A Binomial Representation of Pitch for Computer Processing of Musical Data" by Alexander R. Brinkman. Music Theory Spectrum, Volume 8, Issue 1, Spring 1986, Pages 44–57, https://doi.org/10.2307/746069 https://academic.oup.com/mts/article-abstract/8/1/44/1063294?redirectedFrom=fulltext |
This makes sense to me. So, the flute example from the guidelines in then incorrect? (https://music-encoding.org/guidelines/v4/content/cmn.html#cmnDefs) ...and in #2726 we would have to add a |
Yes. If you are only using the transposition to get the correct MIDI data, then the diatonic qualifier is not needed, for example But switching between sounding and written pitch for notation requires the diatonic steps to match the semitone steps. Since 12/0 is nonsense, it can be automatically corrected to 12/7 before doing a transposition (but it is better not to rely on autocorrection). |
Thanks @craigsapp for clarifying this (and in music-encoding/sibmei#194). Great to have it incorporated in Verovio; thanks @rettinghaus for the implementation! |
Current behavior
When importing orchestral scores containing transposed instruments from musicXML files, Verovio currently correctly imports
<transpose><diatonic>
and<transpose><chromatic>
from the musicXML parts attributes into@trans.diat
and@trans.semi
. However, transpositions of more than an octave should be coded (and indeed are coded) with<ocatve-change>
(see https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/transpose/, no changes here from version 3.1).See discussions here:
music-encoding/sibmei#194
music-encoding/music-encoding#440
Describe the solution you'd like
As MEI does not have an
@trans.octave-shift
attribute, we would probably have to translate this musicXML element to@trans.semi
. So, we should add 12 semitones for<octave-shift>
to@trans.semi
.This is the current code in Verovio:
verovio/src/iomusxml.cpp
Lines 1418 to 1428 in 4d8c60d
Expected MEI result
The
staffDef
of Glockenspiel should contain@trans.diat="0" @trans.semi="24"
;of the guitar
@trans.diat="0" @trans.semi="12"
.Test example in musicXML (Glockenspiel 2 octaves higher, guitar one octave lower)
Converted MEI
The text was updated successfully, but these errors were encountered: