Tone.js/examples/feedbackDelay.html
2014-06-21 17:34:31 -04:00

31 lines
No EOL
645 B
HTML

<html>
<head>
<title>FEEDBACK DELAY</title>
<script type="text/javascript" src="../Tone.js"></script>
</head>
<body>
<button onclick='player.start()'>hit</button>
<div id='loading'>loading...<div>
<script type="text/javascript">
//the player
var player = new Tone.Player("./audio/505/snare.mp3");
//load it
player.load(function(){
document.querySelector("#loading").remove();
});
var feedbackDelay = new Tone.FeedbackDelay(.25);
//60% feedback
feedbackDelay.setFeedback(.2);
//connections
player.connect(feedbackDelay);
feedbackDelay.toMaster();
feedbackDelay.setWet(0.5);
</script>
</body>
</html>