2014-04-07 00:12:40 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>FEEDBACK DELAY</title>
|
|
|
|
|
|
|
|
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
|
2014-04-16 00:05:11 +00:00
|
|
|
<script type="text/javascript" src="../build/Tone.js"></script>
|
2014-04-07 00:12:40 +00:00
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
2014-04-16 00:05:11 +00:00
|
|
|
<button onclick='player.start()'>hit</button>
|
|
|
|
<div id='loading'>loading...<div>
|
2014-04-07 00:12:40 +00:00
|
|
|
<script type="text/javascript">
|
2014-04-16 00:05:11 +00:00
|
|
|
//the player
|
|
|
|
var player = new Tone.Player("../audio/505/snare.mp3");
|
|
|
|
|
|
|
|
//load it
|
|
|
|
player.load(function(){
|
|
|
|
document.querySelector("#loading").remove();
|
2014-04-07 00:12:40 +00:00
|
|
|
});
|
|
|
|
|
2014-04-16 00:05:11 +00:00
|
|
|
var feedbackDelay = new Tone.FeedbackDelay(.25);
|
|
|
|
//60% feedback
|
|
|
|
feedbackDelay.setFeedback(.6);
|
2014-04-07 00:12:40 +00:00
|
|
|
|
2014-04-16 00:05:11 +00:00
|
|
|
//connections
|
|
|
|
player.connect(feedbackDelay);
|
|
|
|
player.toMaster();
|
|
|
|
feedbackDelay.toMaster();
|
|
|
|
|
2014-04-07 00:12:40 +00:00
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|