YTread Logo
YTread Logo

Sounds of the Mandelbrot Set

May 29, 2021
It's no secret that I like fractals at least visually and in some cases as video games, but what do fractals sound like? I mean, it's pretty obvious that they taste good, but listening to them, Mandelbrot put in an instrument. No Patrick, Mandelbrot said this is not an instrument. Or is it so fast that I know this is not a hyperbolic development blog? It was just an idea I had and I was so curious I had to try it, so I coded a quick prototype in just a couple of hours to get it sorted. To explain the instrument I'm about to show you, I first need to quickly explain what the Mandelbrot set actually is.
sounds of the mandelbrot set
Most people know it as this: take any point c in the complex plane, make a copy, call it z, and then just keep updating z with this equation thousands of times, if the point eventually drifts towards infinity, it's not part of the set and is assigned a color, but if it converges or enters a cycle or something like that, then it is part of the set and we color it. Black note that you don't actually need to use or understand complex numbers. The old x and y works too, it just makes the equation look less elegant, but what path does each point take as it iterates well?
sounds of the mandelbrot set

More Interesting Facts About,

sounds of the mandelbrot set...

Here I can show how that looks like depending on what point you start with, it will either converge to a point that escapes to infinity or it will converge to a cycle called an orbit. These orbits can have different periods, like three, four or five, and different shapes just by choosing different points, and so on. Some interesting structure and nuances are lost when we simply color it black and it got me thinking: what if we treat these orbits like sound waves? So you could listen to different parts of the Mandelbrot set and hear how they sound, so the way this works is basically i. simply convert the x and y coordinates to the amplitude of the left and right speakers.
sounds of the mandelbrot set
I choose a low sample rate like 8 kilohertz and use some interpolation to smooth it out to a more standard 48 kilohertz. Now it is very easy to know the period of the orbit because you can hear the fundamental frequencies. Another cool thing is that as you zoom in each bulb adds another harmonic on top of the original depending on which bulb you choose, oh yeah, and you can't get too close because this is all running on the gpu. in real time, which means it has limited accuracy. Also, these pure tones are a bit annoying, so I'll add some damping to make it more instrument-like, although it's a lot of fun to play around with the problem with the Mandelbrot set. that all the interesting chaotic areas are unstable, so you could never click on them because you would need infinite precision, so the orbit will always converge into some kind of repeating pattern that will sound like a combination of pure tones if we want to listen. for some more interesting

sounds

we need to switch to some different fractals.
sounds of the mandelbrot set
This one is called the burning ship fractal because that's exactly what it looks like here. The cool thing about this fractal is that it has chaotic regions that are actually stable and some sound really spooky. It's still a little hard to tell what happens when the fractal is completely black, so I'll add some colors based on the orbit, there are regions that converge to a point, to a cycle and to chaos in different ways, talking about fractal variants , here's one I came up with what I call feather fractal, there are a few reasons why I like it, first of all, there are a lot of good bands everywhere that have different notes to play, so it feels very more like a kind of infinite piano where you can zoom in and find all kinds of different notes with different tonal relationships.
The other reason I like it is that it looks so cool. I mean, look how beautiful it is. Now let's change from beautiful to ugly again. I call this fractal the sound effects fractal. It doesn't sound like much, but it has an extreme variety of sound effects it can produce because the orbits have a really interesting symmetry. Looking at the colors of the orbits reveals a really rich and complicated structure that shows why there are so many

sounds

it can make. It reminds me. a lot of those sfxr programs that are used a lot in game jams and I'm pretty sure this fractal could be useful for that too.
If you're already familiar with fractals you might be wondering what's up with Julia sets, the reason I didn't mention them is because they are usually very boring at least in terms of audio for the Mandelbrot set. Any point on the Julia set will converge to exactly the same orbit as the corresponding point on the Mandelbrot set. Now some other fractals can behave. A little differently, for example, there are some Julia sets from the burning ship fractal that are bistable. A single Julia set can converge to one of two orbits depending on the starting point and, if you want to get even more exotic, I discovered that some chaotic maps like the Chirokov map actually have continuities for Julia orbits anyway, everything This program is available on my itch.io page and the source code is on my github.
Honestly, it's easy to waste hours just exploring and finding new sounds, so check it out and don't do it. Don't worry, I'll be back with more hyperbolic stuff soon.

If you have any copyright issue, please Contact