Log in to watch

Log in or create a free account to watch this video.

Log in
London 2019
Share

Lightning Talk: There Are No SIDE Projects II - Coding the Crossfade

Lightning Talk


Michael Winslow picked up his love for programming when he was 10 years old writing GW-Basic code on his Tandy-1000. With his passion for designing simple solutions to complex problems, Michael has played key roles at companies like Aramark, Ortho-McNeil, Oracle and Comcast.

Chapters

Full transcript

The complete talk, organized by section.

Michael Winslow

Hey guys, I'm Michael Winslow.

I want to say thank you, London, for making my son so happy because apparently this is the Galar region on the new upcoming Pokémon that's coming out, so it made him happy to come over here with me, so congratulations.

This is "There Are No Side Projects Part Two." Part one I delivered in Vegas back in October, and I told everybody about a friend of mine named DJ Boo Boo who wrote a DJ software and used that as his side project and took it very seriously.

I then went on to say how taking that seriously helped him in his career all the way from becoming a mid-level developer, to a lead developer, to a senior manager, and then, spoiler alert, director, and then I admitted that I was DJ Boo Boo. Okay?

So it was just like when Tony Stark said, "I am Iron Man." So why did I decide to hide this from everybody? Well, I really felt that if I admitted that I was a DJ, then at work I'd get high fives instead of handshakes and people would yell down the hallway, "Yo, Boo Boo, wiki, wiki, wiki." All right?

But I embrace that now. I embrace it so much that I want you guys to help me out. Every time you see this little box in the corner say, "Wiki, wiki, wiki," I need you guys to say, "Wiki, wiki, wiki." Will you do that for me?

Yeah. Wiki, wiki, wiki. Allow me to reintroduce myself.

All right. So now that that's out of the bag, I want to actually share something very valuable with you. When I created this DJ software, there was something very important that I had to do in order to use it in a public place, and that's coding the crossfade. How many people by hands know what a crossfade is?

Okay, cool. So those who don't, the dictionary says it's to make one sound be heard gradually as another disappears and becomes silent. Okay?

So in order to do that in coding, you need four components. You need two media player objects that kind of act as your turntables, incoming and outgoing. Okay? You need a timer or a scheduler that can fire multiple times per second, and you need a method that you can call that can raise and lower the volume on your two media players.

And then it's pretty simple from there. You have your scheduler keep calling this method, and your incoming keeps increasing while your outgoing goes down. So now get ready because you've accomplished crossfading. Can I hear it, guys?

Wiki, wiki, wiki. I prompted you a little too early.

And especially we celebrated too early because this look right here is the look that a DJ gets the moment the crowd realizes that you messed up the damn crossfade. All right? And so that's what happened here.

But what did we possibly do wrong? I thought we had it perfect. If you see in the upper corner, at one point we had both volumes at 50%. That's like taking the whole sound and bringing it down to 50% and then turning it back up. What we need to do is we need to take the incoming and get it up to at least 80% before you start dropping the other volume out. Okay? And that's how you pretty much do it.

And with great volume comes great responsibility. Okay? Because if you do mess up at this very high volume, literally everything is amplified. Your failure is amplified. Okay?

There's other things that get in the way, like if two artists are talking at the same time at very high levels, as Kanye and Taylor Swift showed us in 2009, it's a very awkward moment for that to happen during a crossfade. Okay? So how do we prevent that?

We need to get more intimate with every track that we have. Every piece of music that we have in our library, we need to know more about it. Because right now all you really know is when does it start and when does it end, and the name of it. So we found different parts in the song that can actually give us some information on when it's safe to crossfade.

At the very beginning of the song, there can sometimes be a skit or some silent area. You want to be able to get rid of that completely. That's the red box here. Then you have a safe area where you can actually crossfade music that comes after that. Then you have the real music that plays, and then in the very end, you have another safe place.

So if we can keep metadata that tells us when these parts of the song are approaching, we can use that to our advantage. In this case, we have song start, when to drop the other song, and when does the song end. Okay?

So now that we're capturing that information, if you have that same information for your incoming song that's coming up, you can start to see where you can identify places where these two songs can be compatible. Okay?

And so along the timeline, what you want to do is find out where these mixable areas line up, and that is your crossfade sweet spot. Okay? Something that can be done easily by a human, but you need to keep a lot of data in there if you want to do it as a computer.

Okay? So now get ready because I think it's time to celebrate again. Wiki, wiki, wiki. You have successfully crossfaded music in a live environment. You may never forget the look of that woman that you messed up the first time, but that's why it's called continuous improvement, guys. All right? Your new partygoers are happy.

So congratulations, you've coded your first crossfade.

I'm DJ Boo Boo. Make sure you make diversity imperative in your organization. Talk to you later, guys.