Learn R Programming

seewave (version 1.4.3)

oscilloST: Show a stereo time wave as oscillograms

Description

This graphical function displays a stereo (2 channels) time wave as an oscillogram in a two-frame plot. The envelope of the wave can also be shown.

Usage

oscilloST(wave1, wave2 = FALSE, f, from = FALSE, to = FALSE, env = FALSE,
smooth = NULL, ksmooth = NULL, identify = FALSE, plot = TRUE, colwave1 = "black",
colwave2 = "blue", colbg = "white", coltitle = "black",
collab = "black", cexlab = 1, fontlab = 1, colaxis = "black",
coly01 = "grey47", coly02 = "black", title = FALSE,
bty = "l")

Arguments

wave1
data or a Sample object generated loading a wav file with loadSample (package Sound) describing a first time wave. This can be a
wave2
data or a Sample object generated loading a wav file with loadSample (package Sound) describing a second time wave.
f
sampling frequency of wave1 and wave1 (in Hz). Does not need to be specified if wave1 and/or wave2 are/is (a) Sample object(s).
from
start of the oscillogram (in s).
to
end of the oscillogram (in s).
env
logical, if TRUE plots the envelope of the time wave instead (by default FALSE).
smooth
if env is TRUE then smoothes the envelope by floating average.
ksmooth
if env is TRUE then smoothes the envelope by applying a kernel smoothing.
identify
returns the time coordinate of points chosen with a cursor on the bottom oscillogram.
plot
logical, if TRUE returns an oscillographic or envelope plot of wave(by default TRUE).
colwave1
colour of the oscillogram or of the envelope of wave1.
colwave2
colour of the oscillogram or of the envelope of wave2.
colbg
background colour.
coltitle
if title is TRUE, colour of the title.
collab
colour of axes title.
cexlab
character size for axes title.
fontlab
font for axes title.
colaxis
colour of the axes
coly01
colour of the y=0 line of wave1.
coly02
colour of the y=0 line of wave1.
title
logical, if TRUE plots the title with information on time and f (by default FALSE).
bty
the type of box to be drawn around the oscillogram.

Value

  • Data are returned as two-column matrix if plot is FALSE. identify returns a numeric object with the time coordinate of points successively chosen on the bottom oscillogram.

See Also

oscillo

Examples

Run this code
a<-synth(f=8000,d=1,cf=2000,am=c(50,10),plot=FALSE)
b<-synth(f=8000,d=1,cf=1000,fm=c(0,0,2000),plot=FALSE)
oscilloST(a,b,f=8000)

Run the code above in your browser using DataLab