Skyline Sound Diffuser
Visualization
Creative Coding
Tools: p5.js, WebGL

My family was looking for a sound diffuser for our living room speakers, but most of the options in the market were pretty expensive. I was curious how the different orientations, heights, and angles influence how sound interacts with the sound diffuser. I began researching how we might be able to make a sound diffuser at home.

I looked into an algorithm for the skyline sound diffuser called the Quadratic Residue Diffusion, which determines the relative height levels of the different wooden blocks that would best randomize sound waves hitting this panel. At first, I was calculating the different block heights one by one, but I soon found it tedious, especially if I had to recalculate all the blocks when there was a new consideration.

Instead, I wrote a program to automate this process with these main constraints:

  • Prime number that represented how many blocks were on each side (ie. prime number of 7 would return a 7x7 sound diffuser pattern)
  • Target hertz frequency that would minimize a standing wave (*note: a standing wave is when sound waves align and cancel each other out — this is what sound diffusers aim to help avoid by randomizing the sound waves bouncing off different heights of surfaces)

I wrote a simple program created in React that displayed each block and its respective height (in cm).

Now, we were able to measure and cut out the varying heights of the wooden blocks and easily organize them into their relative positions.

I was curious if there was a way to visualize the skyline diffuser, one that would resemble the final product, to see if we like how it would aesthetically look before building the diffuser. I used WebGL in p5.js to create this visualization in both perspective view and birds eye view. The difference in grayscale value helps differ the varying heights of the blocks. In this example, I created an 11x11 skyline sound diffuser for 600Hz.

Perspective View (11x11, 600Hz)
Birds Eye View (11x11, 600Hz)

The Skyline Sound Diffuser is a scalable tool that anyone can use to build a sound diffuser for their own space. The visualization provides an intuitive and digestible way of understanding how your finished product would look like. I really enjoyed taking researched algorithms and building applicable tools for users, in this case, my family!