mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
working example
This commit is contained in:
parent
494cd5576f
commit
48fbe17b87
1 changed files with 3 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
<title>LFO</title>
|
||||
|
||||
<script type="text/javascript" src="../build/Tone.js"></script>
|
||||
<script type="text/javascript" src="../Tone.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
@ -17,7 +17,6 @@
|
|||
lfo.connect(noise.output.gain);
|
||||
|
||||
//INTERFACE//
|
||||
|
||||
var button = document.querySelector("button");
|
||||
|
||||
var started = false;
|
||||
|
@ -26,9 +25,11 @@
|
|||
function startLFO(){
|
||||
if (!started){
|
||||
lfo.start();
|
||||
noise.start();
|
||||
button.textContent = "stop";
|
||||
} else {
|
||||
lfo.stop();
|
||||
noise.stop();
|
||||
button.textContent = "start";
|
||||
}
|
||||
started = !started;
|
||||
|
|
Loading…
Reference in a new issue