Tone.js/examples/player.html
2015-12-08 00:06:58 -05:00

61 lines
No EOL
1.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>PLAYER</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" sizes="174x174" href="./style/favicon.png">
<script type="text/javascript" src="../build/Tone.js"></script>
<script type="text/javascript" src="./scripts/jquery.min.js"></script>
<script type="text/javascript" src="./scripts/draggabilly.js"></script>
<script type="text/javascript" src="./scripts/Interface.js"></script>
<script type="text/javascript" src="./scripts/Logo.js"></script>
<link rel="stylesheet" type="text/css" href="./style/examples.css">
<script type="text/javascript">
// jshint ignore: start
</script>
</head>
<body>
<div id="Content">
<div id="Title">Grains</div>
<div id="Explanation">
Click on the button to play short looped section of the audio file
using <a href="http://tonejs.org/docs/#Player">Tone.Player</a>.
</div>
</div>
<script type="text/javascript">
//the player
var player = new Tone.Player({
"url" : "./audio/FWDL.mp3",
"loop" : true,
"loopStart" : 0.101,
"loopEnd" : 0.211,
}).toMaster();
</script>
<script id="GUI" type="text/javascript">
$(function(){
new Interface.Loader();
new Interface.Button({
text : "Start Grain",
activeText : "Stop Grain",
start : function(){
player.start();
},
end : function(){
player.stop();
}
});
});
</script>
</body>
</html>