LIVE OSCILLOSCOPE
8000Hz LPF · 0st
Category:
Web Audio API · Real-time Signal AnalysisTap any pad to initialize
Web Audio Synth Pad Studio
16-pad tactile synthesizer with 8-step sequencer and pure Web Audio API sound synthesis engine.
Master FX & Synthesizer Controls:
Pitch Transpose:0 semitones
Lowpass Filter Cutoff:8000 Hz
Echo / Delay:Off
Echo Feedback:30%
Master Volume:40%
Format:
// Reuse one AudioContext so repeated UI sounds stay responsive.
const ctx = new (window.AudioContext || window.webkitAudioContext)();
function triggerSound(freq = 440, type = 'sine', decay = 0.25, sweep) {
if (ctx.state === 'suspended') ctx.resume();
const now = ctx.currentTime;
const osc = ctx.createOscillator();
const gain = ctx.createGain();
const filter = ctx.createBiquadFilter();
const finalFreq = freq * Math.pow(2, 0/12);
osc.type = type;
osc.frequency.setValueAtTime(finalFreq, now);
if (sweep) osc.frequency.exponentialRampToValueAtTime(sweep * Math.pow(2, 0/12), now + decay);
filter.type = 'lowpass';
filter.frequency.setValueAtTime(8000, now);
gain.gain.setValueAtTime(0.4, now);
gain.gain.exponentialRampToValueAtTime(0.0001, now + decay);
osc.connect(filter);
filter.connect(gain);
gain.connect(ctx.destination);
osc.start(now);
osc.stop(now + decay + 0.02);
osc.onended = () => { osc.disconnect(); filter.disconnect(); gain.disconnect(); };
}