Last active
October 22, 2017 23:43
-
-
Save beefchimi/c37672189a7b029b5ffd981ba3662615 to your computer and use it in GitHub Desktop.
Basic oscillator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const context = new AudioContext(); | |
const oscNode = context.createOscillator(); | |
const gainNode = context.createGain(); | |
oscNode.connect(gainNode); | |
gainNode.connect(context.destination); | |
oscNode.start(); | |
oscNode.stop(1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment