- From: Chris Rogers <crogers@google.com>
- Date: Fri, 15 Mar 2013 10:34:27 -0700
- To: Jory <me@jory.org>
- Cc: public-audio-dev@w3.org
- Message-ID: <CA+EzO0=2AU+9FyBfZQZwe_ohhiHWTdw48__ovnhzC74-zgAnnA@mail.gmail.com>
On Thu, Mar 14, 2013 at 11:11 PM, Jory <me@jory.org> wrote: > On Thu, 14 Mar 2013 15:53:50 -0700, Chris Rogers wrote: > > For those interested in multi-channel output in the Web Audio API, here's > > your chance to try out an early build. This could be of interest for > > digital DJ type applications, or rendering to multi-channel speaker > > installations... > > > > Please note this is an early build and little testing has yet been made. > > So far I've tested on several devices on OSX. I'm interested in your > > feedback! > > > > The .maxChannelCount attribute is now exposed to show the actual number > of > > hardware channels: > > > > https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioDestinationNode > > > > The .channelCount attribute should now be settable on the > > AudioDestinationNode to values up to .maxChannelCount > > > > Cheers, > > Chris > > Well, I've spent a couple hours playing around, since multichannel > audio certainly interests me, both for games and music. I've had very > little success, though. > > I'm finding it very difficult to get any audio to play out anything but > the Left and Right channels. The only success I've had was forcing a > down-mix to 1 channel, where sound finally came out my Center channel. > So clearly the system functions in some manner. I've tried setting up a > 3D panner and hard-coding positional panning, but sound never leaves my > Lft-Rht channels. > Hi Jory, I believe Chris Wilson will be writing an article with more details and complete sample code. In the meantime, you can look at some of the partial example code here: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#UpMix Just to add a little more detail, with the "digital DJ" example you'd want to use a ChannelMergerNode to combine two separate stereo mixes. The first one would be connected to input 0 of the merger and the 2nd to input 1. Then the merger would be connected to the destination as configured in the partial example code. The ChannelMergerNode turns out to be really important for these types of applications. In another example, if your hardware supported 8 channels of output, you could configure it as 8-channel discrete, then create a merger and connect eight independent mono AudioNodes to inputs 0 - 7 of the merger. Then you could hookup eight speakers and place them anywhere in the room you like. And the mono sources could be whatever you want - maybe 8 de-correlated channels of white noise... Hope that helps. > > I also tried playing back a 6-channel interleaved WAV file, but while > the file appears to "play", sound doesn't come from any speaker, no > matter how I try to configure the channelCount. > > I'm beginning to wonder if 6-channel source files are playable at this > time or if that's unsupported. (Everything seems to have choked when I > supplied a 6-channel AAC file, but I'm not even 100% the file I > supplied was even playable, since getting multi-channel AAC output is > kinda challenging with today's tools.) Also, a bit of sample code would > do my morale wonders right about now. :-) > > Thanks! > > Jory > > me@jory.org > http://studio.jory.org > >
Received on Friday, 15 March 2013 17:34:55 UTC