Re: Exploring MIDI support

On 12/27/2011 01:38 AM, Charles Pritchard wrote:
> There are no restrictions or requirements for codec support in media.
>
> Is the following as valid for midi devices as it is for microphones?:
>
> <audio src="file.mid">
> navigator.getUserMedia({audio: true}, gotAudio)
I don't understand that these 2 lines show any relationship between an 
<audio> tag and a MediaStream; there's no automatic link from 
getUserMedia() to an <audio> tag.

If getuserMedia() is going to return a stream in midi format, I would 
expect that to be

   navigator.getUserMedia({audio:midi}, gotAudio)
   navigator.getUserMedia({midi: true}, gotAudio)

or something like that.
>
> In this case, the media stream of gotAudio would be midi opcodes and 
> <audio> would pass opcodes to the OS.
> Is this a reasonable interpretation of how to implement in/out MIDI 
> support?
>
> audio.play() would send midi out (to the OS),
> and getUserMedia would capture from devices sending MIDI into the OS.
Would you expect the OS to automatically convert the MIDI codes to an 
audio form if the media stream is connected to a speaker? What if it's 
connected to a PeerConnection?
>
> -Charles
>
>
>

Received on Monday, 2 January 2012 13:44:58 UTC