preemphasis: Add Preemphasis

Description Usage Arguments Value Author(s) References Examples

View source: R/preemphasis.R

Description

Single-zero preemphasis filter.

Usage

1
2
preemphasis (input, cutoff = 50, fs = 22050, verify = FALSE, 
coeff = 0)

Arguments

input

Either a numeric vector representing a sequence of samples taken from a sound wave or a sound object created with the loadsound() or makesound() functions.

cutoff

The spectral slope is increased by 6 dB. per octave above this frequency.

fs

The sampling frequency of the sound. If a 'sound' object is passed, this does not need to be specified.

verify

If TRUE, before and after spectra are plotted to allow the user to visually verify the process.

coeff

Optionally, the single coefficient used by the filter may be specified.

Value

The modified sound is returned. If a 'sound' object another 'sound' object is returned.

Author(s)

Santiago Barreda <[email protected]>

References

http://www.fon.hum.uva.nl/praat/manual/Sound__Filter__pre-emphasis____.html

Examples

1
2
3
4
signal = sinusoid (c(100, 200, 400, 800, 1600), fs = 4000, 
dur = 100, sum = TRUE)[,7]

preemphasis (signal, verify = TRUE, fs = 4000, cutoff = 50)

phonTools documentation built on May 29, 2017, 9 a.m.