Re: MusicXML and MIDI

Hi all,

Just on this duration issue in MusicXML...

When Sibelius/Musescore generate MusicXML, I believe those applications
round a bar of 4/4 to an integer of 1024. This means that any quarter note
in the bar will be 256, and that three quaver triplets will be 85, 85, and
86. And so if you are doing any kind of data analysis on the musicXML you
tend to run into problems because the rounding.

One way around this would be let duration be a fraction value in the
MusicXML, so 256 becomes 1/4, or 85/86 would just be 1/12 etc. This would
make things simpler to deal with the use of case of doing analytics on the
musicXML, and make it possible to still have the info needed to graphically
render things.

I think the convert-duration-to-milliseconds question raises a really
interesting point. Due to the nature of what this data specification is
trying to accomplish, it ends up with some redundancies in (such as the
tempo/beats/divisions thing). However, these are needed because of some of
the use cases and highlights that the MusicXML specification should be
focused on clarity above all, over economy

The reason I am not too fussed about the economy of MusicXML is that, if I
build a web application using MusicXML data, I am going to optimise the
data anyway, and convert the optimised data to JSON. For example, when I
have parsed musicXML durations to use in a web application, I will convert
the durations to fractions, get rid of the rounding issue, then I will hash
the fraction(as per below) and pop it into the web database.


MusicXML Fraction Hashed value for web app
1024 1/1 0
512 1/2 1
256 1/4 2
128 1/8 3


If I am dealing with a playback requirement in the application, I will
calculate a duration-as-milliseconds value which will go into my web
database, and then I can hand it off to the WEB MIDI API as needed.

But whatever I am doing, I want the musicXML to be as clear as possible to
begin with. It doesn't matter if it is information heavy (i.e a fraction
rather than an int, or tempo/beats rather than milliseconds) - this is
simple to resolve at the data-prep stage before.

Dealing with duration seems to come up a bit on the various conversations
about MusicXML. I think all this highlights the tension we seem to have
between using this data for temporal type activities vs. using it for
rendering graphics. But however it evolves, having more clarity over
duration (i.e. rendering it as a fraction) would be great.


Regards,

Jamie

Jamie Gabriel
http://biodigitaljazz.org/



On Wed, Apr 6, 2016 at 8:06 PM, Andrew Hankinson <andrew.hankinson@gmail.com
> wrote:

> I think this assumes that notation is for playback, but that's not always
> the case. Durations will also inform the graphical appearance of a note
> (quarter, half, etc.).
>
> -Andrew
>
> > On Apr 6, 2016, at 10:10 AM, James Ingram <j.ingram@netcologne.de>
> wrote:
> >
> >
> > Hi all,
> >
> > I have very little experience with the inner workings of MusicXML, so I
> ought to stay out of any detailed discussions about turning it into a W3C
> standard. However, I do have a proposal which I think might help to
> future-proof it.
> > Maybe this is already implemented.  Maybe it can't be implemented. I
> really don't know.
> >
> > Proposal:
> > MusicXML should allow durations to be defined simply as milliseconds.
> >
> > This would be an alternative to the tempo/beats/divisions timing model
> that comes from the 1981 MIDI standard.
> >
> > During the recent process of defining the Web MIDI API, they discovered
> that the tempo/beats/divisions model was redundant. So they dropped it in
> favour of just using milliseconds. Browsers have to be very economical with
> their code. And MIDI.org says
> >> the Web-MIDI API is the most significant advancement of MIDI sinceā€¦
> MIDI itself!
> > Adopting this proposal would allow the authoring tools that use standard
> clefs, staves and chord symbols to migrate gracefully to the more flexible
> timing model -- and still be MusicXML compatible.
> >
> > Questions: Does MusicXML provide any support for MIDI Continuous
> Controllers? Can it? Should it?
> >
> > All the best,
> > James
> >
> >
>
>
>


-- 
Jamie Gabriel
http://biodigitaljazz.org/

Received on Wednesday, 6 April 2016 11:44:44 UTC