W3C home > Mailing lists > Public > public-audio@w3.org > January to March 2012

Re: MIDI files and streams -- was ACTION-33: MIDI charter proposal

From: Chris Wilson <cwilso@google.com>
Date: Fri, 2 Mar 2012 12:35:12 -0800
Message-ID: <CAJK2wqUF1U3OeF8G1+bUUiB2XQs4omfNjZwbHrh2skiRVWZSDQ@mail.gmail.com>
To: James Ingram <j.ingram@netcologne.de>
Cc: public-audio@w3.org, Chris Rogers <crogers@google.com>
On Fri, Mar 2, 2012 at 4:27 AM, James Ingram <j.ingram@netcologne.de> wrote:

>  Right. This is true of the Windows APIs as well; when received and sent,
>>  the messages are time-stamped.  This is for use by the underlying MIDI
>>  driver and hardware; it's not part of the MIDI protocol itself.
> If its not part of the MIDI protocol itself, then it should probably be
> hidden behind any new (JavaScript) W3C MIDI API. Yes?

As others stated - the API exposing this info is fairly critical to getting
timing accuracy.

> So I'll stick to my guns, and repeat that MIDI commands (in the MIDI
> protocol) don't use time stamps. SMFs use the methods outlined by Anthony
> yesterday [2]. These generally consist of projecting a series of nominally
> regular ticks (of some sort) onto the other messages in the file.

The MIDI >protocol< doesn't use timestamps.  MIDI APIs typically do, in
order to minimize latency errors.

> And I'd like to have a function in the JavaScript API which would allow me
> to set the frequency with which the clock-ticks are sent. (i.e. give me
> control over how fast to play a MIDI file.)

You've actually hit the nail on the head - it's relatively easy to write
code that would inject a beat clock from the API.  However, you're quickly
going to want to interface with that beat clock - e.g., have the transport
controls, time code, etc, all directly represented - and that becomes a
fairly large and complex API surface in order to enable all possible
DAW/sequencer/synth designs.

> This is perfectly good MIDI language, but I have to say that my toe-nails
> curl up when I see MIDI talking about "tempo" and "quarter notes". MIDI
> uses "beat" and "quarter note" interchangeably -- as in "beats per minute"
> and "quarter-notes per minute". This is the kind of confusion that got
> 20th century music notation into big trouble.

Noted.  I'll try to avoid saying "quarter note", which I don't think is
used outside of SMF.

> Apropos age: I'm not very interested in the Standard MIDI File format. Its
> a binary format, and there's a lot of software and better expertise than
> mine out there for dealing with it. I think we only have to support it for
> historical reasons.

I actually think SMF is interesting for more than historical reasons, but I
think it's a lot more interesting as a publicly available library.

Received on Friday, 2 March 2012 20:35:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:49:58 UTC