NPR and PHP

May 10th, 2009 by Andrew Plemmons Pratt

NPR TechnologyEvery so often, I’m on a road trip, driving around the great southern states, and I’m overtaken with a very strong need for some public radio. Unfortunately, I don’t have one of the handy NPR Station Locator Maps. I also don’t have an iPhone, for which I could get the free NPR Station Locator app. What I have is a work-detail Blackberry and soft sport for dabbling in scripting languages. So I took the opportunity to learn some PHP and build a rudimentary station finder using the NPR API.

NPR of course offers a spiffy web-based station finder map for scoring your closest Wait Wait Don’t Tell Me! or All Things Considered fix. But it’s a little too full-featured to work on a dinky mobile browser. But let’s also not kid ourselves about functionality here; this was an excuse to learn some super-basic PHP:

http://appratt.com/npr/

We’ll call this version 1.0 because it lacks anything resembling a design; it doesn’t verify that you’re feeding it ZIP codes or return appropriate error messages if nothing is in range; and it doesn’t indicate station strength (though station strength is something you can figure out pretty quickly with your tuner).

What is does do is query the NPR API and return a list of the closest stations with city and call number, ranked in order of proximity. Which is all you need when you know you’re missing Michelle Norris and all you can find is Delilah.

New Season, New Mixtape: Final Version

April 19th, 2009 by Andrew Plemmons Pratt

andrew in sunglassesSo the original draft of this spring’s mixtape was a solid start, and I’ve been listening to it a good bit this past week, and thinking about advice from friends who provided input. Here I present the final version—and all imperfections in it are solely the fault of the arranger.

Some recent additions: Ida Maria, which @lauraolin reminded me of, brings an additional dose of dancearoundwithyourarmsintheair power. As well, any proper spring mix needs something that makes you feel like you could be sitting on a sunny stoop on Sesame Street: hence the Cat Stevens.

I developed some serious qualms with Pete and the Pirates, mainly because they’re not very good musicians, and listening to them in concert with groups like the Violent Femmes, who can not only harmonize three strange male voices and create more melody with a tenth as many notes, really doesn’t do the former band any justice. But I’m giving Pete the benefit of the season and keeping the sprightly tune in.

Now on many occasions, I’ve tried to engineer mixes that take you up, ease you down, and then roar back to a crescendo. That end, the I’ve kicked in some more juice with a double shot of the Yeah Yeah Yeahs and what seemed like a necessity for a spring mix: Le Tigre.

As much as some of these new tracks could have made great closers, I took Kristen’s advice seriously and stayed with the Avett Bros. at the caboose. The transition from “All This Time” into “Paper Planes” was too good to lose though, so I kept M.I.A. I would have worried about leaving a single hip-hop track floating alone, but I’ve ended up with a enough variety between rock, folk, punk, indie, and riot grrrl, that I’m not too worried. I attempted to fold in some funk and R&B, but it wasn’t working. There will be plenty of room for James Brown on the next mix.

Here’s the final, which I’ve decided to entitle “Sunglasses,” for obvious reasons:

http://www.appratt.com/mixtapes/sunglasses/

New Season, New Mixtape

April 12th, 2009 by Andrew Plemmons Pratt

Recently inspired by the indie twee lovefest Nick and Norah’s Infinite Playlist, I’m working on the occasional project of designing a seasonal mix. This is an opportunity to gather together a bunch of the great music I’ve been listening to in the mornings on KEXP. It also affords the chance to test out Opentape, the standalone software that recreates the functionality of Muxtape on your own servers.

Muxtape was a brilliant minimalist web app that allowed you to upload songs and share them in a cute playlist on a web page. The RIAA was all over that and shut it down after a brief, shining run.

So here’s the current version of the list (it’s not embeddable): http://www.appratt.com/mixtapes/spring09/

Got any suggestions? Leave them in the comments.

P.S.: If you are teaching a screen writing class in the near future, consider using Nick and Norah as an example of how to take the framework from a mediocre book and turn it into a decent movie script.