CIÊNCIA ACÚSTICA & WEB AUDIO API

Como Funciona o Teste de Decibéis dB

Explore a física, o processamento de sinal e as fórmulas matemáticas que convertem ondas sonoras em leituras de decibéis em tempo real.

Motor de ÁudioWeb Audio APIAudioContext & AnalyserNode
Janela FFT2.048 AmostrasJanela deslizante de ~46,4 ms
Intervalo de Atualização100 ms (10 Hz)Telemetria suave em tempo real
Garantia de Privacidade100% no ClienteNenhum áudio salvo ou transmitido

O Fluxo de Processamento em 5 Etapas

Desde o impacto da onda sonora no microfone até o valor de decibéis exibido em tempo real.

ARQUITETURA INTERATIVA
Physical TransducerEtapa 1 de 5

Acoustic Capture

Sound consists of longitudinal pressure variations traveling through air. When these waves strike your device’s electret or MEMS microphone diaphragm, the physical movement is converted into a micro-voltage analog electrical signal proportional to acoustic sound pressure.

Transducer TypeMEMS / Electret Condenser
Frequency Response20 Hz – 20,000 Hz
Input SignalContinuous Analog Voltage
Lógica de ImplementaçãoJavaScript / Web Audio
// Acoustic wave -> Physical diaphragm deflection
// Generates continuous analog voltage: V(t) ∝ P_sound(t)

The Mathematics: How RMS Waveforms Become Decibels

Why human hearing requires a logarithmic scale, and the exact equations driving the meter.

Why Are Sound Levels Logarithmic?

Human ears do not perceive loudness linearly. A sound with ten times the physical acoustic energy does not feel ten times as loud — to human perception, it feels roughly twice as loud. Furthermore, the dynamic range of human hearing is astronomical: from the quietest audible whisper at 20 micropascals (0.00002 Pa) to the threshold of physical ear pain at 200 pascals (200 Pa).

That is a linear pressure ratio of 10,000,000 to 1! Alexander Graham Bell formulated the logarithmic decibel (dB) scale to compress this vast range into a manageable 0 to 140 dB spectrum.

Core Equations Breakdown

Equation 1: Root Mean Square (RMS) Acoustic Energy
RMS = √[ (1 / N) × Σ(xi2) ]

Because sound pressure oscillates symmetrically between positive compression and negative rarefaction, averaging raw amplitudes directly yields 0. Squaring each sample makes all values positive, computing true physical power over N = 2,048 samples.

Equation 2: Digital Decibels Full-Scale (dBFS)
dBFS = 20 × log10( max(RMS, 0.000001) )

In digital audio, 0 dBFS represents digital clipping (maximum possible float value ±1.0). Normal room sounds yield negative numbers between approximately -80 dBFS (very quiet) and -20 dBFS (loud conversation).

Equation 3: Sound Pressure Level (dB SPL) Estimation
Estimated dB SPL = dBFS + Calibration Offset (default: +100 dB)

To bridge digital dBFS to estimated physical Sound Pressure Level (dB SPL), an offset factor (typically +100 dB) is applied, shifting the quietest room to ~30–35 dB and loud sounds into their true 70–90 dB range.

Simulador Interativo de Decibéis e RMS

Altere amplitudes RMS e valores de calibração para visualizar o cálculo de decibéis em tempo real.

LABORATÓRIO AO VIVO
Predefinições Rápidas:
0.01000
0,00005 (Quase Silêncio)0.501,0 (Escala Máxima)
+100 dB
+70 dB (Ganho Baixo)+100 dB (Padrão)+120 dB (Ganho Alto)
Avaliação Matemática em Tempo Real:
1raw dBFS = 20 × log₁₀(0.01000) = -40.0 dBFS
2dB SPL = -40.0 + 100 = 60.0 dB
NÍVEL DE PRESSÃO SONORA ESTIMADO
60.0dB
Moderate Noise
0 dB40 dB80 dB120 dB
Multiplicador de Energia Sonora Relativa:1,000,000×em relação ao limiar de audição humana (0 dB)
Nível Seguro: Dentro dos limites habituais de audição confortável.

Understanding Acoustic Weighting: dBA vs. dBC vs. dB SPL

Why different decibel units exist, and how human ears filter frequency spectrums.

Not all frequencies are perceived equally by the human auditory system. A 50 Hz low-bass rumble at 70 dB sounds much quieter than a 3,000 Hz whistle at the exact same physical pressure. Acousticians created standardized frequency weighting filters (defined in IEC 61672) to match measurements to specific use cases:

Measurement ScaleFrequency ResponsePrimary Use CaseStandard Regulatory Use
dBA (A-Weighting)Human Ear ResponseHeavily rolls off frequencies below 500 Hz and above 10,000 Hz. Mimics human ear sensitivity around 40-phon equal-loudness curves.Workplace noise compliance, environmental city noise, classroom acoustics, office HVAC.OSHA, NIOSH, WHO, ISO 1999
dBC (C-Weighting)Flat Peak ResponseNearly linear and flat across 31.5 Hz to 8,000 Hz. Retains heavy bass and explosive low-end frequencies.Live concerts, nightclub bass, industrial engine testing, fireworks, firearm peak analysis.Industrial Peak Limits (OSHA 140 dBC)
dB SPL (Sound Pressure Level)Absolute Physical PressureUnweighted physical pressure referenced directly to 20 micropascals (20 μPa) across all frequencies equally.Acoustic engineering, speaker laboratory testing, microphone sensitivity certification.Acoustic Physics & Research
dBFS (Decibels Full Scale)Digital Audio ScalePure digital representation in computer memory. 0 dBFS is digital maximum; quiet audio is represented by negative numbers down to -144 dBFS.Web Audio API, digital audio workstations (DAWs), recording studio meters, DSP buffers.Digital Audio Engineering
How SoundMeter handles weighting:

SoundMeter processes raw uncompressed time-domain audio across the microphone’s full hardware frequency response. By disabling browser noise suppression and applying a calibration offset, it offers a balanced unweighted dB SPL estimate tailored for everyday environmental noise monitoring.

Microphone Hardware Realities & Calibration Protocol

Why smartphone and laptop microphones differ from professional sound meters, and how to calibrate.

MEMS vs. Measurement Microphones

Consumer devices use tiny micro-electro-mechanical systems (MEMS) capsules designed primarily for clear speech transmission in phone calls, not lab-grade acoustic measurement. They possess high gain sensitivity for human vocal frequencies (300 Hz – 3.4 kHz) but attenuate very low sub-bass.

Hardware Automatic Gain Control (AGC)

Mobile operating systems often implement hardware-level AGC to boost quiet whispers and tame loud shouts. SoundMeter requests autoGainControl: false, but some hardware chipsets enforce baseline gain curves.

Acoustic Port Ingress & Casing

Microphone holes on smartphones and laptops are often millimeters wide and can be obstructed by dust, protective cases, or reflections. Angling your device directly toward the sound source produces the most consistent readings.

How to Calibrate SoundMeter in 3 Steps

Step 1Find a Reference Baseline

Situate your device in a known quiet room (e.g. bedroom at night measuring 30–35 dB), or run a secondary calibrated meter app alongside it.

Step 2Open Meter Calibration

Click the Calibrate toggle beneath the meter dial on the home page. You will see the Calibration Offset slider (default: +100 dB).

Step 3Adjust Offset Slider

Slide the offset up or down until the resting ambient sound level matches your expected reference (e.g., 32 dB).

Decibel Scale Benchmarks: Real-World Sound Levels

Compare everyday environmental sounds from the threshold of hearing to physical acoustic pain.

Decibel Range (dB)Perceived LoudnessReal-World Environmental ExamplesSafety Assessment
0 – 20 dBBarely AudibleNormal breathing (10 dB), ticking watch at 1 meter, rustling leaves in light breezeCompletely Safe
20 – 40 dBQuietQuiet public library, peaceful rural bedroom at night, soft whisper at 5 feetCompletely Safe
40 – 60 dBModerate / NormalQuiet suburban street, moderate office chatter, residential refrigerator hummingSafe & Restful
60 – 80 dBLoudVacuum cleaner, busy urban traffic, restaurant dining room, alarm clock ringingCaution for 8h+
80 – 100 dBVery LoudFood blender, gasoline lawn mower, motorcycle passing, diesel truck at 25 ftHearing Risk (Max 15m)
100 – 120 dBExtremely Loud / HarmfulRock concert front row, chainsaw, emergency siren at 100 ft, car horn blastDangerous (<1 min)
120 – 140+ dBPainful & TraumaticJet engine takeoff at 100 ft, 12-gauge shotgun blast, fireworks at ground levelImmediate Acoustic Trauma

Occupational Hearing Safety: OSHA vs. NIOSH Permissible Exposure

The 3 dB Exchange Rule and recommended daily noise dosage to prevent permanent hearing loss.

Noise-Induced Hearing Loss (NIHL) occurs when excessive sound pressure damages microscopic hair cells (stereocilia) in the inner ear (cochlea). Because hair cells cannot regenerate, hearing loss is permanent. Health organizations establish strict Permissible Exposure Limits (PEL):

Sound Level (dBA)NIOSH Safe Time (Recommended)OSHA Permissible Limit
85 dB8 hours daily16 hours daily
88 dB4 hours daily10.5 hours daily
91 dB2 hours daily7 hours daily
94 dB1 hour daily4.6 hours daily
97 dB30 minutes daily3 hours daily
100 dB15 minutes daily2 hours daily
106 dB< 4 minutes daily30 minutes daily
112 dB< 56 seconds daily7.5 minutes daily

The 3 dB Exchange Rule Explained

NIOSH and the World Health Organization use a 3 dB exchange rate. Because the decibel scale is logarithmic, an increase of just 3 dB represents a literal doubling of acoustic sound energy!

+3 dB Increase= 2× Sound EnergyCuts safe exposure time in half

If you are working in an environment above 85 dB, standard foam earplugs or active noise-canceling earmuffs with a high Noise Reduction Rating (NRR 25–33) are strongly recommended.

100% Client-Side Privacy: Why Your Audio Is Never Stored

How the Web Audio API sandbox guarantees complete privacy and security.

No Remote Server Streaming

SoundMeter does not transmit audio chunks, frequency bins, or microphone streams over WebSockets or HTTP requests. All calculations are executed synchronously on your device’s local CPU.

Ephemeral RAM Buffering

Audio samples exist in memory only for the duration of the current 2,048-sample Float32Array window (~46 milliseconds). Once RMS is computed, the raw buffer is discarded.

Instant Hardware Release

Clicking Stop stops all media tracks and closes AudioContext immediately, powering down the hardware microphone indicator.

Frequently Asked Questions: Sound Metering & Technology

Common questions regarding microphone accuracy, audio mathematics, and browser decibel testing.

The meter utilizes the W3C Web Audio API. When you grant microphone access via navigator.mediaDevices.getUserMedia, the browser creates an AudioContext with an AnalyserNode. The AnalyserNode samples audio waveforms into a 2,048-element Float32Array at 44.1 kHz or 48 kHz. The algorithm computes the Root Mean Square (RMS) energy and converts it to decibels using logarithmic scaling (20 × log10(RMS) + Calibration Offset).

Pronto para Medir seu Ambiente Sonoro?

Veja a física em ação. Inicie nosso medidor gratuito e privado com gráficos de telemetria em tempo real.