Re: MusicXML and MIDI

...snip...

> I note that MEI also addresses this question by supply a variety of different timestamps for musical events, including both metrical (notated) time and other assorted time bases; some tick-based (as with MIDI) and some millisecond-based. However it is not clear to me how these time bases are reconciled or what conventions exist for knowing which timestamps can be relied on to be present in various situations. Perhaps someone from the MEI community can speak to this.

MEI treats durations and timestamps differently, and makes the distinction between logical and gestural durations. 

<note dur="4" dur.ges="256p" />

Would indicate a quarter note with 256 MIDI pulses-per-quarter. A 'swung' quarter then might be:

<note dur="4" dur.ges="264p" />

Gestural durations can also be expressed in the case of beats or seconds, so dur.ges="3s" or dur.ges="1.5b" would also be valid.

MEI relies on validation to ensure the proper values of attributes, and these values are determined by regex or built-in XML data types. So, for example, the "dur.ges" attribute is defined as an attribute which takes a data type of "data.DURATION.gestural":

https://github.com/music-encoding/music-encoding/blob/develop/source/specs/mei-source.xml#L4587

and this duration is composed of sub-types, validated by regex:

https://github.com/music-encoding/music-encoding/blob/develop/source/specs/mei-source.xml#L875 (and following). 

If a user or software puts "dur.ges=4", this will fail validation because the regex specifies gestural durations must have a number with an associated unit of either PPQ (p), beats (b), seconds (s), or humdrum beat proportions (r). This is all built into the schema, so one need only run a given encoding against the RelaxNG schema using any XML validator (xmllint) to determine whether or not a given duration is valid.

For timestamps, we express duration as the passage of musical time expressed as beats and measures, so an object with "@tstamp=1m+2" would mean that that particular object began at an offset of 1 measure and two beats. Often you will get "@tstamp" and "@tstamp2" which allows an object to take a duration (e.g., a hairpin).

-Andrew

Received on Wednesday, 6 April 2016 16:54:42 UTC