Peter Sobot

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

Read this first

Reviving an Analog Polysynth with an Arduino, Ghidra, and Python

About a year ago, smack in the middle of the pandemic, I turned to the internet for some retail therapy. I’m a musician, so my usual retail therapist of choice is; a sort of fancy Craigslist or eBay just for musicians. Every day, I would see new listings pop up for instruments I might want, like a 6-string fan-fret bass, a nice electronic drum kit, or my “holy grail” - a super-rare, 22-year-old analog synthesizer: the Alesis Andromeda.


The Andromeda is a 16-voice polyphonic analogue synthesizer; basically a keyboard that sounds very lush, human, and organic, and can play a lot of notes at once. (That combination is expensive, for reasons.) Every function is controllable by a separate knob on the front panel, making it extremely interactive; every knob makes the sound change in some way.

As a kid, I remember playing one of these at my local music store in the early 2000s...

Continue reading →

Patching an Embedded OS from 1996 with Ghidra

For reasons I won’t get into, I’ve been working on a tricky reverse engineering puzzle recently: how to patch the operating system of a 26-year-old synthesizer. To be specific, the Kurzweil K2500, a sample-based synthesizer released in 1996.


As with many digital musical instruments, this synthesizer is really just a computer with some extra chips. In this case, it’s a computer based around the CPU that was popular at the time: the Motorola 68000, which was also famously used in the original Macintosh and the Sega Genesis. I want to patch the operating system of this beast to do all sorts of other things, most of which which I’ll leave to the imagination in this already-very-long post.

Finding the Operating System

Modifying the operating system sounds great, but how do we get access to the code in the first place? Luckily, the K2500 operating systems are still provided by the...

Continue reading →

Machine Learning for Drummers

TL;DR: In this post, I build an app that classifies whether an audio sample is a kick drum, snare drum, or other drum sample with 87% accuracy using 🎉machine learning. 🎉

First and foremost, I’m a drummer. At my day job, I work on machine learning systems for recommending music to people at Spotify. But outside my 9-to-5, I’m a musician, and my journey through music started as a drummer. When I’m not drumming in my spare time, I’ll often be creating electronic music - with a lot of percussion in it, of course.

If you’re not familiar with electronic music production, many (if not most) modern electronic music uses drum samples rather than real, live recordings of drummers to provide the rhythm. These drum samples are often distributed commercially, as sample packs, or created by musicians and shared for free online. Often, though, these samples can be hard to use, as their labeling and...

Continue reading →

Echo Dot vs. Chromecast Audio: An Evaluation

I recently came into possession of both an Amazon Echo Dot and a Google Chromecast Audio, two devices that can both stream music to speakers. While the Echo Dot includes voice control features and does much more than just play music, both devices can stream Spotify, which is basically all I use them for. So which sounds better?

Disclaimer: As of time of posting, I am employed as a software engineer at Spotify, but this post does not reflect the views, opinions or position of my employer.

A number of forum posts around the web feature audiophiles claiming that one device clearly sounds better, even after enabling “Full Dynamic Range” (really just turning off a built-in compressor) on the Chromecast. As I had already biased myself by reading these posts, I decided to perform an objective test.

To test this, I connected the 3.5mm audio outputs from each device to a USB audio interface...

Continue reading →

Debugging an Empty Spam Email

Despite the best efforts of modern spam filters, we all still receive spam once in a while. When I see a spam email pop up in my main inbox, I often wonder what magic the spammer has discovered that allowed them to bypass Gmail’s spam filtering. (Often times, this translates into me being much more suspicious of a spam email than usual, as it must be “more advanced” in some way to have landed in my inbox.)

Just this past week, I received one such email. It had no subject, no body, was addressed to no one, but was cc’d to myself and 29 other Peters.


(The “…” box provided by Gmail did not expand or collapse any content when clicked.)

A side note on the recipients - it looks like the other unlucky email addresses either contained the string “peter” in the local part or the domain part. Interestingly, some of the recipients’ addresses did not contain the string “peter,” but visiting...

Continue reading →

A DeepDream Web Service for $5 a Month

Google’s DeepDream neural net image processing library is a stunning application of advanced technology. If you haven’t heard of it, DeepDream uses an image recognition system in reverse - instead of trying to identify which objects are in a photo, it accentuates what it sees, producing extremely trippy visuals:

San Francisco's Bay Bridge, through DeepDream

While DeepDream is cool, it’s also notoriously difficult to set up, as it was built by researchers with exceedingly complex software tools. Shortly after its launch, Matthew Ogle and myself decided to put together a web interface - to make the process simpler.

Screen Shot 2015-07-25 at 2.43.11 PM.png

The site itself is pretty trivial - one page, with three options and one upload button. The fun part wasn’t the visual design or the user experience, but rather the scalable backend services that adapt the system to varying amounts of load without costing much more than a fancy coffee each month.


Continue reading →

The Cost of Waterloo Software Engineering

This past June, I graduated from the University of Waterloo’s Software Engineering program. After 5 long and difficult years, I’m extremely proud to say that I’m a Waterloo grad, and very proud of my accomplishments and experiences at the school. Somewhat surprisingly, myself and most of my classmates were able to graduate from a top-tier engineering school with zero debt. (I know this might sound like a sales pitch - stick with me here.)

Waterloo is home to the world’s largest cooperative education programs — meaning that every engineering student is required to take at least 5 internships over the course of their degree. Most take six. This lengthens the duration of the course to five years, and forces us into odd schedules where we alternate between four months of work and four months of school. We get no summer breaks.

One of the most important parts of Waterloo’s co-op program is...

Continue reading →

The Holiday Party Hack

For this year’s holiday party at The Working Group, I helped build something special to spice up the party - a live, music-synced slideshow of the evening, powered by a nearby photo booth. Take a photo with your friends and loved ones, then see it show up on the big screen seconds later.


The Hardware

To take the photos, we mounted a Canon Rebel T2i with an [Eye-Fi card]( on a tripod in front of a great backdrop. A generous serving of props was provided for people to play with, and the room was well lit.

Also significant - the photo booth had a glass wall on one side, making it easy for partygoers to notice the fun to be had inside, while still allowing for a little bit of separation from the cacophony outside.


Finally, to allow partygoers to trigger their photos themselves without needing someone behind the camera, Brian Gilham and I built a huge, industrial-looking...

Continue reading →

The Architecture of an Infinite Stream of Music

Nearly a year ago, I launched - a free online radio station that seamlessly beat matches its songs together into a never-ending stream. At launch, it was hugely popular - with hundreds of thousands of people tuning in. In the months since its initial spike of popularity, I’ve had a chance to revisit the app and rebuild it from the ground up for increased stability and quality.


(Grab the free iOS and Android apps to listen to on the go.)

Initially, was a single-process Python app, written with the same framework I had built for my other popular web app, The Wub Machine. While this worked as a proof of concept, there were a number of issues with this model.

  • Single monolithic apps are very difficult to scale. In my case,’s monolithic Python process had to service web requests and generate the audio to send to its listeners. This task is...

Continue reading →

Co-Working at The Working Group

Early in my academic career at the University of Waterloo, I was fortunate enough to land a co-op placement at The Working Group. Back then, the team was just over a dozen people. We were taking on our first mobile projects, and were starting to outgrow our old office at the Burroughes building – where we still had musical jam sessions with the partners every couple weeks. I learned more and had more fun in that four-month placement than I thought possible.


That was two years ago. In February 2013, I founded a software company that creates music apps that anybody can use. So far, our portfolio of products includes The Wub Machine, an automatic music remixing app, and, an app that creates an infinite DJ mix of the hottest songs on SoundCloud. These two apps have proven popular, and have already reached more than 1,000,000 people across the world. However, their development...

Continue reading →