From 564d55c63d167dc7a0df362f06dd9d264a77589d Mon Sep 17 00:00:00 2001 From: kumustaka Date: Sun, 16 Feb 2020 20:50:39 -0500 Subject: [PATCH] adds beep sound on last 3 ticks --- src/components/app/app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/app/app.js b/src/components/app/app.js index 101bad7..42c7a37 100644 --- a/src/components/app/app.js +++ b/src/components/app/app.js @@ -126,7 +126,13 @@ function App() { if (intervalsInCount) { const newIntervals = [...intervalsInCount]; const current = newIntervals[currentIndex]; - current.time--; // assume: interval at currentIndex is of non-zero time + // current.time--; // assume: interval at currentIndex is of non-zero time + current.time--; + + while (current.time <= 3 && current.time > 0) { + ring.play(NOTES.e5, 1, 0.08); + break; + } if (current.time === 0) { const lastIndex = newIntervals.length - 1; if (currentIndex === lastIndex) {