w3c / mnx

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

Allow pitch encodings to employ cents or decimal semitones #19

Open joeberkovitz opened 7 years ago

joeberkovitz commented 7 years ago

From @mogenslundholm:

Would it [be possible to] write: <note pitch="C4+4,98044999134613"/> ? The tone <note pitch="F4-0,01955000865387"/> will give same result. Refer to "MNX Proposal Overview": 5.3.10. Pitch encoding

(The alter values written by plus- or minus-sign are in half steps, i.e. 12 halftones per octave. And 12*log2(4/3)=4,98044999134613).

joeberkovitz commented 7 years ago

This is possible. It's also possible we could use cents, since many temperaments have been analyzed in terms of that unit (I realize it's just a matter of where the decimal point goes)

cecilios commented 7 years ago

An equally tempered semitone is equal to 100 cents. Therefore, as you noted, using cents or decimal semitones is just displacing the decimal point.

Adding something (i.e. a character at the end) to encode the type of units (cents or semitones) would complicate exporters and parsers with no real gain. So I would vote for allowing only one type of units in the standard, either cents or semitones.

natiwipi commented 7 years ago

I totatally agree with you, cecilios.

clnoel commented 5 years ago

I am commenting here to bring this back up to the top of the recently-commented list, since some of the discussion in #138 has to do with how to do pitch representation, both in pitch-spelling and (as this seems to be) sounding-pitch. Finding a better way to represent microtones than the four different methods in the current spec seems important to me!

Using MIDI-cent (60.5) or SPN-cent(C4.5) notation seems to be up there.

--Christina

notator commented 5 years ago

@cecilios said

I would vote for allowing only one type of units in the standard, either cents or semitones.

Agreed. In #138, we are currently assuming that <note> is going to have a separate (optional) sounding attribute that would determine its frequency. The frequency information can't be located in the (graphic) pitch information since it depends on external state information (the parser's current key, transposition and measure state). The <note>'s sounding attribute, if it exists, would override the frequency calculated using the pitch attribute and the current state of the parser. This simplifies things considerably, since the pitch attribute no longer has to contain both graphical and temporal information (as in this issue's opening comment).

@clnoel raises the question of whether we should use MIDI-cent (60.5) or SPN-cent(C4.5) notation. I have a clear preference for the first of these.

  1. The names of written notes (e.g. C4) should be kept out of frequency descriptions. Anything that can be done to avoid confusion between written and sounding (space and time) information should be done, otherwise programmers are going to be asking themselves if the "C4" is subject to the current key or transposition. Its much better to nip such problems in the bud by choosing a convention which simply does not transpose.
  2. "60.5" is a simple number, half-way between 60 and 61, so it can be parsed simply, and used as such to create a frequency (using MIDI messages, Hertz etc.). Its not clear that C4.5 is half way between C4 and C#4. Also, parsers would have to allow for Db4 being used. Maybe some files will start containing C##4 and Dbb4 here... That all means unnecessary complication, time wasting and code bloat...
  3. These are the frequency units that are going to be used in all MNX notations (not just MNX-Common). Not all notations need to know what a C4 is. All notations are equidistant from MIDI.