Wednesday, September 8, 2010

BPM graphs

Someone asked about how I make the BPM sparklines and frequency distributions that I post with each of my sets, so I thought I'd explain. It isn't a very elegant method: I export each setlist from my media player, copy it into Excel, and use a spreadsheet that I have set up to generate Google Chart API code. The code is embedded in the links I post, so the graph is generated when you click the link. To do this yourself, you need JRiver Media Center (or some other way of exporting setlists) and Excel.
  1. Create a customized view in your J-River Media Center. Under View->Customize View, select the following Columns to show, in this order: Name, Artist, Album, Duration, BPM. Click on Preset, save this view as "Setlist Export."
  2. Play a set, save it as a playlist. When viewing the playlist, select View->Customize View, then click on Preset and select "Setlist Export." Hit okay.
  3. Select File->Export Playlist, choose "Text File, delimited" and include fields "Only Visible Fields." Remember where the file is going to be saved, then hit okay.
  4. Download this excel file that I created, open it up, and select the tab called "set data."
  5. Find the set list file you just saved, open it in a text editor. Select all, hit Ctrl-C to copy it, and paste it into cell A1 of the excel sheet. It should automatically open the Text-to-Columns dialogue box. Enter "|" as the delimiter, hit okay. Your set should now appear in columns C through G of this sheet.
  6. Go to the "output" tab. Enter a title for your set into cell B1. Copy the contents of cell B4 and paste it into your internet browser. You should see a sparkline. Do the same with cell B5 to get the frequency distribution.
  7. Exclaim something nerdy. "Neato!" or "Mwaaaaaaahhhahaha!" would be appropriate.
  8. Go to column K of the tab "set data." Fill down to the end of your set, then copy-paste this into your blog entry to get the nicely formatted setlist.
  9. Leave a comment to this post and let me know how it works. Also let me know if you have improvements or alternative methods that work better.
By the way, back when I was using a Mac, I had a series of AppleScripts that did all this stuff. It was a bit cleaner than using Excel.

No comments:

Post a Comment