powered by
Internal soundgen function
scaleSPL(x, SPL_measured = 70, Pref = 2e-05)
numeric vector ranging from -1 to +1
sound pressure level at which the sound is presented, dB
reference pressure, Pa
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"
# 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