2014-10-22 22:49:42 +00:00
<!DOCTYPE html>
2014-09-04 04:06:01 +00:00
< html >
< head >
2014-10-22 22:49:42 +00:00
< meta charset = "utf-8" >
2014-09-04 04:06:01 +00:00
< title > PINGPONG DELAY< / title >
2014-09-06 19:35:31 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1, user-scalable=no" >
2014-09-04 04:06:01 +00:00
2014-09-04 19:20:25 +00:00
< script type = "text/javascript" src = "./deps/jquery.min.js" > < / script >
< script type = "text/javascript" src = "../build/Tone.js" > < / script >
2015-02-13 21:24:52 +00:00
< script type = "text/javascript" src = "./deps/nexusUI.js" > < / script >
< script type = "text/javascript" src = "./deps/prism.js" > < / script >
< script type = "text/javascript" src = "./scripts/Interface.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" >
< link rel = "stylesheet" type = "text/css" href = "./style/prism.css" >
< script type = "text/javascript" >
// jshint ignore: start
< / script >
2014-09-04 04:06:01 +00:00
< / head >
< body >
2015-02-13 21:24:52 +00:00
< style type = "text/css" >
[nx="button"]{
margin: auto;
position: relative;
display: block;
}
< / style >
< div id = "Explanation" >
Ping Pong Delay
< br >
< br >
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.
2014-09-04 04:06:01 +00:00
< / div >
2015-02-13 21:24:52 +00:00
< div id = "Content" >
< div id = "LoadingBar" > < / div >
< div id = "Rack" > < / div >
< div id = "Code" > < / div >
< / div >
< script id = "ToneCode" type = "text/javascript" >
//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")
.connect(feedbackDelay);
< / script >
< script type = "text/javascript" >
Interface.Loading("LoadingBar");
Interface.Rack("Rack", "PingPongDelay");
Interface.Momentary("Rack", function(on){
2014-09-04 04:06:01 +00:00
if (on){
player.start();
}
2015-02-13 21:24:52 +00:00
});
Interface.Slider("Rack", feedbackDelay, "feedback", 0, 0.95);
Interface.Slider("Rack", feedbackDelay, "delayTime", 0.1, 0.5);
Interface.Code("Code", "ToneCode");
2014-09-04 04:06:01 +00:00
< / script >
< / body >
< / html >