data (sound)
## take only the first 10000 samples from a 'sound' object
tmp = sound$sound[1:10000]
## and make a new 'sound' object
tmp = makesound (tmp, fs = 22050)
tmp
## get ready to make two plots with thin margins
#multiplot (2); par (mar = c(4,4,1,1));
#spectrogram (sound, pause = FALSE) ## and show a spectrogram of the original
#spectrogram (tmp, pause = FALSE) ## and the new, truncated version
Run the code above in your browser using DataLab