Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

TKEO

Teager-Kaiser energy tracking operator


Description

This function computes the Teager-Kaiser energy operator.

Usage

TKEO(wave, f, channel = 1, m = 1, M = 1, plot = TRUE,
xlab = "Time (s)", ylab = "Energy",
type = "l", bty = "l", ...)

Arguments

wave

an R object.

f

sampling frequency of wave (in Hz). Does not need to be specified if embedded in wave.

channel

channel of the R object, by default left channel (1).

m

a numeric vector of length 1 for the exponent parameter. See details.

M

a numeric vector of length 1 for the lag parameter. See details.

plot

logical, if TRUE returns a plot of the TK energy along time (by default TRUE).

xlab

Label of time x-axis.

ylab

Label of energy y-axis.

type

if plot is TRUE, type of plot that should be drawn. See plot for details (by default "l" for lines).

bty

the type of box to be drawn around the energy plot.

...

other plot graphical parameters.

Details

The discrete version of the Teager-Kaiser operator is computed according to:

y[n] = x[n]^{2/m} - (x[n-M]*x[n+M])^{1/m}

,
with m the exponent parameter and M the lag parameter which both are usually equal to 1 for a conventional operator.
The Teaser-Kaiser operator can be used to track amplitude modulations (AM) and/or frequency modulations (FM).
See examples.

Value

This function returns a two-column matrix, the first column is time and the second column includes the successive energy values.
m/2 NA values are added at the start and end of the vector.

Author(s)

Jerome Sueur

References

Kvedalen, E. (2003). Signal processing using the Teager Energy Operator and other nonlinear operators. University of Oslo, Department of Informatics, PhD Thesis, x + 100 p.

See Also

Examples

op <- par(mfrow=c(2,1))

## sinusoid AM 
s1 <- synth(f=8000, d=0.1, cf=200, am=c(100,10), output="Wave") 
oscillo(s1)
TKEO(s1)
## linear AM decrease
s2 <- synth(f=8000, d=0.1, cf=200, shape="decr", output="Wave") 
oscillo(s2)
TKEO(s2)
## sinusoid FM
s3 <- synth(f=8000, d=0.1, cf=200, fm=c(150,50,0,0,0), output="Wave") 
oscillo(s3)
TKEO(s3)
## linear FM increase
s4 <- synth(f=8000, d=0.1, cf=200, fm=c(0,0,600,0,0), output="Wave") 
oscillo(s4)
TKEO(s4)
## AM and FM
s5 <- synth(f=8000, d=0.1, cf=200, am=c(100,10), fm=c(150,50,0,0,0), output="Wave")
oscillo(s5)
TKEO(s5)
par(op)

seewave

Sound Analysis and Synthesis

v2.1.6
GPL (>= 2)
Authors
Jerome Sueur <sueur@mnhn.fr> [cre, au], Thierry Aubin [au], Caroline Simonis [au], Laurent Lellouch [main ctrb], Ethan C. Brown [ctrb], Marion Depraetere [ctrb], Camille Desjonqueres [ctrb], Francois Fabianek [ctrb], Amandine Gasc [ctrb], Eric Kasten [ctrb], Stefanie LaZerte [ctrb], Jonathan Lees [ctrb], Jean Marchal [ctrb], Andre Mikulec [ctrb], Sandrine Pavoine [ctrb], David Pinaud [ctrb], Alicia Stotz [ctrb], Luis J. Villanueva-Rivera [ctrb], Zev Ross [ctrb], Carl G. Witthoft [ctrb], Hristo Zhivomirov [ctrb].
Initial release
2020-06-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.