Skip to content

Latest commit

 

History

History
227 lines (173 loc) · 9.93 KB

README.md

File metadata and controls

227 lines (173 loc) · 9.93 KB

Bass Booster by SonicLab

A Manifest V3 browser extension that deepens the low end of any audio file — entirely on your device.

Chrome · Edge · Firefox · Opera

Manifest V3 Permissions No remote code License

SonicLab.io · Bass Booster (web) · All audio tools · Privacy


What it is

Click the toolbar icon, pick an audio file, boost the low end, hear it, and save a WAV. The file is decoded and filtered by the browser's own Web Audio engine inside the popup — it is never uploaded, and the extension requests no permissions at all.

It is the companion to the online SonicLab Bass Booster and uses the same audio-processing approach, ported to run standalone with no build step and no dependencies. Everything in this repository is exactly what the browser loads.

Bass Booster by SonicLab

Features

  • Bass Boost — up to +18 dB via a low-shelf filter, so sub-bass rises together with the bass rather than leaving it behind.
  • Bass Frequency — pick the corner between 40 Hz and 200 Hz. Lower for sub-bass and 808s; higher for warmth and body.
  • Live preview — play the boosted audio and move the sliders while it plays. The filters retune in place, so every change is audible immediately.
  • Automatic clipping protection — the file is measured and the output trimmed by exactly enough to keep boosted peaks under −1 dBFS, with a limiter behind it. Quiet recordings are never silently normalised.
  • WAV export — 16-bit PCM. What you download is exactly what you previewed.
  • Drag and drop, clear error states, keyboard-accessible controls.

Formats are whatever your browser can decode — in Chrome and Edge that covers MP3, WAV, FLAC, OGG, M4A and AAC. Firefox always handles MP3, WAV, FLAC and OGG; M4A/AAC there depend on system codecs. Files up to 100 MB.

Install

From a store

Coming soon — the listing links will land here once review completes. In the meantime, load it unpacked (below), or use the web version, which needs no install.

Prebuilt packages

The exact archives submitted to each store are committed at the repository root:

Store Package
Chrome Web Store bass-booster-soniclab-1.0.0.zip
Microsoft Edge bass-booster-soniclab-edge-1.0.1.zip
Firefox (AMO) bass-booster-soniclab-firefox-1.0.0.zip
Opera Add-ons bass-booster-soniclab-opera-1.0.0.zip

Each holds the same ten runtime files and differs only in the manifest — see Packaging. They are reproducible from source at any time; the build writes over the tracked file in place.

Unpacked (development)

git clone https://github.com/kaleemullah6698/bass-booster-extension.git

Chrome: chrome://extensions → enable Developer mode → Load unpacked → select the cloned folder (the one containing manifest.json).

Edge: edge://extensions → enable Developer mode → Load unpacked → same folder.

Firefox: about:debugging#/runtime/this-firefox → Load Temporary Add-on… → select the manifest.json file (Firefox wants the file, not the folder). It stays loaded until Firefox restarts. See FIREFOX.md.

Opera: opera://extensions → enable Developer mode → Load unpacked → same folder as Chrome. See OPERA.md.

After editing a file, hit the ↻ reload button on the extension's card and reopen the popup. Right-click inside the popup → Inspect for its console.

How the audio processing works

source → lowshelf(40–200 Hz, 0…+18 dB) → peaking(1 kHz) → highshelf(4 kHz)
       → gain(measured trim) → limiter → destination
  1. Decode — File.arrayBuffer() → AudioContext.decodeAudioData(). The browser owns format support; anything it refuses produces a clear error rather than silence.
  2. Measure headroom — a 10-second probe is stitched from 40 fade-edged windows spread across the track and rendered through the EQ alone in an OfflineAudioContext. Its peak says how far the boost will overshoot.
  3. Trim — this is where the boost is actually paid for. A +12 dB shelf on a master already peaking at −1 dBFS has nowhere to go, so the whole signal is pulled down by exactly enough to fit. The trim never exceeds 1×, so this stays a booster rather than becoming a normaliser.
  4. Preview — the same graph on a live AudioContext. Slider moves retune the running filters instead of rebuilding the graph, and the trim is ramped with setTargetAtTime rather than assigned, so it never clicks.
  5. Export — the whole buffer re-rendered offline through the same builder at the same trim, then encoded to WAV.

The limiter is deliberately set to catch almost nothing (−1 dB, 20:1). A compressor doing the heavy lifting instead would hand the boost straight back: on a commercially mastered track, a low threshold with no makeup gain turns a +12 dB shelf into about +2 dB of bass and 5–7 dB of ducked mids and highs.

Project layout

├── manifest.json          MV3, zero permissions, popup-only
├── popup.html/.css/.js    the UI and all behaviour
├── lib/
│   ├── bass-chain.js      filter graph, ranges, headroom maths
│   └── wav-encoder.js     16-bit PCM WAV writer
├── icons/                 icon.svg + 16/32/48/128 PNGs
├── tools/                 dev-only; never shipped or loaded
│   ├── validate.mjs       manifest / CSP / permissions / link checks
│   ├── smoke-test.mjs     unit tests for the audio maths
│   ├── popup-test.mjs     popup.js against stub DOM + Web Audio
│   ├── make-icons.mjs     re-raster icons from icon.svg
│   ├── package.mjs        build the Chrome Web Store zip
│   ├── package-edge.mjs   build the Microsoft Edge zip
│   ├── package-firefox.mjs  build the Firefox (AMO) zip
│   ├── package-opera.mjs  build the Opera Add-ons zip
│   └── lib/zip.mjs        the one zip writer behind all four packages
├── store-assets/          listing artwork + copy (not part of the package)
├── EDGE.md                Edge submission notes
├── FIREFOX.md             Firefox / AMO submission notes
├── OPERA.md               Opera Add-ons submission notes
└── PRIVACY.md             privacy policy

No build step, no package.json, no dependencies. The tools/ scripts are plain Node and only make-icons.mjs / the store-asset scripts need anything extra (sharp, for rasterising PNGs).

Development

node tools/validate.mjs     # manifest, CSP, permissions, links, file refs
node tools/smoke-test.mjs   # filter wiring, headroom maths, WAV bytes
node tools/popup-test.mjs   # popup.js end-to-end against stubs

validate.mjs fails if the manifest gains a permission, a remote script, an inline handler, a broken file reference, or a third outbound link. popup-test.mjs drives the real popup.js: it picks files, rejects the bad ones, plays, drags sliders and downloads, against stubs that record what the code did. What only a browser can prove — decoding, audible quality, the save dialog — is a manual checklist in EDGE.md and below.

Manual checks before a release: popup opens clean · MP3 loads by picker and by drop · a .txt and a corrupt file both error gracefully · boost is audible and clean at +18 dB · sliders are smooth during playback · WAV downloads and plays · both footer links open.

Packaging

node tools/package.mjs           # Chrome Web Store zip
node tools/package-edge.mjs      # Microsoft Edge zip (see EDGE.md)
node tools/package-firefox.mjs   # Firefox / AMO zip (see FIREFOX.md)
node tools/package-opera.mjs     # Opera Add-ons zip (see OPERA.md)

All four ship only the ten runtime files — no tools/, no docs, no store assets. Listing copy, search terms and artwork live in store-assets/LISTING.md.

Permissions

None. No permissions, no host_permissions, no content scripts, no background service worker, no externally_connectable, and the default MV3 CSP is left untouched. Installing it shows no permission warning, because a popup that reads a file you hand it needs nothing.

Privacy

No data collection of any kind: no analytics, no telemetry, no accounts, and no network request anywhere in the code — a rule tools/validate.mjs enforces on every shipped file. Your audio never leaves the popup and is released from memory when it closes. Full text: PRIVACY.md.

More SonicLab tools

Free, browser-based, no sign-up:

Contributing

Issues and pull requests are welcome. Please run all three tools/ scripts before opening a PR, and keep the extension dependency-free and permission-free — those two properties are the point.

License

MIT © SonicLab