Peter Sobot

I teach computers to listen to music. šŸ‡ØšŸ‡¦šŸŽ¶šŸ‘ØšŸ¼ā€šŸ”¬šŸ„šŸŽ¹šŸŽø

Page 3


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 →


A Better Music Workflow?

I produce a lot of music.

One of many, many songs.

I donā€™t necessarily release a lot of it (or finish all of it) but I have at least 100 songs I consider developed enough to listen to, and about 300 other song files that are just riffs, beats and vocal ideas floating alone.

With so many files, projects, songs, sounds, and work in one place, Iā€™ve developed musical workflow that borrows a lot from software development patterns. My music tends to be produced in stages and cycles.

Iā€™ll usually start with an idea from noodling around on some instruments, then do two things:

  1. Record (track) instruments with the main riffs of the song or basic chord structure.
  2. Record a basic drum loop and bass loop, then arrange to fit song structure.

Then, I donā€™t do anything.

For any length of time between a day and a month, I usually donā€™t touch the song-in-progress. The song needs a break, while I can forget about whatever...

Continue reading →