So this is a real simple page to make noise with just some javascript:
Created
September 26, 2016 00:43
-
-
Save mpmckenna8/4c091d351d22a396a9fb8dc16709f4a5 to your computer and use it in GitHub Desktop.
Very simple noisy javascript
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
<html> | |
<head> | |
<link rel="stylesheet" href="style/main.css" /> | |
<title> The simplest HTML example | |
</title> | |
</head> | |
<body> | |
<h1> This is an HTML Page in which some javascript makes noise.</h1> | |
<script src="noisey.js"></script> | |
</body> | |
</html> |
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
var audioCon = new AudioContext(); | |
var start = audioCon.currentTime + .2; | |
var oscillate = audioCon.createOscillator(); | |
oscillate.type = 'triangle'; | |
oscillate.connect(audioCon.destination); | |
oscillate.start(start); | |
oscillate.stop(start + 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment