XML Import at octave 255 is not importing

Dorico is interpreting 255 as a number that is too big to import. This should be interpreted as octave -1.

Import error message is:

ERROR - Element ‘octave’: [facet ‘maxInclusive’] The value ‘255’ is greater than the maximum value allowed (‘9’).

Specifying C4 as middle C in the source file seems to fix this particular case. I guess Dorico assume C4 as middle C.

As you can see from the error you received, 255 is not a valid value for the octave number in MusicXML.

But 255 is a valid number from a MIDI notes point of view if you view numbers as signed integers as opposed to unsigned integers. 255 is -1 254 is -2.

MIDI octaves go as low as -2 if you used C3 as middle C.

Does MusicXML require middle C = C4? Even then the lowest Note is C-1.

MusicXML doesn’t express octaves using MIDI notes: it expresses them using an integer type that has explicit values from 0 to 9; that’s why you get a schema validation error when the number you provide is outside that range.

OK, then Logic is generating invalid xml. I’ll submit a bug report to them.

Oh, and not that this matters, but Sibelius imported that file without error.

In the future we might be able to make Dorico more forgiving of schema errors that mean that the MusicXML file itself is invalid, but without implementing a bunch of heuristics to try to recover from various kinds of invalid input, it’s safer for us to simply bomb out if the MusicXML file is invalid. There are an almost countless number of ways that a MusicXML file could contravene the restrictions of the schema, and an equally countless number of ways a MusicXML file that is technically valid may contain problematic musical data that Dorico finds it difficult to make sense of. We can’t necessarily avoid trying to deal with some of the latter, but we can cut down the problem space considerably by simply rejecting the former. Thanks for also reporting the issue to the people at Apple.