# show a movie of the sequence of spectra for the "octaves.wav" sound file. library(tuneR) # need to like with the sound library N = 512 w = readWave("sound/octaves.wav") #play(w,"play") # play it start = 11000 y = w@left for (i in 1:500) { x = y[(i*N) : ((i+1)*N-1)] X = fft(x)/N plot(Mod(X[1:(N/2)]),type='l',ylim=c(0,1000)) # plot(Mod(X[1:35])) c = scan(what="") # wait for keyboard input } play(w,"play") # play it