HEARD is a professional audio analysis tool for musicians, engineers, and producers. Real-time frequency visualization, spectrum analysis, and pitch tracking in your browser.
Frequency vs time waterfall (20Hz-20kHz, logarithmic). Touch/click to freeze and measure. Enable PITCH button for orange tracking overlay.
31-band 1/3-octave analysis. Use A-weighting for noise, C-weighting for peaks, Flat for unweighted. Peak hold with adjustable decay.
Chromatic tuner (60Hz-2000Hz) using YIN algorithm. Shows note, octave, cents (±1 cent accuracy). Green when in tune.
Split-screen RTA + Spectrogram for mixing/mastering workflows.
| FFT | Resolution | Best For |
|---|---|---|
| 1024 | ~47 Hz / 21 ms | Live performance |
| 2048 | ~23 Hz / 43 ms | Balanced (default) |
| 4096 | ~12 Hz / 85 ms | Detailed analysis |
| 8192 | ~6 Hz / 170 ms | High precision |
| 16384 | ~3 Hz / 341 ms | Maximum detail |
Spectrogram: GRID • LEGEND • TELEM • COORD • PITCH
RTA: A/C/FLAT weighting • PEAK hold • FREEZE
Window Functions: HANN (default) • HAMMING • BLACKMAN • RECT
| Key | Action |
|---|---|
| 1-4 | Switch screens |
| Space | Freeze/Unfreeze |
| ? | Open this guide |
| Esc | Close modal |
No audio: Check mic permissions, ensure mic connected, refresh page
Poor performance: Lower FFT to 2048/1024, close other tabs, use Chrome
Tuner not detecting: Play louder, single notes only, check Tuner mode active
Pitch tracking invisible: Click PITCH button, sing/play sustained note
Professional dark interface, reduced eye strain, classic studio aesthetic. Orange accent (#FF9500).
Clean bright interface, better for well-lit environments, high visibility. Same orange accent.
Switch: ⋯ SETTINGS → Choose theme. Saved automatically via localStorage.
VIRIDIS ⭐ - Perceptually uniform, colorblind-friendly. Best for publication/analysis.
PLASMA - High contrast purple→pink→orange→yellow. Excellent detail visibility.
INFERNO - Black→purple→red→orange→yellow. Maximum dynamic range.
MAGMA - Black→purple→pink→orange→white. Volcanic aesthetic.
THERMAL (Default) - Classic heat map. Familiar, easy to read.
TURBO - Vibrant rainbow. Visible from distance, eye-catching.
SPECTRUM - Full rainbow. Maximum color range.
FIRE - Black→red→orange→yellow→white. Intense flame.
OCEAN - Dark blue→cyan→light blue. Cool, calming.
CLASSIC - Blue→green→yellow→red. Traditional spectrum analyzer.
MONO - Black→orange→white. Matches UI accent.
GRAYSCALE - Pure black→white. Print-friendly, no color distraction.
| Use Case | Best Scheme |
|---|---|
| Mixing & Mastering | THERMAL or VIRIDIS |
| Live Performance | TURBO or SPECTRUM |
| Room Acoustics | VIRIDIS or GRAYSCALE |
| Teaching/Presentation | PLASMA or INFERNO |
| Recording Sessions | OCEAN or CLASSIC |
| Publication/Research | VIRIDIS (industry standard) |
| Print Documents | GRAYSCALE |
All settings auto-save to localStorage:
Reset: Browser DevTools (F12) → Console → localStorage.clear() → Refresh
Colorblind-friendly: VIRIDIS, GRAYSCALE, INFERNO
Print-safe: GRAYSCALE, VIRIDIS
High contrast: PLASMA, INFERNO, FIRE
Eye strain reduction: Dark mode + OCEAN scheme
Upload HEARD_FINAL.html to Dropbox/Google Drive, share link. Colleagues download and open in browser.
Pros: Zero setup, works immediately
Cons: Manual downloads, no auto-updates
Recommended for most users.
Pros: Free forever, automatic HTTPS, professional URL, easy updates
Cons: Requires GitHub account
Go to app.netlify.com/drop, drag HEARD_FINAL.html, get instant URL.
Pros: Instant deployment, custom domain support
Cons: Random URL unless custom domain
Terminal:
python3 -m http.server 8080
Share: http://YOUR-COMPUTER-IP:8080/HEARD_FINAL.html
Pros: No internet needed, zero latency, instant updates
Cons: Computer must stay on, local network only
Browser requests permission on first use. HTTPS sites remember permission, HTTP sites ask each session.
✓ GitHub Pages - Automatic HTTPS
✓ Netlify - Automatic HTTPS
⚠ Local server - HTTP only (permissions reset)
Change title: Line 11: <title>HEARD</title>
Change colors: Line 80: --accent-primary: #FF9500;
Add logo: Insert <img> in intro screen
HEARD is a single-file HTML application using Web Audio API for real-time audio analysis. All processing happens client-side in the browser.
currentScreen variable controls active view:
Logarithmic scale from 20Hz (bottom) to 20kHz (top):
logPos = (h - y) / hfrequency = 20 * Math.pow(1000, logPos)
Inverse of spectrogram mapping (critical for alignment):
logPos = Math.log10(freq / 20) / 3y = h - (logPos * h)
Verification: Built-in verification calculates frequency from Y to ensure accuracy. Check console for "✓ Pitch" logs.
Industry-standard autocorrelation-based pitch detector (De Cheveigné & Kawahara, 2002).
Palette-based color interpolation for spectrogram rendering.
Each scheme = array of RGB triplets [R, G, B]
thermal: [[20,0,40], [40,0,80], [0,0,120], ...]
getColorForIntensity(intensity) function:
Add to colorSchemes object (line ~2550):
myscheme: [[0,0,0], [128,0,128], [255,255,0]]
Then add button in settings HTML with data-color-scheme="myscheme"
Spectrograms use off-screen buffer for smooth horizontal scrolling:
Device Pixel Ratio handling for Retina displays:
canvas.width = offsetWidth * dprcanvas.height = offsetHeight * dprctx.scale(dpr, dpr)
Display coordinates: Use offsetWidth/offsetHeight
Canvas coordinates: Scaled by DPR automatically
Edit detectPitchForOverlay() function (line ~4900):
const minFreq = 60; // Change to your minconst maxFreq = 2000; // Change to your max
Pitch overlay styling in drawPitchOverlay() (line ~5060):
ctx.strokeStyle = 'rgba(255, 149, 0, alpha)'; // Colorctx.lineWidth = 2; // Width in pixelsctx.shadowBlur = 3; // Glow amount
Pitch history buffer (line ~2640):
pitchHistory = []; // Stores 300 frames
Adjust maxHistoryFrames = 300 or modify fade calculation:
alpha = baseAlpha * Math.pow(0.98, age); // Faster fade = 0.95
<canvas id="myOverlay">myOverlayG = myOverlayCanvas.getContext('2d')drawMyOverlay() functionPitch tracking logs verification:
✓ Pitch: 440.0Hz → logPos: 0.4922 → Y: 493.7px → Verify: 440.0Hz
navigator.mediaDevices.getUserMedia promiseUseful console commands:
localStorage.getItem('heardTheme') // Check saved themefftSize // Current FFT sizecurrentScreen // Active screen (0-3)pitchHistory.length // Pitch tracking buffer
| Function | Purpose | Line |
|---|---|---|
| init() | Initialize Web Audio API | ~3200 |
| drawSpec() | Render spectrogram | ~3300 |
| drawRTA() | Render RTA bars | ~3700 |
| drawTuner() | Render chromatic tuner | ~4000 |
| detectPitchForOverlay() | YIN pitch detection | ~4900 |
| updatePitchOverlay() | Update pitch history | ~4950 |
| drawPitchOverlay() | Render pitch line | ~5060 |
| getColorForIntensity() | Color interpolation | ~2550 |
Safari: Requires user gesture before AudioContext creation (handled)
Firefox: May need about:config media.navigator.permission.disabled = false for easier testing
Mobile: Reduced features on small screens, orientation lock on iPhone
This is a single-file application - all code is in HEARD_FINAL_POLISHED.html
HEARD - Professional Audio Analysis Tool • Version 2.0
Press ESC or click × to close