3blue1brown logo seriously go watch the videos |

Fourth order Hilbert curve would not make a good maze |

After watching the video, I wondered about the reverse procedure. That is, what kind of images would it take to produce a given sound. In particular, where would the standard musical pitches lie on the curve, and what would chords look like?

So I made a little web experiment to find out. I call it Hilbert Chords. Here's how it works: I mapped the 1D space onto a single octave, the range of frequencies between middle-C and high-C. It's a logarithmic scale, so the 12 pitches in the chromatic scale (plus one for the repeated C) are spaced evenly apart. You can move your mouse over either the 2D or 1D regions to hear the corresponding pitch and also see where each point maps to in the other space. Also you can click a handful of buttons that play preselected chords and see what the chord would look like.

locations of pitches on the chromatic scale in color.. because, you know.. |

When we increase the number of iterations, the curve gets denser, but the points representing the pitches move less and less. As the number of iterations approach infinity, the pitch-points approach specific points on the square. I don't have a complete understanding of the math, but it seems to me that four of them (E, G#, and the two Cs) approach the corners, six of them (C#, F, G, A, and B) approach the centers of the sides, and three of them (D, F#, and A#) approach the center. At sufficiently high resolution, you wouldn't be able to see the difference between some very different chords, and the D augmented chord would look like a single point in the middle.

Ok, not a good visualization of the chromatic scale. A plain circle is much better. Or even just a keyboard.

## No comments:

## Post a Comment