Density — Market Drum Machine

Postmates
Postmates
6 min readFeb 3, 2020

--

Click here for more info on this project.

Beats

After making the atonal cacophony that was the Regions piece [link to it], I decided to try to set things up in a way that would result in something a bit more accessible. An electronic drum kit seemed like a pretty good place to start. I also noticed that LA seemed to have about twice as many deliveries as NYC, which had about twice as many deliveries as Phoenix, so I ran them through the data music machine, and hoped that a nice four-on-the-floor beat might come out.

Of course that’s not what happened, and what came out was something a bit closer to free jazz. It was still pretty awesome, don’t get me wrong, but I’ve already done the tempo-less, key-center-less sound thing. So I did the equivalent to having multiple different scales represented on different axes. Not “wrong” per se, but easy to abuse and mislead.

Sticking with the LA > NYC > PHX pattern, I thought about how drums are typically played. Hi-hats are hit a lot, kicks are hit pretty often, and snares are hit maybe slightly less often. So I built a four-on-the-floor pattern that these three markets would follow.

LA is playing eighth notes, NYC is playing quarter notes, PHX is playing half notes. What this translates to is that we’re dividing up the day into eight three-hour blocks for LA, four six-hour blocks for NYC, and two twelve-hour blocks for PHX. Let’s see what that looks like:

The Data

What exactly are we looking at here? We’re counting the number of deliveries that happen in each group according to the grouping pattern, and that number is assigned to the velocity that the drum is struck (normalized to the min and max of the velocity scale). Meaning, the more deliveries that happen in that bucket, the harder the drum is struck.

What You’re Hearing

You can hear a pretty distinct pattern that repeats every day. The pattern in which deliveries come in throughout the day manifests itself a bit differently based on how the day is segmented.

Phoenix is divided into two twelve-hour chunks, midnight to noon, and noon to midnight. It’s playing the snare drum. I shifted them so that they’re playing the 2 and the 4, because I’m not a monster. The first segment includes the start of our lunch peak, but also the least busy part of the day in the early morning, so it’s present, but not too loud. In the second half of the day, we’ve got non stop activity and our highest peak at dinner, so the second hit is much louder. Furthermore, you hear both of these hits get louder as the week progresses.

New York City is divided into four chunks of six hours each. Like so:

  • Midnight — 6am
  • 6am — noon
  • Noon — 6pm
  • 6pm — midnight

NYC is playing the kick drum, and based on the pattern of our demand, we see the intensity of the kick notes look something like this:

  • Soft
  • Louder
  • Loud
  • Soft

Los Angeles is divided into 8 chunks of three hours each:

  • Midnight — 3am
  • 3am — 6am
  • 6am — 9am
  • 9am — noon
  • Noon- 3pm
  • 3pm — 6pm
  • 6pm — 9pm
  • 9pm — midnight

LA is playing the hi-hat and the pattern sounds something like this:

  • Soft
  • Softer
  • Soft
  • Getting Loud
  • Pretty Loud
  • Pretty Loud
  • Loudest
  • Somewhat soft

When all of these combine, we get a pleasant sounding pattern that feels natural.

As for the synth sound, I wanted to capture something that wasn’t quite as predictable. We’re looking at the ratio of customers to Postmates across these three markets for each day, and making the results fit into C Major. So when there are more customers the note is higher, and when there are more Postmates the note is lower. The data was normalized so that the min and max were between three octaves. There are so many factors that can influence that ratio, from weather to promotions, so it doesn’t form an immediately obvious pattern.

How it Works

I made a simplified tutorial on how to create these from start to finish. Check out the Colab notebook if you want to make one yourself.

This one might have been one of the more complex sonifications in terms of wrangling the data. Since we’re dealing with different scales and trying to make them into something that makes musical sense, some shifting had to happen to make things line up. Again, think of it like setting multiple Y axes with different scales. It can still make sense, but it’s not exactly accurate.

For example, NYC (kick) and LA (hi-hat) have the starts of their segments lined up:

So technically we’re hearing data from NYC before we hear everything in LA, because the NYC buckets are bigger and include an extra three hours of data. But the starts of the bins line up.

Since I made the creative decision to have the snare hits on the 2 and the 4 vs the 1 and the 3, it meant that their values get shifted:

This looks pretty weird at first, admittedly. If we wanted these to line up better, Phoenix should be on beat #1. But putting the snare on the on-beat vs the off-beat feels very wrong for non-classical music. All of these data points are covering the exact same period of time, Phoenix is just shifted a bit compared to when the other notes are sounding.

Once all of these decisions were made, then it was a matter of structuring the query in a way such that everything lined up appropriately, the number of deliveries in each section were normalized to integers between 0–127 to control the velocity of each note. The note values are set based on the sampler I was using, so those would be a static note for each market/drum.

Separately, I took the same markets and the same period of time, and measured the number of customers / number of Postmates by day, and scaled that result to note values in the C-major scale in a three-octave range.

Once the MIDI files were created, I brought them into my Digital Audio Workstation (DAW), this time I used Ableton Live, since I’m just more familiar with drum samples there. Then it was just a matter of picking sounds, and voila, our markets can play the drums!

Conclusion

It’s hard to get the natural patterns of human behavior to make very structured things unless you really force it. This still does have a bit of a natural element to it since the velocity of the drum hits are all determined by data, and the way that they flow into each other differently based on the different subdivisions does help us feel the pulse of when deliveries happen.

This piece isn’t really showing that different markets have different rhythms. Think of it more like a band, each person is playing the same rhythm but the fact that each person is unique, they’ll bring something different to the particular instrument they’re playing.

Postmates is always looking for creative data-focused people to join our team. If you want to make things like this, check out https://careers.postmates.com/ and say that Alex sent you.

--

--

Postmates
Postmates

On-demand delivery from every restaurant & store in your city. Customer support: @Postmates_Help. Download here: https://postmates.com/