SHARE
TWEET

Untitled

a guest Jan 21st, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. createSound(time: any, char: string) {
  2.     for (const c of char) {
  3.       switch (c) {
  4.       case '.':
  5.         this.gain.gain.setValueAtTime(1.0, time);
  6.         time += this.dot;
  7.         this.gain.gain.setValueAtTime(0.0, time);
  8.         break;
  9.       case '-':
  10.         this.gain.gain.setValueAtTime(1.0, time);
  11.         time += 3 * this.dot;
  12.         this.gain.gain.setValueAtTime(0.0, time);
  13.         break;
  14.       }
  15.       time += this.dot;
  16.     }
  17.  
  18.     return time;
  19.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top