Horizon Player - 1.png

Step 1: Grab a bunch of panoramas off Google StreetView by writing a Chrome extension.

Horizon Player - 2.png

Step 2: Take each panorama and…

Horizon Player - 3.png

Step 2.5: Isolate the sky in Photoshop (using an automation tool for efficiency).

Horizon Player - 4.png

Step 3: Write a Python script to convert the isolated sky images into an array of integers representing the offset from the “base” horizon. Use this array to generate a line on a webpage using the Canvas API.

(This was technically 2 steps, but I suppose it makes up for the decimal from earlier?)

Horizon Player - 5.png

Step 4: Take an audio file and overlay its realtime frequency graph, similar to a traditional audio visualisation. Bass on the left, treble on the right.

Horizon Player - 6.png

Step 5: Calculate the offset between the horizon and the frequency graph at each point, assigning an “average offset” to each panorama.

Step 6: Profit Every time interval (I use the BPM of the music for this), pick the horizon with the least offset relative to the current frequency graph.

I also added some logic to pick the second-least offset in case a horizon repeats, since it looks aesthetically off if the horizon doesn’t change for a beat.

Follow these steps perfectly and you, too, can create your own audio visualisations using horizons extracted from panorama images from Google StreetView. Or you can just use this one. I won’t judge.

I never judge.