Skip to content

heerman/webaudio-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Web Audio Demo

A simple Web Audio API html demo

Demo

<!DOCTYPE html>
<button id="playButton">Play Tone</button>
<script>
document.getElementById('playButton').addEventListener('click', function() {
    var audioCtx = new AudioContext()
    var osc = audioCtx.createOscillator()
    osc.connect(audioCtx.destination)
    osc.start()
    osc.stop(audioCtx.currentTime + 1)
})
</script>

About

Web Audio basic usage

Resources

Stars

Watchers

Forks

Releases

No releases published