PannerNode Class

A node that spatializes its input relative to the BaseAudioContext.Listener (https://webaudio.github.io/web-audio-api/#PannerNode): its output is stereo, panned by the azimuth (equal power, or a structural head-related transfer function), and attenuated by the distance and the sound cone.

public sealed class PannerNode : AudioNode
Inheritance
AudioNode PannerNode

Constructors

NameDescription
PannerNode(BaseAudioContext, PannerOptions?)Creates a panner.

PannerNode(BaseAudioContext, PannerOptions?)

PannerNode.cs

Creates a panner.

public PannerNode(BaseAudioContext context, PannerOptions? options = null)

Properties

NameDescription
ConeInnerAngleGets or sets the angle in degrees of the inner cone, in which the volume is not reduced.
ConeOuterAngleGets or sets the angle in degrees of the outer cone, outside of which the volume is PannerNode.ConeOuterGain.
ConeOuterGainGets or sets the gain outside of the outer cone, from 0 to 1.
DistanceModelGets or sets the distance model.
MaxDistanceGets or sets the maximum distance (the volume is not reduced further for greater distances).
OrientationXGets the x coordinate of the direction the source points to.
OrientationYGets the y coordinate of the direction the source points to.
OrientationZGets the z coordinate of the direction the source points to.
PanningModelGets or sets the spatialization algorithm.
PositionXGets the x coordinate of the position.
PositionYGets the y coordinate of the position.
PositionZGets the z coordinate of the position.
RefDistanceGets or sets the reference distance (the volume is not reduced for smaller distances).
RolloffFactorGets or sets how quickly the volume is reduced with the distance.

ConeInnerAngle

PannerNode.cs

Gets or sets the angle in degrees of the inner cone, in which the volume is not reduced.

public double ConeInnerAngle { get; set; }

ConeOuterAngle

PannerNode.cs

Gets or sets the angle in degrees of the outer cone, outside of which the volume is PannerNode.ConeOuterGain.

public double ConeOuterAngle { get; set; }

ConeOuterGain

PannerNode.cs

Gets or sets the gain outside of the outer cone, from 0 to 1.

public double ConeOuterGain { get; set; }

Property value

double

Exceptions

DomException
The value is not between 0 and 1 (an InvalidStateError).

See also

DistanceModel

PannerNode.cs

Gets or sets the distance model.

public DistanceModelType DistanceModel { get; set; }

MaxDistance

PannerNode.cs

Gets or sets the maximum distance (the volume is not reduced further for greater distances).

public double MaxDistance { get; set; }

OrientationX

PannerNode.cs

Gets the x coordinate of the direction the source points to.

public AudioParam OrientationX { get; }

OrientationY

PannerNode.cs

Gets the y coordinate of the direction the source points to.

public AudioParam OrientationY { get; }

OrientationZ

PannerNode.cs

Gets the z coordinate of the direction the source points to.

public AudioParam OrientationZ { get; }

PanningModel

PannerNode.cs

Gets or sets the spatialization algorithm.

public PanningModelType PanningModel { get; set; }

PositionX

PannerNode.cs

Gets the x coordinate of the position.

public AudioParam PositionX { get; }

PositionY

PannerNode.cs

Gets the y coordinate of the position.

public AudioParam PositionY { get; }

PositionZ

PannerNode.cs

Gets the z coordinate of the position.

public AudioParam PositionZ { get; }

RefDistance

PannerNode.cs

Gets or sets the reference distance (the volume is not reduced for smaller distances).

public double RefDistance { get; set; }

RolloffFactor

PannerNode.cs

Gets or sets how quickly the volume is reduced with the distance.

public double RolloffFactor { get; set; }

Methods

NameDescription
SetOrientation(float, float, float)Sets the direction the source points to (the values of the orientation parameters).
SetPosition(float, float, float)Sets the position (the values of the position parameters).

SetOrientation(float, float, float)

PannerNode.cs

Sets the direction the source points to (the values of the orientation parameters).

public void SetOrientation(float x, float y, float z)

SetPosition(float, float, float)

PannerNode.cs

Sets the position (the values of the position parameters).

public void SetPosition(float x, float y, float z)