Visualizing your favourite song?

September 23, 2018

(This article was first published on Stencilled, and kindly contributed to R-bloggers)

Recently I was searching for some gifts when I stumbled across Sound Viz and Cumberland Coast .
These were your favorite songs which were visualized and printed. So that’s when I started looking into on how could you visualize them. So I wanted to try the same and that’s when I came across the r packages tuneR and seewave. Now I knew that I wanted to visualize the song but then I also wanted to see how different are the visualizations for the same song in an original version and the acoustic version. So I did download both the versions of the song Take On Me by A-ha. Since the wave format is too big to-be processed I did clip the songs to 1-minute duration. Below are the visualizations for the different versions of the same song.

Following is the code which I used to generate the waveforms above:


setWavPlayer('mplayer') # Set the command-line WAV player
fin <- readWave('yoyoma_clip.wav')

data = (fin)

snd = [email protected]

# plot waveform
orig_left <- plot(snd, type = 'l', xlab = 'Samples', ylab = 'Amplitude',col = c( "blue","green", "orange"),frame.plot=FALSE)

And finally finishing this post with one of my favorite song.

To leave a comment for the author, please follow the link and comment on their blog: Stencilled. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)