mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-28 12:33:12 +00:00
added tempo controls
This commit is contained in:
parent
4b8bc014ad
commit
ddf35f1386
1 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,9 @@
|
||||||
<div id="checkboxes"></div>
|
<div id="checkboxes"></div>
|
||||||
<div id="output"></div>
|
<div id="output"></div>
|
||||||
<div id="loading">loading...</div>
|
<div id="loading">loading...</div>
|
||||||
|
<br><br>
|
||||||
|
<input type='range' value='120' min='100' max='160'>
|
||||||
|
<div id='tempo' >bpm: 120</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
//which beat in the 16 beats
|
//which beat in the 16 beats
|
||||||
|
@ -123,6 +126,11 @@
|
||||||
makeRadios();
|
makeRadios();
|
||||||
makeCheckboxes();
|
makeCheckboxes();
|
||||||
Tone.Transport.setBpm(120);
|
Tone.Transport.setBpm(120);
|
||||||
|
$("input").on("input", function(){
|
||||||
|
var tempo = $(this).val();
|
||||||
|
$("#tempo").text("bpm: "+tempo);
|
||||||
|
Tone.Transport.setBpm(tempo);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue