## Generate half a second of white noise
sound = rnorm (11025, 0, 1)
## pass this through one formant filter
sound = rnorm (11025, 0, 1)
filtered = Ffilter (sound, ffs = 5000, bw = 500, verify = TRUE)
## and see that the peaks, and -3 dB points fall where expected.
spectralslice (filtered, pwr = FALSE)
spectralslice (filtered, ylim = c(-10, 0), xlim = c(4000,6000))
abline (h = c(0, -3), col = 2, lwd = 2)
abline (v = c(4500, 5000, 5500), col = 2, lwd = 2)
Run the code above in your browser using DataLab