Macklemore and Fourier

The Heist by Macklemore and Ryan Lewis is a masterpiece. It is clearly the best album of 2012, and I suspect it will go down alongside classics like IllmaticThe ChronicThe Marshall Mathers LP, and The College Dropout.

The lyric, symphonic, and emotional range of The Heist is impressive. You’ve probably heard the playful number one song “Thrift Shop”, but the heavier songs like “Same Love” (about gay marriage and civil rights) and “Starting Over” (about getting off the mat following relapse) show the Seattle duo at their most virtuosic.

In the video below, they are joined by Ray Dalton for a live radio performance of “Can’t Hold Us” on KEXP. Stay tuned until the end, when Dalton opens up his full register. I suggest you sit down before hitting play.

This song provides a nice opportunity to demonstrate how easy signal processing is in Mathematica. Below is a plot of the song’s power spectrum, which shows the relative contribution of different frequencies to the overall sound. It is obtained using a discrete Fourier transform.

powerspec

You can make a homemade frequency filter in just a few lines of code. The module below simply uses “part” and “pad” operations in Mathematica to extract parts of the signal in the frequency domain, and then shifts back to the time domain using an inverse discrete Fourier transform.

You can play with the sliders, setting upper and lower bounds for the windows of the frequency that you want to hear. This is just a 31 second clip of “Can’t Hold Us”, about 15 seconds into the song. With the default settings, with frequencies between 63 and 78.75 Hz, you can really here when the bass kicks in about 10 seconds into the clip (this might not be audible if you are playing on a laptop with lousy speakers… try a good pair of headphones). Setting the frequency window at 26,000 to 36,000 Hz, Dalton’s entrance is highlighted a few seconds into the clip. It takes several seconds to load. And, yes, you need the free cdf player.
[WolframCDF source=”http://datavoreconsulting.com/blog/wp-content/uploads/2013/01/music2.cdf” CDFwidth=”652″ CDFheight=”253″ altimage=”http://datavoreconsulting.com/blog/wp-content/uploads/2013/01/altpic.jpg”]

Cheers to good music and easy Fourier transforms in Mathematica! Oh, and go and buy The Heist if you haven’t already done so.

The following two tabs change content below.

Ben Nolting

Ph.D. Candidate at University of Nebraska

One thought on “Macklemore and Fourier

  1. Pingback: Custom interfaces in Mathematica using Dynamic Module | Datavore Consulting, LLC

Leave a Reply