Tone.js/examples/bitCrush.html
2014-04-06 16:51:30 -04:00

34 lines
No EOL
720 B
HTML

<html>
<head>
<title>Bit Crush</title>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<!--
<script type="text/javascript" src='../Tone.js'></script>
-->
<script type="text/javascript" src="../deps/require.js"></script>
</head>
<body>
<button>start</button>
<script type="text/javascript">
require.config({
baseUrl : "../"
});
require(["Tone/core/Tone", "Tone/core/Master", "Tone/signal/BitCrusher"], function(Tone){
var sine = Tone.context.createOscillator();
var crusher = new Tone.BitCrusher(5);
sine.connect(crusher);
crusher.toMaster();
$("button").click(function(){
sine.start(0);
})
window.crusher = crusher;
});
</script>
</body>
</html>