PannerNode

open class PannerNode(context: BaseAudioContext, options: PannerOptions = definedExternally) : AudioNode(source)

The PannerNode interface defines an audio-processing object that represents the location, direction, and behavior of an audio source signal in a simulated physical space.

MDN Reference

Constructors

Link copied to clipboard
constructor(context: BaseAudioContext, options: PannerOptions = definedExternally)

Properties

Link copied to clipboard

The channelCount property of the AudioNode interface represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node.

Link copied to clipboard

The channelCountMode property of the AudioNode interface represents an enumerated value describing the way channels must be matched between the node's inputs and outputs.

Link copied to clipboard

The channelInterpretation property of the AudioNode interface represents an enumerated value describing how input channels are mapped to output channels when the number of inputs/outputs is different.

Link copied to clipboard

The coneInnerAngle property of the PannerNode interface is a double value describing the angle, in degrees, of a cone inside of which there will be no volume reduction.

Link copied to clipboard

The coneOuterAngle property of the PannerNode interface is a double value describing the angle, in degrees, of a cone outside of which the volume will be reduced by a constant value, defined by the PannerNode.coneOuterGain property.

Link copied to clipboard

The coneOuterGain property of the PannerNode interface is a double value, describing the amount of volume reduction outside the cone, defined by the PannerNode.coneOuterAngle attribute.

Link copied to clipboard

The read-only context property of the the node is participating in.

Link copied to clipboard

The distanceModel property of the PannerNode interface is an enumerated value determining which algorithm to use to reduce the volume of the audio source as it moves away from the listener.

Link copied to clipboard

The maxDistance property of the PannerNode interface is a double value representing the maximum distance between the audio source and the listener, after which the volume is not reduced any further.

Link copied to clipboard

The numberOfInputs property of the AudioNode interface returns the number of inputs feeding the node.

Link copied to clipboard

The numberOfOutputs property of the AudioNode interface returns the number of outputs coming out of the node.

Link copied to clipboard

The orientationX property of the PannerNode interface indicates the X (horizontal) component of the direction in which the audio source is facing, in a 3D Cartesian coordinate space.

Link copied to clipboard

The orientationY property of the PannerNode interface indicates the Y (vertical) component of the direction the audio source is facing, in 3D Cartesian coordinate space.

Link copied to clipboard

The orientationZ property of the PannerNode interface indicates the Z (depth) component of the direction the audio source is facing, in 3D Cartesian coordinate space.

Link copied to clipboard

The panningModel property of the PannerNode interface is an enumerated value determining which spatialization algorithm to use to position the audio in 3D space.

Link copied to clipboard

The positionX property of the PannerNode interface specifies the X coordinate of the audio source's position in 3D Cartesian coordinates, corresponding to the horizontal axis (left-right).

Link copied to clipboard

The positionY property of the PannerNode interface specifies the Y coordinate of the audio source's position in 3D Cartesian coordinates, corresponding to the vertical axis (top-bottom).

Link copied to clipboard

The positionZ property of the PannerNode interface specifies the Z coordinate of the audio source's position in 3D Cartesian coordinates, corresponding to the depth axis (behind-in front of the listener).

Link copied to clipboard

The refDistance property of the PannerNode interface is a double value representing the reference distance for reducing volume as the audio source moves further from the listener – i.e., the distance at which the volume reduction starts taking effect.

Link copied to clipboard

The rolloffFactor property of the PannerNode interface is a double value describing how quickly the volume is reduced as the source moves away from the listener.

Functions

Link copied to clipboard
fun connect(destinationParam: AudioParam, output: Int = definedExternally)

fun connect(destinationNode: AudioNode, output: Int = definedExternally, input: Int = definedExternally): AudioNode

The connect() method of the AudioNode interface lets you connect one of the node's outputs to a target, which may be either another AudioNode (thereby directing the sound data to the specified node) or an change the value of that parameter over time.

Link copied to clipboard

The disconnect() method of the AudioNode interface lets you disconnect one or more nodes from the node on which the method is called.

fun disconnect(output: Int)
fun disconnect(destinationNode: AudioNode)
fun disconnect(destinationParam: AudioParam)
fun disconnect(destinationNode: AudioNode, output: Int)
fun disconnect(destinationParam: AudioParam, output: Int)
fun disconnect(destinationNode: AudioNode, output: Int, input: Int)
Link copied to clipboard
Link copied to clipboard