mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-27 03:53:07 +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="output"></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">
|
||||
|
||||
//which beat in the 16 beats
|
||||
|
@ -123,6 +126,11 @@
|
|||
makeRadios();
|
||||
makeCheckboxes();
|
||||
Tone.Transport.setBpm(120);
|
||||
$("input").on("input", function(){
|
||||
var tempo = $(this).val();
|
||||
$("#tempo").text("bpm: "+tempo);
|
||||
Tone.Transport.setBpm(tempo);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue