Tone.js/examples/transport.html
2014-04-04 20:24:19 -04:00

57 lines
No EOL
1.4 KiB
HTML

<html>
<head>
<title>Transport</title>
<link rel="stylesheet" type="text/css" href="../style/GUI.css">
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="../src/core/Tone.js"></script>
<script type="text/javascript" src="../src/component/Transport.js"></script>
<script type="text/javascript" src="../src/component/Player.js"></script>
<script type="text/javascript" src="../src/GUI/GUI.js"></script>
<script type="text/javascript" src="../src/GUI/GUI.Button.js"></script>
<script type="text/javascript" src="../src/GUI/GUI.Transport.js"></script>
</head>
<body>
<style type="text/css">
body {
font-family: monospace;
}
</style>
<script type="text/javascript">
var transport = new Tone.Transport(60, 4);
var transportGUI = new Tone.GUI.Transport($("body"), transport);
var player = new Tone.Player("../audio/505/hh.mp3");
player.toMaster();
player.setVolume(1);
player.load(function(){
// transport.start(1);
});
transport.setTimeout(function(time){
console.log("a");
}, "0:0");
transport.setTimeout(function(time){
console.log("series");
}, "0:1");
transport.setTimeout(function(time){
console.log("of");
}, "0:2");
transport.setTimeout(function(time){
console.log("timed");
}, 3);
transport.setTimeout(function(time){
console.log("events");
}, "1m");
</script>
</body>
</html>