Created
July 2, 2017 03:11
-
-
Save softpunch/03e95909898b69173dbab1e0729c4bad to your computer and use it in GitHub Desktop.
Web Audio boilerplate, variables, and functions
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
// | |
// convenient variables and functions to schedule and control Web Audio; | |
// also useful for controlling other systems using Web Audio's utilities | |
// | |
window.AudioContext = window.AudioContext || window.webkitAudioContext; | |
var audioContext = new AudioContext(); | |
var baseFreq = 440; // A4, Midi Note #69 | |
var baseTempo = 120; // BPM | |
var audioOut = audioContext.destination; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment