Skip to content

Conversation

@padenot
Copy link
Member

@padenot padenot commented Nov 18, 2014

It was somewhat obvious, but it's clearer to also have the formulas for [-1, +1]. Also I made it a a-rate mostly because it's technically just two gain nodes with carefully computed values, and gain nodes are a-rate.

This fixes #439.

It was somewhat obvious, but it's clearer to also have the formulas for [-1, +1]

This fixes #439.
@hoch
Copy link
Member

hoch commented Nov 19, 2014

@padenot
I think the algorithm on the change is incorrect. We still need to take care of the polarity of pan (azimuth) value in stereo->stereo case. I believe it should be same as equal power panning process in the original panner node.

// normalization for mono->stereo
x = (pan + 1) / 2;

// for stereo->stereo
if (pan <= 0) {
  x = pan + 1;
} else {
  x = pan;
}

x=pan doesn't mean anything particular, but I think it is better to keep it for the reason behind.

@padenot
Copy link
Member Author

padenot commented Nov 19, 2014

Ha, good catch. In fact, what you say is exactly how I implemented it in Gecko, it's just me writing spec text too late, heh :-)

cwilso added a commit that referenced this pull request Nov 19, 2014
Make StereoPannerNode a-rate and spec the algorithm
@cwilso cwilso merged commit f831b2c into gh-pages Nov 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants