Random Sound Walks with P5.js

generative sound walk with P5.js and OpenStreetMap

Random Walks is a open source generative audio-visual installation that tries to capture the vibe of a sound walk in an area by combining field recordings with OpenStreetMap data. It was originally developed for Moscow’s Museum of Cryptography as part of the «Город говорит» project. Given geo-tagged field recordings, an abstract observer randomly traverses the city’s streets and triggers sounds. Here’s how it looks and sounds in action:

A library of over 150 sounds was assembled during our field recording workshop, with regular recorders as well as piezoelectric mics, ultrasound, geophone, hydrophone, and EMF. Here’s a small-scale browser-based demo using placeholder sounds.

Here’s the source code for the installation. If you end up repurposing it for your own needs or need help tweaking it, do reach out, I’d love to hear from you!

Under the hood

Everything you see, including audio playback/processing, is done in P5.js. Map data is loaded from OpenStreetMap via the overpass turbo API. We provide a set of waypoints that define the boundaries and interesting areas of the map dense with sounds, and the observer follows the algorithm:

  • Walk to the end of the path I’m on
  • With probability p, choose the path whose end is closest to my next waypoint. Otherwise, choose a random path that starts within some radius of where I am.
  • If I get close to the waypoint I was heading towards, randomly choose another waypoint.

There’s no explicit graph of the map paths being built or traversed, the algorithm is greedy and chaotic.


XXIIVV webring