Real-time audio effects for any browser tab: 22 effects with studio-style knobs, an audio-reactive cymatic visualizer, and MIDI controller support. Built with the Web Audio API and Chrome's Tab Capture API.
- Install: Chrome Web Store
- Demo video: YouTube
- Feature ideas: docs/future-features.md
- Node.js 18+ and npm
- Google Chrome browser
- Basic understanding of Chrome extensions and Web Audio API
-
Clone the repository
git clone https://github.com/bruceblay/tab-bitcrusher.git cd tab-bitcrusher -
Install dependencies
npm install
-
Build the extension
# For development with hot reload npm run dev # For production build npm run build
-
Load in Chrome
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked"
- Select the
build/chrome-mv3-dev/folder (for development) orbuild/chrome-mv3-prod/(for production)
- Open Chrome and navigate to
- Navigate to a tab with audio content (YouTube, Spotify, etc.)
- Click the Tab Bitcrusher extension icon in your browser toolbar
- Click "Capture Tab Audio" - this will "steal" the audio from the tab
- Audio will now play through the extension in passthrough mode (no effects yet)
- Click "Stop Capture" to return audio to the original tab
- User Gesture Required: Tab capture requires clicking the extension button (Chrome security requirement)
- Audio "Theft": When capturing, the original tab goes silent and audio routes through the extension
- Passthrough Mode: Currently no effects are applied - audio passes through unchanged
- Single Tab: Currently only supports one tab at a time
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────────┐
│ Browser Tab │───▶│ Service Worker │───▶│ Offscreen Document │
│ │ │ │ │ │
│ Audio Source │ │ • Tab Capture │ │ • Web Audio Graph │
│ (YouTube, etc.) │ │ • UI Messages │ │ • Effect Processing │
└─────────────────┘ │ • Lifecycle Mgmt │ │ • Audio Playback │
└──────────────────┘ └─────────────────────┘
│ │
┌──────────────────┐ ┌─────────────────────┐
│ Popup UI │ │ Your Speakers │
│ │ │ │
│ • Start/Stop │ │ Processed Audio ◄───┤
│ • Effect Controls│ │ │
│ • Status Display │ └─────────────────────┘
└──────────────────┘
background.ts: Service worker handling tab capture and offscreen document lifecyclepopup.tsx: React-based UI for controlling audio capture and effectsoffscreen.ts: Web Audio processing in persistent contextoffscreen.html: HTML container for the offscreen audio processor
# Start development server with hot reload
npm run dev
# Build for production
npm run build
# Package extension for distribution
npm run package
# Format code
npm run formattabCapture: Capture audio from browser tabsoffscreen: Maintain stable AudioContext in MV3
- AudioContext: Created in offscreen document for stability
- MediaStreamAudioSourceNode: Processes captured tab audio
- MediaStreamAudioDestinationNode: Outputs processed audio
- Audio Element: Plays the processed stream back to user
- Chrome 88+: Required for Offscreen Documents API
- Chrome 71+: Required for Tab Capture API improvements
- Manifest V3: Modern extension architecture
- Only passthrough audio (no effects yet)
- Single tab support only
- No effect parameter controls
- Basic error handling
- MediaStream transfer between contexts needs refinement
- Tab capture requires user gesture (security requirement)
- Some sites with DRM protection may block capture
- Audio capture "steals" audio from the original tab
- Background service workers have limited lifetime in MV3
See /docs/implementation.md for detailed implementation phases and testing criteria.
- Audio Effects: Delay, bitcrusher, and phaser effects
- Multi-Tab Processing: Apply effects to multiple tabs simultaneously
- Real-Time Controls: Live parameter adjustment without audio interruption
- Preset System: Save and load effect configurations
- Performance Optimization: AudioWorklet implementation for low-latency processing
This project is in active development. Phase 1 (foundation) is complete.
- Phase 2: Implementing proper Web Audio routing and playback
- MediaStream transfer optimization between service worker and offscreen contexts
- Audio latency reduction and performance improvements
- Follow existing TypeScript and React patterns
- Maintain Chrome MV3 compliance
- Test with various audio sources (music, video, games)
- Ensure graceful handling of edge cases (tab navigation, DRM content)
ISC License - See LICENSE file for details.
- Chrome Extension Manifest V3
- Chrome Tab Capture API
- Chrome Offscreen API
- Web Audio API Documentation
- Plasmo Extension Framework
Note: This extension is for educational and personal use. Respect website terms of service and copyright when processing audio content.