This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

panningModel

Summary

Determines which spatialization algorithm will be used to position the audio in 3D space. See below for the available choices. The default is HRTF.

Property of apis/webaudio/PannerNodeapis/webaudio/PannerNode

Syntax

var result = PannerNode.panningModel;
PannerNode.panningModel = value;

Return Value

Returns an object of type unsigned shortunsigned short

Uses one of the following constant values:

  • EQUALPOWER (0), a simple and efficient spatialization algorithm using equal-power panning;
  • HTRF (1) (default), a higher quality spatialization algorithm using a convolution with measured impulse responses from human subjects, which renders stereo output

Examples

var audioCtx = new AudioContext();
var panner = audioCtx.createPanner();
panner.panningModel = 'HRTF';

Related specifications

W3C Web Audio API
W3C Editor’s Draft