mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
37 lines
No EOL
786 B
HTML
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> |