Tone.js/examples/pingPongDelay.html
Yotam Mann eea83d1728 updated examples style and copy
add Logo, updated qwerty hancock & nexusUI
2015-12-06 13:14:36 -05:00

62 lines
No EOL
1.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>PINGPONG DELAY</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script type="text/javascript" src="../build/Tone.js"></script>
<script type="text/javascript" src="./scripts/jquery.min.js"></script>
<script type="text/javascript" src="./scripts/draggabilly.js"></script>
<script type="text/javascript" src="./scripts/Interface.js"></script>
<script type="text/javascript" src="./scripts/Logo.js"></script>
<link rel="stylesheet" type="text/css" href="./style/examples.css">
<script type="text/javascript">
// jshint ignore: start
</script>
</head>
<body>
<style type="text/css">
[nx="button"]{
margin: auto;
position: relative;
display: block;
}
</style>
<div id="Content">
<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.
<br><br>
<a href="http://tonejs.org/docs/#PingPongDelay">Tone.PingPongDelay</a> docs.
</div>
</div>
<script type="text/javascript">
//the feedback delay
var feedbackDelay = new Tone.PingPongDelay({
"delayTime" : "8n",
"feedback" : 0.6,
"wet" : 0.5
}).toMaster();
//play a snare sound through it
var player = new Tone.Player("./audio/505/snare.mp3").connect(feedbackDelay);
</script>
<script type="text/javascript">
$(function(){
new Interface.Loader();
new Interface.Button({
text : "trigger",
start : function(){
player.start();
},
});
});
</script>
</body>
</html>