mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 16:48:00 +00:00
55 lines
No EOL
1.5 KiB
HTML
55 lines
No EOL
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>NOISES</title>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
|
|
<script type="text/javascript" src="../build/Tone.js"></script>
|
|
<script type="text/javascript" src="../build/Tone.Preset.js"></script>
|
|
<script type="text/javascript" src="./deps/jquery.min.js"></script>
|
|
<script type="text/javascript" src="./deps/nexusUI.js"></script>
|
|
<script type="text/javascript" src="./deps/prism.js"></script>
|
|
<script type="text/javascript" src="./scripts/Interface.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="./style/examples.css">
|
|
<link rel="stylesheet" type="text/css" href="./style/prism.css">
|
|
|
|
<script type="text/javascript">
|
|
// jshint ignore: start
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
<div id="Explanation">
|
|
Noise
|
|
<br>
|
|
<br>
|
|
Tone has 3 different types of noise. Careful, it's loud!
|
|
</div>
|
|
<div id="Content">
|
|
<div id="Rack"></div>
|
|
<div id="CodeRack"></div>
|
|
</div>
|
|
<script id="ToneCode" type="text/javascript">
|
|
//make the noise and connect it to the output
|
|
var noise = new Tone.Noise().toMaster();
|
|
//so it's not too loud
|
|
noise.volume.value = -20;
|
|
</script>
|
|
|
|
<script id="GUI" type="text/javascript">
|
|
Interface.Rack("Rack", "Noise");
|
|
Interface.Toggle("Rack", function(on){
|
|
if (on){
|
|
noise.start();
|
|
} else {
|
|
noise.stop();
|
|
}
|
|
});
|
|
Interface.DropDown("Rack", noise, "type", ["white", "brown", "pink"]);
|
|
Interface.Code("CodeRack", "ToneCode");
|
|
</script>
|
|
</body>
|
|
</html> |