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

pulsew

Generate rectangle pulse


Description

This function generates a rectangle pulse.

Usage

pulsew(dbefore, dpulse, dafter, f, plot = FALSE, output = "matrix", ...)

Arguments

dbefore

duration of the silent period before the pulse

dpulse

duration of the pulse to generate

dafter

duration of silent period after the pulse

f

sampling frequency of the signal to be generated (in Hz)

plot

logical, if TRUE returns an oscillographic plot of the pulse generated (by default FALSE).

output

character string, the class of the object to return, either "matrix", "Wave", "Sample", "audioSample" or "ts".

...

other plot parameters.

Value

If plot is FALSE, a new wave is returned. The class of the returned object is set with the argument output.

Author(s)

Jerome Sueur sueur@mnhn.fr

See Also

Examples

pulsew(dbefore=0.5,dpulse=0.1,dafter=0.3,f=8000,plot=TRUE)

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.