w3c / mnx

Music Notation CG next-generation music markup proposal.
176 stars 19 forks source link

Clarify defaults and behavior for accidental attribute #153

Closed mdgood closed 2 months ago

mdgood commented 5 years ago

In the current spec, the note element's accidental attribute is described as follows:

The accidental attribute supplies an accidental value for this note. In the standard MNX-Common profile, this attribute must match the alteration of the pitch attribute. Omission of the attribute indicates that no accidental is to be displayed. The special value auto indicates that a consumer application should determine the proper accidental based on musical context.

Omitting the attribute to indicate the absence of an accidental is what MusicXML does, but it has proven to be one of the more error-prone decisions. It would be good to revisit this and reconsider other possibilities. Perhaps a missing attribute could default to the "auto" value, and there could be a "no" value to indicate that no accidental is displayed.

bhamblok commented 5 years ago

I agree, but I would prefer the "none" value instead of "no", like in the css-world "display:none" or "border:none" ...

shoogle commented 5 years ago

Is there a need for a "no" value? Is it not enough to have "auto" (the default, which only displays an accidental when necessary) and "yes" (to force one to be displayed - i.e. a cautionary accidental)?

adrianholovaty commented 5 years ago

I agree with @mdgood that people should have to explicitly "opt-in" to deliberately hide accidentals, rather than relying on the lack of an attribute. I think it makes sense to treat missing data as "auto" as a general principle throughout MNX-Common.

Here's a quick attempt at outlining the possibilities for rendering accidentals. It errs on the side of too many options, just in case this triggers any ideas from people. Please let me know what I missed!

--

  1. Accidental is explicitly rendered; it was deliberately chosen by the score creator (it "should be preserved even if the chromatic context is changed by edits," from a to-do note in the spec)
  2. Accidental is explicitly rendered; it was chosen automatically by software (and, as such, is presumably more fungible than option 1)
  3. Accidental is explicitly rendered but technically unnecessary (e.g., a courtesy accidental; we'd likely need to define "technically unnecessary")
  4. Accidental is explicitly not rendered due to being in the key signature
  5. Accidental is explicitly not rendered due to a previous note in the bar having already rendered it
  6. Accidental is explicitly not rendered for some other editorial reason (I can't think of any reasons...help?)
  7. "Auto" (leave accidental rendering for the MNX-Common consumer program to decide)

--

Some questions that came up as I pondered these cases:

hhpmusic commented 5 years ago

In braille music transcription, the display of accidentals should be explicitly indicated other than "auto", which will increase the load of braille conversion. There are also rules for braille music to add auxiliary accidentals, so the explicit indication is much useful than just an "auto". For missing attributes, is it the same case in Musicxml where there are only alter without accidental? This will give the same result of not displaying an accidental, such as the one repeated or just in a key.

adrianholovaty commented 2 months ago

I believe this can safely be closed, since we added the "support" key with "useAccidentalDisplay" in f3cf6cc20. See #347 for the history/discussion.