mirror of
https://github.com/Tonejs/Tone.js
synced 2025-01-02 15:08:42 +00:00
32 lines
No EOL
712 B
HTML
32 lines
No EOL
712 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="../build/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(.6);
|
|
|
|
//connections
|
|
player.connect(feedbackDelay);
|
|
player.toMaster();
|
|
feedbackDelay.toMaster();
|
|
|
|
</script>
|
|
</body>
|
|
</html> |