Tone.js/examples/feedbackDelay.html
2014-04-06 20:12:40 -04:00

37 lines
No EOL
786 B
HTML

<html>
<head>
<title>FEEDBACK DELAY</title>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="../deps/require.js"></script>
</head>
<body>
<button>hit</button>
<script type="text/javascript">
require.config({
baseUrl : "../"
});
require(["Tone/core/Tone", "Tone/core/Master", "Tone/source/Player", "Tone/effects/FeedbackDelay"], function(Tone){
var player = new Tone.Player("../audio/505/snare.mp3");
player.load(function(){
$("button").click(function(){
player.start();
})
});
var feedbackDelay = new Tone.FeedbackDelay();
feedbackDelay.setFeedback(.6);
player.connect(feedbackDelay);
player.toMaster();
feedbackDelay.toMaster();
});
</script>
</body>
</html>