Plot the waveform of a Sample object or a wav file.
Usage
## S3 method for class 'Sample':
plot(x,xlab="sample #",ylab=NULL,\dots)
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"
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!