Created
January 13, 2022 12:19
-
-
Save pushkine/eb475c349c99fe3c4c96bcd4ed1744f5 to your computer and use it in GitHub Desktop.
Revisions
-
pushkine created this gist
Jan 13, 2022 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ function beep() { const ctx = new AudioContext(); const oscillator = ctx.createOscillator(); const gainNode = ctx.createGain(); oscillator.connect(gainNode); gainNode.connect(ctx.destination); gainNode.gain.value = 0.25; oscillator.frequency.value = 350; oscillator.type = "triangle"; oscillator.start(); setTimeout(() => oscillator.stop(), 90); }