mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-10 05:54:20 +00:00
ignoring typescript errors
This commit is contained in:
parent
833144c63c
commit
554a560737
2 changed files with 9 additions and 4 deletions
|
@ -54,6 +54,7 @@
|
|||
|
||||
function loop() {
|
||||
requestAnimationFrame(loop);
|
||||
// @ts-ignore
|
||||
const [bar, beat, sixteenth] = Tone.Transport.position.split(":");
|
||||
document.querySelector("#progress").textContent = `
|
||||
bar: ${bar}, beat: ${beat}, sixteenth: ${sixteenth}
|
||||
|
@ -64,12 +65,14 @@
|
|||
// bind the interface
|
||||
document.querySelector("tone-play-toggle").addEventListener("start", e => {
|
||||
Tone.Transport.start();
|
||||
// enable all of the buttons if it's playing
|
||||
// enable all of the buttons if it's playing
|
||||
// @ts-ignore
|
||||
Array.from(document.querySelectorAll("tone-button")).forEach(el => el.disabled = false);
|
||||
});
|
||||
document.querySelector("tone-play-toggle").addEventListener("stop", () => {
|
||||
Tone.Transport.stop();
|
||||
// disable all of the buttons if it's not playing
|
||||
// disable all of the buttons if it's not playing
|
||||
// @ts-ignore
|
||||
Array.from(document.querySelectorAll("tone-button")).forEach(el => el.disabled = true);
|
||||
});
|
||||
document.querySelector("#at8n").addEventListener("click", e => {
|
||||
|
|
|
@ -245,8 +245,10 @@
|
|||
name: "Synth"
|
||||
});
|
||||
|
||||
document.querySelector("tone-slider-pad").addEventListener("move", e => move(e.detail));
|
||||
document.querySelector("tone-slider-pad").addEventListener("down", e => triggerAttack(e.detail));
|
||||
// @ts-ignore
|
||||
document.querySelector("tone-slider-pad").addEventListener("move", e => move(parseFloat(e.target.value)));
|
||||
// @ts-ignore
|
||||
document.querySelector("tone-slider-pad").addEventListener("down", e => triggerAttack(parseFloat(e.target.value)));
|
||||
document.querySelector("tone-slider-pad").addEventListener("up", () => synth.triggerRelease());
|
||||
|
||||
document.querySelector("tone-play-toggle").addEventListener("start", () => Tone.Transport.start());
|
||||
|
|
Loading…
Reference in a new issue