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

Re: Adding MIDI APIs to Audio WG Charter (was: MIDI enumeration (was: Re: getUserMedia use cases))

From: Chris Rogers <crogers@google.com>
Date: Thu, 2 Feb 2012 11:31:51 -0800
Message-ID: <CA+EzO0mkRNsTNn-nnuBUPP_NWEnV26fV7dmtm-s=_REnDvcsUw@mail.gmail.com>
To: Chris Lowis <chris.lowis@bbc.co.uk>
Cc: public-audio@w3.org
On Thu, Feb 2, 2012 at 4:03 AM, Chris Lowis <chris.lowis@bbc.co.uk> wrote:

> On 02/02/2012 11:32, Robert O'Callahan wrote:
>
>> Is there any good code
>> available that could be adapted for this? It would be very helpful if
>> someone investigated the viability of this approach.
>>
>
> Chris Rogers has built a basic, but very impressive in my opinion,
> wavetable synthesizer using his API.
>
> http://chromium.googlecode.**com/svn/trunk/samples/audio/**
> wavetable-synth.html<http://chromium.googlecode.com/svn/trunk/samples/audio/wavetable-synth.html>
>
> I think it could be adapted fairly easily to respond to note-on/off
> messages to play a piece of sequenced music.
>
> Cheers,
>
> Chris
>

Chris, thanks for the compliment!  There are still many things I could do
to improve that synthesizer, but it does show some basic use of envelopes
and sequencing using the API.  For what it's worth, I developed the
DLSMusicDevice at Apple that Tom White mentioned in an earlier post.  It's
able to read both DLS and SoundFont format sample-bank files, so I have
experience parsing these particular file formats.  It is certainly
conceivable (but not trivial) to write parsing code directly in JavaScript
and then use the sample data, key-mappings, envelope parameters, etc. to
drive a synthesizer written with the Web Audio API.  Parsing a SMF (.mid
file) in JavaScript to extract the sequence data is the easy part.  If I
had the time to do it myself, I would :)

Cheers,
Chris
Received on Thursday, 2 February 2012 19:32:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 2 February 2012 19:32:24 GMT