mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-27 03:53:07 +00:00
e32f4b58cb
* type attribute not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type at not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not needed * type att not neede * type att not needed * type att not needed * type att not needed * type att not needed
64 lines
1.6 KiB
HTML
64 lines
1.6 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">
|
|
<link rel="icon" type="image/png" sizes="174x174" href="./style/favicon.png">
|
|
|
|
<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>
|
|
|
|
<link rel="stylesheet" type="text/css" href="./style/examples.css">
|
|
|
|
<script>
|
|
// 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="https://tonejs.github.io/docs/#PingPongDelay">Tone.PingPongDelay</a> docs.
|
|
</div>
|
|
</div>
|
|
<script>
|
|
//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>
|
|
$(function(){
|
|
|
|
Interface.Loader();
|
|
|
|
Interface.Button({
|
|
text : "trigger",
|
|
start : function(){
|
|
player.start();
|
|
},
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|