Published on

Twitch Plays Music

Backstory

Twitch Plays Pokémon was a wild, wild time in Internet history. Twitch, a video-game streaming platform with a chatroom for each stream where the streamer can interact with their viewers, became the location of a perhaps unintentional sociological experiment. Imagine: twitch-chat issuing text-commands to a bot that relayed them to an emulator, and the character in-game just did the best they could to obey what chat told it to do.

Their goal was to beat Pokémon Red for the original Gameboy. It was like staring into the abyss: some players wanted to help, some players would advise others what commands to issue to most reliably get the protagonist to progress in the game, others would purposefully try to sabotage their efforts. The Internet, with 80,000+ viewers at some high points, with many issuing commands, was become chaos, bringer of sheer collective human potential. Superstitions arose, religions developed, traditions and factions formed, all in the span of roughly two weeks.

After roughly two weeks of near-constant 24-hour gameplay, the Internet beat the game. Somehow.

Shortly after, many people developed their own bots, but none ever took hold the same way as Twitch Plays Pokémon.

Twitch Plays Music

I like code kind of (okay, well, I do it as a day job—more or less). I also like music—kind of a lot. I often look for excuses to combine my hobbies, and this is the result of one of them: a proof of concept where a bot reads twitch-chat, performs sentiment analysis, analyzes the punctuation, parses the words and algorithmically generates chord progressions and percussive rhythms. The music is played back to chat alongside the streamer, who improvises music alongside the music the chat is generating.

Sure, nowadays, especially with the likes of Generative AI and its sheer creative capabilities, what I did was not that impressive. But the point wasn't to display genius coding skills or prodigious musical ability; I wanted to show an avenue through which performer and audience could collaborate in the creation of art (albeit somewhat unintentionally).

So yeah. It's a thing. Check it out in the video below. Also, here's the code if you're into that kind of thing.