Santiago Barreda
Assistant Professor, Department of Linguistics, UC Davis

Main Research Vignettes CV phonTools Statistics Links


Ffilter [phonTools] 


This function performs formant filtering on a numeric vector representing a sound wave. The sound may be filtered using as many formants as desired by the user. The formants may also change linearly from the beginning to the end of the sound. This function is useful for creating synthetic vowel sounds or synthetic fricatives when combineed with noise, as in the example below.




Code used to generate examples:

library (phonTools) # Generate half a second of white noise sound = rnorm (11025, 0, 1) # pass this through formant filters # two static formants filtered1 = Ffilter (sound, ffs = c(4000,7000), bw = 200, verify = FALSE) # a single moving formant filtered2 = Ffilter (sound, ffs = list(3000,8000), bw = 200, verify = FALSE) # two moving formants filtered3 = Ffilter (sound, ffs = list(c(5000,4000),c(8000,1000)), bw = 200, verify = FALSE) # inspect the results par (mfrow = c(1,3), mar = c(4,4,1,1)) spectrogram (filtered1, maxfreq = 11025) spectrogram (filtered2, maxfreq = 11025) spectrogram (filtered3, maxfreq = 11025)