---
url: "https://web.dev/articles/media/audio-effects/pattern"
titulek: "web.dev"
h1: ""
popis: ""
jazyk: "en"
kanonicka: "https://web.dev/articles/media/audio-effects/pattern"
drobecky: []
zdroj: "live"
wayback_snapshot: ""
stazeno: "2026-09-13 21:35:56"
znaku: 1825
slov: 203
kodovani: "iso-8859-2"
sha256: "93eaad70e8048f6e8a4e3c4ce632e9b1bb7db2fc9369e3cd3edb92c4290904fb"
---
Stay organized with collections
Save and categorize content based on your preferences.
HTML `
How to add effects to audio
How to add effects to audio
` CSS `:root { color-scheme: dark light; } html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } body { margin: 1rem; font-family: system-ui, sans-serif; }` JS `const button = document.querySelector('button'); button.addEventListener('click', () => { const audioCtx = new (window.AudioContext || window.webkitAudioContext)(); const oscillator = audioCtx.createOscillator(); oscillator.type = 'sine'; // Value is in hertz. oscillator.frequency.setValueAtTime(420, audioCtx.currentTime); const biquadFilter = audioCtx.createBiquadFilter(); biquadFilter.type = 'lowpass'; biquadFilter.frequency.setValueAtTime(200, audioCtx.currentTime + 1); oscillator.connect(biquadFilter); biquadFilter.connect(audioCtx.destination); oscillator.start(); oscillator.stop(2); });` Except as otherwise noted, the content of this page is licensed under the [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/), and code samples are licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). For details, see the [Google Developers Site Policies](https://developers.google.com/site-policies). Java is a registered trademark of Oracle and/or its affiliates. Last updated 2026-07-29 UTC.