Tone.js/examples/pingPongDelay.html

54 lines
1.5 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
2014-09-04 04:06:01 +00:00
<html>
<head>
<meta charset="utf-8">
2014-09-04 04:06:01 +00:00
<title>PINGPONG DELAY</title>
2014-09-06 19:35:31 +00:00
2015-06-27 22:10:18 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
2015-12-08 05:06:58 +00:00
<link rel="icon" type="image/png" sizes="174x174" href="./style/favicon.png">
2014-09-04 04:06:01 +00:00
<script src="../build/Tone.js"></script>
<script src="./scripts/jquery.min.js"></script>
<script src="./scripts/draggabilly.js"></script>
<script src="./scripts/StartAudioContext.js"></script>
<script src="./scripts/Interface.js"></script>
<script src="https://tonejs.github.io/Logo/build/Logo.js"></script>
2014-09-04 04:06:01 +00:00
2015-02-13 21:24:52 +00:00
<link rel="stylesheet" type="text/css" href="./style/examples.css">
<script>
2015-02-13 21:24:52 +00:00
// jshint ignore: start
</script>
2014-09-04 04:06:01 +00:00
</head>
<body>
2015-02-13 21:24:52 +00:00
<div id="Content">
2015-06-27 21:25:01 +00:00
<div id="Title">Ping Pong Delay</div>
<div id="Explanation">
A Ping Pong Delay is a stereo feedback delay where the delay bounces back and forth between the left and right channels. Hit the button to trigger a snare sample into the effect.
2015-06-27 22:02:55 +00:00
<br><br>
<a href="https://tonejs.github.io/docs/#PingPongDelay">Tone.PingPongDelay</a> docs.
2015-06-27 21:25:01 +00:00
</div>
2015-02-13 21:24:52 +00:00
</div>
<script>
2015-02-13 21:24:52 +00:00
//the feedback delay
var feedbackDelay = new Tone.PingPongDelay({
"delayTime" : "8n",
"feedback" : 0.6,
"wet" : 0.5
}).toMaster();
2014-09-04 04:06:01 +00:00
2015-02-13 21:24:52 +00:00
//play a snare sound through it
var player = new Tone.Player("./audio/505/snare.[mp3|ogg]").connect(feedbackDelay);
2015-06-27 21:25:01 +00:00
2017-03-26 20:39:19 +00:00
Interface.Loader();
2015-06-27 21:25:01 +00:00
2017-03-26 20:39:19 +00:00
Interface.Button({
text : "trigger",
start : function(){
player.start();
},
2015-02-13 21:24:52 +00:00
});
2014-09-04 04:06:01 +00:00
</script>
</body>
</html>