Peter Sobot

I teach computers to listen to music. 🇨🇦🎶👨🏼‍🔬🥁🎹🎸

Page 3


A Site For Dinner

I like to make small, single-serving sites - frivolous sites with only one
page, and one purpose. They’re intended to be dead-simple to use, fun to play with, and somewhat silly. I’ve made a couple in the past, both
alone and with others, often thinking of the idea over dinner and then implementing it in the hours (or days) that follow. Last night, I decided to
make another single-serving site - and to make it open-source, to show
others how simple it is to do.

Enter A Meal for Me. Roughly 200 lines of code for a fun site that now
helps me be more adventurous in the kitchen. (Grab the source on GitHub!)

That could make a tasty meal...

Development took a couple hours, and was simple enough:

  1. Have dinner.
  2. Google for “Recipe API.”
  3. Get an API key.
  4. Layout a simple page in HAML.
  5. Style with SASS.
  6. Wire it up to the API, and use some basic jQuery to munge the data.
  7. Apply a Google Web Font and subtle background pattern to...

Continue reading →


Startups: Bands for Hackers

Growing up as a young musician in suburbia, I fantasized about being in a band: playing music in front of thousands of people, signing a record contract, enjoying the successes (and excesses) of stardom and celebrity. As I grew older, I began to realize how difficult it would be to achieve that goal.

Years later, as I started university and was accepted into VeloCity,
Waterloo’s startup incubator, I noticed a lot of familiar dreams. Although their domains are vastly different, startups are just bands for hackers.

Wonderful doodles courtesy of Younjin Kim.

Like many bands, many startups begin in parents’ garages - serious business in a non-serious atmosphere. Founders (or band members) spend every waking moment together, working hard to perfect their craft and their endeavour. While bands work to perfect their lyrics, melodies and rhythms, startups work to perfect their pitch, product and business plan. Instead of fans...

Continue reading →


A Use for Smartphone Photos

As a smartphone user, I take a lot of photos. Since I bought an iPhone 4 nearly two years ago, I’ve taken just over 6,000 photos with it. 47GB of memories. On average, 10 photos per day, every day, often of nothing in particular.

These photos aren’t good enough, or meaningful enough to anyone else, to post on Flickr. 500px would scoff at them. The few people on Facebook that would recognize the people, places and events in the photos wouldn’t see the point. They’re tiny fragments of my life, and that’s about it.

My homepage, when this was written.

Instead of forcing these thousands of photos to stay hidden in my iPhoto
library, I found an outlet for them - my homepage. Crudely modelled after the stellar TED.com landing page, it’s supplied by a random set of hundreds of images, all of which I’ve taken, and until now, hand-cropped and hand-selected.

Michael Macias, in a submission to a Codebrawl last November, came up...

Continue reading →


Software, Art, Music and Games

I am a software engineering student. The exact definition of that varies among my classmates and professors. Some say that it implies an ability to write software. Others argue that it requires a strong grasp of algorithms and mathematical optimization. Still others say that software engineers need only be able to design large, complex pieces of software, or manage teams of coders, or communicate project specifications, etc.

Few people correlate software engineering with art.

There are those that will argue that “software itself is a form of art,” or that “this code is beautiful.” There are certainly pieces of software, written in different languages, that could be considered their own distinct forms of “poetry.” (And no, I’m not just talking about Lisp poetry.) Elegance, cleverness, and the functionality of the code all contribute to this sense of inherent artistry.

I prefer to write...

Continue reading →


The middle ground between form and function

I’ve noticed a distinct trend in all of my recent work. Not all of it is useful, and not all of it is feature-complete - but it all places a lot of importance on form over function. Let me give an example:

launder me, get it?

Earlier this month, I put together a quick site called lndr.me, which tracks the usage of laundry machines at VeloCity, my student residence at the University of Waterloo. It’s simple and email-driven. Residents can email washer@lndr.me to say that they’re using a washer, and they’ll get an email back in ~30 minutes to remind them that their clothes are done. Other residents can also check the site and see if the machines are occupied.

It’s an exceedingly simple idea, with very little code required on the backend. (It’s a Rails app with ~300 lines of ruby.) I’ve even made an API to allow other residents to make apps out of it, or link in hardware sensors with Arduinos and ethernet...

Continue reading →


“The Street Preacher” - A Hyper-Local Twitter Bot

I walk through Yonge & Dundas Square in Toronto every day.

So. Many. People.

That intersection, which some call Toronto’s equivalent of Times Square, has a large number of street preachers. Loud, startling, obnoxious people that yell warnings of doom or urge repentance. Silly people.

I decided to use Twitter’s real-time streaming API to make an extremely specific location-based Twitter bot. The purpose? To respond to you if you tweet near the street preachers at Yonge & Dundas, with similar messages. Call it art, or a statement about society, or making fun of those preachers, whatever - I call it a fun technical and social experiment.

Using an excellent ArsTechnica article as a guide, I created a quick Python script that watches the Twitter stream for a given area, and replies to tweets in a very specific location. (±10 meters or so, by my guess.) If you’re one of the lucky few to tweet within those...

Continue reading →


More Lessons from The Wub Machine

Four months ago, I released the Wub Machine, an online Dubstep remixing web app. It hit Reddit for a couple days, got popular on 4chan, and has since remixed nearly 24,000 songs. About a month ago, at the wonderful Music Hack Day Montréal, I wrote and released an Electro-House remixer to complement the Dubstep one. It sounds kinda awesome - here’s Stevie Wonder, remixed:

Since then, I’ve polished up a completely new framework for the Wub Machine - nearly everything about the site has been rewritten since its first release. The first version was held together with duct tape, PHP and prayers, which resulted in some catastrophic failures when the site was initially launched. I’ve sinced rebuilt it in 100% Python, load tested, and added features.

Instead of talking about the code (which I do over on GitHub), I have a better story - being featured on the immensely popular VSauce channel...

Continue reading →


The Wub Machine, Postmortem

The Wub Machine, my fancy dubstep-remixing web app, unexpectedly launched last week. In the days that followed, I took a crash course in how to manage a heavily-used web service. Here’s the first of many pretty graphs:

First week stats. Dem spikes.

  1. Uploads (whenever a song was uploaded for remixing)
  2. Processing (started/finished/failed) (the analysis & rendering of the remix)
  3. Sharing (sharing of a remix to SoundCloud)
  4. Downloads (when a user explicitly downloads their remix)

All of these actions are graphed separately, to provide a detailed look at what happened over the first week of running the Wub Machine.

So, what did I learn?

Dat failure spike.

  1. Don’t pretend to have capacity.

    • I didn’t expect such massive server load, and as such, I assumed there would be no harm in allowing people to upload tracks when other tracks were being remixed. This ended up creating a never-ending queue of songs, and prevented anybody from...

Continue reading →


The Wub Machine, Revisited

The Wub Machine was a great little auto-remixer project - some audio hackery in Python to make a neat script. Unfortunately, I can probably count on one hand the number of people who actually downloaded the script and tried it on their own songs. So, I decided to make it into a web app. (try it out !)

Oh, Paul Gilbert...

I opened up my trusty Photoshop, cranked out some multicoloured waves and set “The Wub Machine” in beautiful Proxima Nova. Then I set about the immense task of actually implementing the remixer on the web.

I’d go into the technical impressiveness of the system, and how it’s brilliant and took me months to come up with… but it’s really not. It’s one big hack.

I ended up using:

  • PHP to serve the front-end, as well as serve the AJAX progress updates and interface with SoundCloud
  • Python to power and tie together all of the processing on the back-end
  • the Echo Nest Remix API to do the...

Continue reading →


The Wub Machine

UPDATE: I turned the Wub Machine into a website. Go and remix your own tracks!

I like dubstep.

There, I said it!

That massive bassline, two-step beat and killer rhythm has some odd allure that I can’t resist - and I’m typically a fan of rock, metal and prog!

I’m also a huge fan of the Echo Nest and their brilliant Remix API. In their words, the Remix API is an “internet synthesizer” - quite true. I can send off an mp3, and get back extremely detailed beat, timbre and pitch information within seconds. Some people have already used this to make any song swing, put a donk on any song, and much, much more.

For the first SE Hack Day, I decided to use the Remix API to automagically add dubstep to any song.

Now, as you may be able to tell from the samples above, this isn’t quite ready yet. In fact, it’s extremely rough. Even the code looks horrifically ugly. (And yes, you can download...

Continue reading →