Plot the waveform of a Sample object or a wav file.
Usage
# S3 method for Sample
plot(x,xlab="sample #",ylab=NULL,...)
Arguments
x
a Sample object, or a string giving the name of a wav file. If x is a string, the explicit form plot.Sample must be used.
xlab
the character string giving the label for the x-axis.
ylab
For mono Sample objects as usual. For stereo Sample objects, ylab can be a vector of two strings to distinguish the y-labels for the left and the right channel. If ylab=NULL, the presets are used, that is "waveform" for mono samples and c("left","right") for stereo samples.
if (FALSE) s <- Sine(440,1) + .4*Sine(1000,1)
plot(s[1:1000])
play(s)
s <- normalize(s)
plot(s[1:1000]) # now the range of the waveform is in [-1,1]play(s) # no cracks!