Tone.js/examples/lfo.html

31 lines
651 B
HTML
Raw Normal View History

2014-03-15 03:17:18 +00:00
<html>
<head>
2014-03-15 03:30:00 +00:00
<title>LFO</title>
2014-03-15 03:17:18 +00:00
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
2014-04-06 00:47:59 +00:00
<script type="text/javascript" src="../deps/require.js"></script>
2014-03-15 03:17:18 +00:00
</head>
<body>
2014-04-06 00:47:59 +00:00
<button>start</button>
2014-03-15 03:17:18 +00:00
<script type="text/javascript">
2014-04-06 00:47:59 +00:00
require.config({
2014-04-06 20:51:30 +00:00
baseUrl : "../"
2014-04-06 00:47:59 +00:00
});
2014-04-06 20:51:30 +00:00
require(["Tone/core/Tone", "Tone/core/Master", "Tone/source/Noise", "Tone/component/LFO"], function(Tone){
2014-04-06 00:47:59 +00:00
var noise = new Tone.Noise("brown");
var lfo = new Tone.LFO(.5);
noise.toMaster();
noise.output.gain.value = 0;
lfo.connect(noise.output.gain);
$("button").click(function(){
lfo.start();
})
});
2014-03-15 03:17:18 +00:00
</script>
</body>
</html>