From 1e75238eefa54ea37eb819b2e60dc75fc6c693a8 Mon Sep 17 00:00:00 2001 From: Gene Mecija Date: Sun, 22 Dec 2019 00:21:52 -0800 Subject: [PATCH] Lower tone volume --- src/App.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 27281a6..28efb40 100644 --- a/src/App.js +++ b/src/App.js @@ -37,10 +37,13 @@ function App() { clearInterval(gapTimer) o = context.createOscillator() + let g = context.createGain() + g.gain.exponentialRampToValueAtTime(0.08, context.currentTime) o.type = "sine" let frequency = 550.0 o.frequency.value = frequency - o.connect(context.destination) + o.connect(g) + g.connect(context.destination) o.start() startCharTimer()