Tone.js/examples/noises.html
Uzerus e32f4b58cb JS type attribute not needed in html5 (#214)
* type attribute not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type at not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not needed

* type att not neede

* type att not needed

* type att not needed

* type att not needed

* type att not needed
2017-03-18 12:35:37 -04:00

72 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>NOISES</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" sizes="174x174" href="./style/favicon.png">
<script src="../build/Tone.js"></script>
<script src="./scripts/jquery.min.js"></script>
<script src="./scripts/draggabilly.js"></script>
<script src="./scripts/StartAudioContext.js"></script>
<script src="./scripts/Interface.js"></script>
<script src="https://tonejs.github.io/Logo/build/Logo.js"></script>
<link rel="stylesheet" type="text/css" href="./style/examples.css">
<script>
// jshint ignore: start
</script>
</head>
<body>
<style type="text/css">
.Dragger#Noise {
left: 50%;
}
</style>
<div id="Content">
<div id="Title">Noise</div>
<div id="Explanation">
<a href="https://tonejs.github.io/docs/#Noise">Tone.Noise</a>
has 3 different types of noise. Careful, it's loud!
</div>
<div id="DragContainer"></div>
</div>
<script id="ToneCode">
//make the noise and connect it to the output
var noise = new Tone.Noise({
"volume" : -20,
"type" : "brown"
}).toMaster();
</script>
<script id="GUI">
$(function(){
Interface.Dragger({
tone : noise,
y : {
param : "volume",
min : -40,
max : 0
},
x : {
param : "type",
options : ["white", "brown", "pink"]
},
start : function(){
noise.start();
Tone.Master.volume.rampTo(0, 0.05);
},
end : function(){
//so it doesn't click
Tone.Master.volume.rampTo(-Infinity, 0.05);
}
});
})
</script>
</body>
</html>