ignoring typescript errors

This commit is contained in:
Yotam Mann 2020-07-19 10:50:20 -07:00
parent 833144c63c
commit 554a560737
2 changed files with 9 additions and 4 deletions

View file

@ -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 => {

View file

@ -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());