Lub Dub Valves -

.valve-title font-size: 1.5rem; font-weight: bold; margin: 0.5rem 0;

.lub .valve-title color: #ff9f7c; .dub .valve-title color: #7cd4ff; lub dub valves

.valve.active .valve-icon transform: scale(1.2); .valve-title font-size: 1.5rem

const autoBtn = document.getElementById('autoCycleBtn'); autoBtn.addEventListener('click', () => if (isAuto) stopAutoCycle(); autoBtn.textContent = '🔄 AUTO CYCLE'; autoBtn.style.background = '#2b5e3b'; else // resume audio context on user gesture if (audioCtx.state === 'suspended') audioCtx.resume(); startAutoCycle(); autoBtn.textContent = '⏹️ STOP CYCLE'; autoBtn.style.background = '#a13e2d'; ); margin: 0.5rem 0

button:active transform: scale(0.96);

function playDub() if (audioCtx.state === 'suspended') audioCtx.resume(); const now = audioCtx.currentTime; const osc = audioCtx.createOscillator(); const gain = audioCtx.createGain(); osc.connect(gain); gain.connect(audioCtx.destination); osc.frequency.value = 210; // sharper gain.gain.value = 0.4; gain.gain.exponentialRampToValueAtTime(0.0001, now + 0.22); osc.start(); osc.stop(now + 0.22); // short high ping const osc2 = audioCtx.createOscillator(); const gain2 = audioCtx.createGain(); osc2.connect(gain2); gain2.connect(audioCtx.destination); osc2.frequency.value = 430; gain2.gain.value = 0.12; gain2.gain.exponentialRampToValueAtTime(0.0001, now + 0.16); osc2.start(); osc2.stop(now + 0.16);

Sign up for free

Sign up for a free uno account, allowing you to save overlays and more.

Sign up for uno