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
|
|
|
|
2014-04-16 00:05:11 +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>
|
2014-04-16 00:05:11 +00:00
|
|
|
<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">
|
2014-04-16 00:05:11 +00:00
|
|
|
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>
|