Learn R Programming

soundgen (version 1.3.2)

scaleSPL: Scale SPL

Description

Internal soundgen function

Usage

scaleSPL(x, SPL_measured = 70, Pref = 2e-05)

Arguments

x

numeric vector ranging from -1 to +1

SPL_measured

sound pressure level at which the sound is presented, dB

Pref

reference pressure, Pa

Details

Converts a sound from SPL on any scale to a desired level of dB SPL. See Timoney et al. (2004) "Implementing loudness models in MATLAB"

Examples

Run this code
# NOT RUN {
sound = runif(100) * getSmoothContour(c(0, 1, 0), len = 100)
# plot(sound, type = 'l')
sound_scaled = soundgen:::scaleSPL(sound)
# plot(sound_scaled, type = 'l')
# }

Run the code above in your browser using DataLab