From b3b22d2acfb72a78d28e12dcc3a9260ffcd70aff Mon Sep 17 00:00:00 2001 From: rwow Date: Mon, 19 Feb 2024 20:07:30 +0100 Subject: [PATCH] signals silence and noise were added --- tinnitus.html | 104 ++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 42 deletions(-) diff --git a/tinnitus.html b/tinnitus.html index 6d77298..2060a90 100644 --- a/tinnitus.html +++ b/tinnitus.html @@ -44,66 +44,86 @@ } } } + function tune() + { + try { + osc.frequency.value = value("u"); + } + catch{} + return 0; + } + function volume() + { + try { + gainNode.gain.value = value("s"); + } + catch{} + return 0; + } + function stopit() + { + try {osc.stop();} + catch{} + return 0; + } - - -

Tinnitus emits wave with gain and frequency

- Gain [0.0 - 1.0] +

Tinnitus emits wave with gain and frequency

+ Gain [0.0 - 1.0] Frequency [Hz] -

Select your favorite pulse shape

- Sine +

Select your favorite pulse shape

+ Silence - Triangle + Sine - Sawtooth + Triangle - Square + Sawtooth -

-
- + else { + const wave = ctx.createPeriodicWave(real, imag); + osc.setPeriodicWave(wave); + } + gainNode = ctx.createGain(); + osc.connect(gainNode); + gainNode.connect(ctx.destination); + osc.frequency.value = value("u"); + gainNode.gain.value = value("s"); + osc.start(); + return 0; + } + -- 2.11.4.GIT