Tone.js/examples/envelope.html

21 lines
513 B
HTML
Raw Normal View History

2014-03-15 03:17:18 +00:00
<html>
<head>
2014-03-15 05:02:33 +00:00
<title>Envelope</title>
2014-03-15 03:17:18 +00:00
<script type="text/javascript" src="../build/Tone.js"></script>
2014-04-06 00:47:59 +00:00
2014-03-15 03:17:18 +00:00
</head>
<body>
<button onmousedown='env.triggerAttack()' onmouseup='env.triggerRelease()' id='Trigger'>trigger</button>
2014-03-15 03:17:18 +00:00
<script type="text/javascript">
2014-04-06 00:47:59 +00:00
</script>
<script type="text/javascript">
var env = new Tone.Envelope(.05, .01, .7, .4);
var noise = new Tone.Noise();
//connect the evnelope to the output gain
noise.toMaster();
env.connect(noise.output.gain);
2014-03-15 03:17:18 +00:00
</script>
</body>
</html>