Qu

spl

Builtin index · Signal processing

spl(s)

Input: s · Output: no output

What it is

Added in v0.2.4. Sound pressure level of a calibrated Signal: 20*log10(rms/reference) using the calibration's own reference (20 µPa for pressure), AC-coupled. On an uncalibrated signal it refuses — and the error carries the dBFS reading the signal *can* support plus the calibrate(...) call that would fix it. That refusal is the point: an uncalibrated signal answers in dBFS and says so, and will not pretend to know pascals.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
spl(s)
s Signalnot documented yet
not documented yetAdded in v0.2.4. On an uncalibrated signal it refuses — and the error carries the dBFS reading the signal *can* support plus the calibrate(...) call that would fix it. That refusal is the point: an uncalibrated signal answers in dBFS and says so, and will not pretend to know pascals.

Examples

No documentation example calls this form yet. The Signal processing chapter is where one belongs.

How it works

spl(s) -- the sound pressure level of a CALIBRATED signal, 20*log10(rms / reference) with the calibration's own reference (20 uPa for pressure). §10's headline behaviour is the refusal, not the number: "an uncalibrated signal answers in dBFS and says so. It will not pretend to know Pascals." So the error path here computes the dBFS reading and puts it in the message -- the caller gets the answer their signal can actually support, plus what to do to get the one they asked for.

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.