Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- createSound(time: any, char: string) {
- for (const c of char) {
- switch (c) {
- case '.':
- this.gain.gain.setValueAtTime(1.0, time);
- time += this.dot;
- this.gain.gain.setValueAtTime(0.0, time);
- break;
- case '-':
- this.gain.gain.setValueAtTime(1.0, time);
- time += 3 * this.dot;
- this.gain.gain.setValueAtTime(0.0, time);
- break;
- }
- time += this.dot;
- }
- return time;
- }
Add Comment
Please, Sign In to add comment