# Audio Calc Audio engineering maths for agents: sample rates, bit depth, bitrates, dB sums, SPL, LUFS, latency, tuning ratios and room modes. ## How to pay Machine-payable over x402. USDC on: Base (eip155:8453), Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), Polygon (eip155:137), Arbitrum One (eip155:42161). No accounts. No API keys. No signup. The paying wallet is the account. ## Machine-readable - OpenAPI: https://audio-calc.x402tookit.com/openapi.json - x402 manifest: https://audio-calc.x402tookit.com/.well-known/x402 - Catalog (free): https://audio-calc.x402tookit.com/catalog - Health (free): https://audio-calc.x402tookit.com/health - Uptime (free): https://audio-calc.x402tookit.com/uptime ## Endpoints (12) ### GET /bit-depth — $0.02 Dynamic range, levels and smallest step for a PCM bit depth, theoretical SNR, and the bit depth needed for a dB range. Params: bits?: integer, dynamicRangeDb?: number, fullScaleVolts?: number Example: https://audio-calc.x402tookit.com/bit-depth?bits=16 ### GET /bitrate-size — $0.02 Audio file size from bitrate and duration, or the bitrate or duration it implies; PCM size from rate, depth and channels. Params: sampleRate?: number, bitDepth?: integer, channels?: integer, bitrateKbps?: number, seconds?: number, sizeBytes?: number Example: https://audio-calc.x402tookit.com/bitrate-size?sampleRate=44100&bitDepth=16&channels=2&seconds=3600 ### GET /buffer-latency — $0.02 Audio buffer size to latency in ms (one way and round trip) at a sample rate, or the buffer needed for a latency target. Params: sampleRate: number, bufferSamples?: number, targetMs?: number, buffers?: number, converterMs?: number Example: https://audio-calc.x402tookit.com/buffer-latency?sampleRate=48000&bufferSamples=256 ### GET /db-sum — $0.02 Add, average or subtract sound levels in dB: total of several sources, N identical sources, or background-corrected level. Params: levels?: string, count?: integer, total?: number, background?: number Example: https://audio-calc.x402tookit.com/db-sum?levels=60%2C60%2C70 ### GET /dbfs — $0.02 Convert between linear amplitude and dBFS, and get the RMS level and crest factor of a sine, square, triangle or sawtooth. Params: amplitude?: number, dbfs?: number, shape?: string Example: https://audio-calc.x402tookit.com/dbfs?dbfs=-6&shape=sine ### GET /interval-ratio — $0.02 Convert a frequency ratio (3:2) to cents and semitones or back, name just and Pythagorean intervals and commas, apply to Hz. Params: ratio?: string, cents?: number, baseHz?: number Example: https://audio-calc.x402tookit.com/interval-ratio?ratio=3%3A2&baseHz=440 ### GET /lufs-math — $0.02 Loudness maths: gain to a LUFS target or platform, resulting true peak vs ceiling, or combining segment loudness. Params: lufs?: number, target?: string, truePeakDbtp?: number, ceilingDbtp?: number, segments?: string Example: https://audio-calc.x402tookit.com/lufs-math?lufs=-9.5&target=spotify&truePeakDbtp=-0.3&ceilingDbtp=-1 ### GET /room-modes — $0.02 Room mode frequencies (axial, tangential, oblique) for a rectangular room, plus Schroeder frequency from RT60. Params: length: number, width: number, height: number, temperatureC?: number, speedOfSound?: number, maxHz?: number, count?: integer, rt60?: number Example: https://audio-calc.x402tookit.com/room-modes?length=5&width=4&height=3&temperatureC=20&rt60=0.5 ### GET /sample-rate — $0.02 Nyquist frequency for a sample rate, plus the alias frequency and samples per cycle of a tone, and the guard band above 20 kHz. Params: sampleRate: number, frequency?: number Example: https://audio-calc.x402tookit.com/sample-rate?sampleRate=44100&frequency=30000 ### GET /sound-wavelength — $0.02 Speed of sound in air at a temperature, wavelength and period for a frequency or the reverse, with delay per metre. Params: frequencyHz?: number, wavelengthM?: number, delayMs?: number, distanceM?: number, temperatureC?: number Example: https://audio-calc.x402tookit.com/sound-wavelength?frequencyHz=1000&temperatureC=20 ### GET /spl-distance — $0.02 Sound level at another distance (inverse-square law; line sources fall 3 dB per doubling), or the distance for a level. Params: level: number, refDistance?: number, distance?: number, targetDb?: number, source?: string Example: https://audio-calc.x402tookit.com/spl-distance?level=90&refDistance=1&distance=8&source=point ### GET /tuning-temperament — $0.02 Frequencies, cents and ratios of the 12 notes in equal, 5-limit just, Pythagorean or quarter-comma meantone tuning. Params: temperament: string, root?: string, a4?: number Example: https://audio-calc.x402tookit.com/tuning-temperament?temperament=just&root=C4&a4=440 ## Terms Results are computed locally from standard audio, acoustics and loudness formulas, provided as is, with no warranty. Loudness targets are commonly published conventions that platforms change; verify them before delivery. Not for hearing-safety or legal noise compliance.