Tone.js/examples/feedbackDelay.html
2014-06-23 00:53:59 -04:00

28 lines
No EOL
678 B
HTML

<html>
<head>
<title>FEEDBACK DELAY</title>
<script type="text/javascript" src="../Tone.js"></script>
<link rel="stylesheet" type="text/css" href="exampleStyle.css">
</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", 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>