Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smooth transition when using sliders to set params #28

Open
iooops opened this issue Mar 12, 2019 · 3 comments
Open

Smooth transition when using sliders to set params #28

iooops opened this issue Mar 12, 2019 · 3 comments

Comments

@iooops
Copy link

iooops commented Mar 12, 2019

When I use a slider to change the value, e.g. setPosition, there're sometimes clipping sounds, especially when I am sliding fast.
And I can't use linearRamp since it's not an audio node param.
How could I resolve this?

@drewbitllama
Copy link
Contributor

drewbitllama commented Mar 12, 2019 via email

@iooops
Copy link
Author

iooops commented Mar 12, 2019

Can you add a linearRamp like function in the SDK? This can allow smooth transition.

@iooops
Copy link
Author

iooops commented Mar 15, 2019

Maybe can override omnitone's functions like setRotationMatrix3 & setRotationMatrix4 ?


/**
 * Updates the rotation matrix with 4x4 matrix.
 * @param {Number[]} rotationMatrix4 - A 4x4 rotation matrix. (column-major)
 */
FOARotator.prototype.setRotationMatrix4 = function(rotationMatrix4) {
  this._m0.gain.value = rotationMatrix4[0];
  this._m1.gain.value = rotationMatrix4[1];
  this._m2.gain.value = rotationMatrix4[2];
  this._m3.gain.value = rotationMatrix4[4];
  this._m4.gain.value = rotationMatrix4[5];
  this._m5.gain.value = rotationMatrix4[6];
  this._m6.gain.value = rotationMatrix4[8];
  this._m7.gain.value = rotationMatrix4[9];
  this._m8.gain.value = rotationMatrix4[10];
};

Instead of set the value directly, using setTargetAtTime to smooth out the transition?

If it should be done by myself, how could I override your functions then?

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

No branches or pull requests

2 participants