Re: Serial connection between multiple pannerNodes recursively

KeonHo Kim writes:

> I don't know also why other source type is not considered. The others should
> be affected.
>
> Also, I think that all doppler rates from connected panners should affect
> audio sources when they adjust source's playback rate.

One source can only play back at one rate (unless the source and
all other nodes in common paths are cloned).

This is a problem when there are multiple panners downstream from
a source, whether they are in parallel or serial.  Even if they
are in serial, it wouldn't make sense to just sum the Doppler
effects because the velocity of each panner is relative to the
listener, not directly to any up- or down-stream panner.

One way to do this right is with delay buffers.  Each delay buffer
can be controlled precisely through the AudioParam interface, and
apply the correct effect for each path in the graph.  This is
effective for any kind of source upstream.

Delay buffers may be costly on memory use if the object is 1 km
away.  playbackRate is available as an alternative on
AudioBufferSourceNode and frequency on Oscillator, with AudioParam
interfaces for continuously varying values.

As the Web Audio API has delay nodes, and playbackRate, there is
no need for a Doppler effect on PannerNode.  I wonder whether
PannerNode.setVelocity() is ideal anyway because the desired
effect would usually be a transition through time, but the
setVelocity method only accepts constant values at each call.

Received on Saturday, 1 March 2014 08:20:21 UTC