2014-10-22 22:49:42 +00:00
|
|
|
<!DOCTYPE html>
|
2014-06-20 04:25:00 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
2014-10-22 22:49:42 +00:00
|
|
|
<meta charset="utf-8">
|
2019-01-09 01:21:29 +00:00
|
|
|
<title>Noise</title>
|
2014-06-20 04:25:00 +00:00
|
|
|
|
2019-01-09 01:21:29 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
|
|
<link rel="icon" type="image/png" sizes="174x174" href="./favicon.png">
|
2014-09-06 19:35:31 +00:00
|
|
|
|
2019-01-09 01:21:29 +00:00
|
|
|
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@^2/webcomponents-bundle.js"></script>
|
2017-03-18 16:35:37 +00:00
|
|
|
<script src="../build/Tone.js"></script>
|
2019-01-09 01:21:29 +00:00
|
|
|
<script src="./js/tonejs-ui.js"></script>
|
2015-02-12 03:39:28 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2019-01-09 01:21:29 +00:00
|
|
|
<style>
|
|
|
|
tone-trigger, tone-oscilloscope {
|
|
|
|
margin-bottom: 10px;
|
|
|
|
}
|
|
|
|
tone-oscilloscope {
|
|
|
|
background-color: black;
|
|
|
|
height: 60px;
|
|
|
|
width: 100%;
|
2015-06-07 18:05:59 +00:00
|
|
|
}
|
|
|
|
</style>
|
2019-01-09 01:21:29 +00:00
|
|
|
<tone-example>
|
|
|
|
<tone-explanation label="Noise">
|
|
|
|
<a href="https://tonejs.github.io/docs/Noise">Tone.Noise</a>
|
2015-06-27 22:02:55 +00:00
|
|
|
has 3 different types of noise. Careful, it's loud!
|
2019-01-09 01:21:29 +00:00
|
|
|
</tone-explanation>
|
|
|
|
|
|
|
|
<tone-content>
|
|
|
|
<tone-oscilloscope></tone-oscilloscope>
|
|
|
|
<tone-trigger></tone-trigger>
|
|
|
|
<tone-noise></tone-noise>
|
|
|
|
</tone-content>
|
|
|
|
</tone-example>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2015-02-12 03:39:28 +00:00
|
|
|
//make the noise and connect it to the output
|
2015-06-07 18:05:59 +00:00
|
|
|
var noise = new Tone.Noise({
|
2019-01-09 01:21:29 +00:00
|
|
|
"volume" : -10,
|
2015-06-07 18:05:59 +00:00
|
|
|
"type" : "brown"
|
|
|
|
}).toMaster();
|
2015-02-12 03:39:28 +00:00
|
|
|
|
2019-01-09 01:21:29 +00:00
|
|
|
//bind the inteface
|
|
|
|
document.querySelector("tone-oscilloscope").bind(noise);
|
|
|
|
document.querySelector("tone-trigger").bind(noise);
|
|
|
|
document.querySelector("tone-noise").bind(noise);
|
2015-02-12 03:39:28 +00:00
|
|
|
</script>
|
2014-06-20 04:25:00 +00:00
|
|
|
</body>
|
2017-03-18 16:35:37 +00:00
|
|
|
</html>
|