I don’t know if they use the term port mortem for hackathons but we will go with it anyway. Just got back from Hack Beanpot. I am extremely tired because I only got 4 hours of sleep in total this weekend but the event was amazing. Thanks to everybody who made the weekend happen (NUACM leaders) and the sponsors. Some really cool projects were made. From a Bitcoin coffee machine to a app that splits up the cost for a car ride. I was seriously impressed by a group of 9 freshmen who created an app called Echodrop where people can leave sound recordings at different locations. I probably couldn’t have made something that cool last year.
What I worked on with my team was an app called Untitled Mixtapes. It is a mixtape generator that takes in an artist and a song and then gives you between 6-14 tracks that flow together well based upon an algorithm one of my partners wrote. It can either stay within the genre the the original song was in or branch out to new genres as the mixtape goes on. We aim on making it more comprehensive in the things it can take in at the beginning. The actual piece that I worked on for most of the weekend for the project did not make it in to the code because we could never get it working.
I could probably write an entire blog post about the algorithm that we used to get songs but I would need to read the algorithm first completely to know how it works. The basics of it is that it takes the song you input and then finds songs with similar “energies” to that song and then puts those in the playlist. It also analyzes the BPM of each song before choosing what songs to put into the playlist.
My code was supposed to take the list of songs that was generated from the algorithm and put them into a Spotify playlist that the user could then use. However the Spotify SDK called libspotify would not play nice at all. I spent a couple hours trying to set it up in Windows and Mac OS X before I switched to my Arch Linux install where it finally worked. I then used a python library called pyspotify to interact with the base libspotify SDK. I originally was using pyspotify 1.x and got all the way up to creating empty playlists on a Spotify account. However tracks were never getting added to the playlists that were created. I then searched around and found out that pyspotify 2.x was still in development but was available for use. I switched to that version because I thought it had enough functionality for us to use it. I was wrong. In the 2.x version I got back up to adding empty playlists and then one time I actually got a playlist with songs added to a Spotify account, however it was not reproducible. Adding a playlist to an account is asynchronous and I couldn’t figure out how to actually know when the playlist was added, loaded, and ready to be used for an account. I got my partner to look at it and we ran it though the python REPL and we got another playlist with tracks onto an account. He tried to get it working in code and it was not reproducible. We looked for another solution and we found out that there is a Spotify widget that takes in a list of tracks and creates a “playlist” that people can then listen to. It isn’t a real playlist because it did not add the tracks to an account but it worked for us. Even though I never fixed my issue I know how to use pyspotify pretty well now. Also this was my first time coding in Python so I learned a lot from this.
Untitled Mixtapes is not available for use yet because we need to fix a rate limiting issue that we were running into. One playlist creation uses all of our API calls to Echonest so we could only generate one playlist a minute. We learned during the app demos that we could have batched our calls together and made much fewer calls to the API. Once we get that fix in we should be able to deploy. We did however win an award for Best Use of API’s. We got a pretty sweet plaque to show off. I also won a Pebble that I should get in a week or so. Too bad Windows Phone 8 doesn’t have official support yet…. Good thing I can probably hack something together. I actually have a number of projects that I am working on or want to work on
Twixel – C# library for the Twitch.TV API and unofficial Twitch app for Windows 8 and will probably try to port to Windows Phone 8
CreepScore – Unofficial C# library for the Riot Games API that I wrote over Winter break. Probably going to use the data to make a Windows Phone/Windows app in the future.
Untitled Mixtapes – Mixtape generator. Will be awesome when more complete.
Windows Phone Pebble Support – This may or may not be possible. Please open source.
Untitled Music/Beat Game – A space shooter type game that is influenced by music that is playing. I am actually working on this game for a class so this should be somewhat finished by the end of the semester.
Untitled Time Warp Shooter – A probably top down shooter game where time influences the game. The less health you have the faster the game goes. You can also slow down time as a powerup to get through some areas. This is just an idea I’ve had for a while but I do want to sit down and actually start working on it at some point.
Systems and Networks – A really hard class that I will always be working on this semester. Filesystem why :(
Here is a picture of the plaque. Also I’m going to bed now. I don’t know how many errors are in this blog post. So tired.