Skip to content

Instantly share code, notes, and snippets.

@vitaliy-bobrov
Created June 11, 2019 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitaliy-bobrov/510d4a49e48b7734bd3762f24444ce1a to your computer and use it in GitHub Desktop.
Save vitaliy-bobrov/510d4a49e48b7734bd3762f24444ce1a to your computer and use it in GitHub Desktop.
// Setting target value (1st argument) starting from
// the current time in 0.01 second period
gainNode.gain.setTargetAtTime(2, context.currentTime, 0.01);
// Doing the same but exponentially.
gainNode.gain.exponentialRampToValueAtTime(gain, context.currentTime + 0.01);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment