I am exploring different approaches to make sonifications or music of space-filling curves. This page contains a number of sound tracks of space-filling curves, mapped to sound using proximity mapping. For an introduction into space-filling curves mapped to sound using proximity mapping or other techniques, please check out the main page first. Below, I provide more details of the mapping, and some additional examples that may be interesting.
For ease of description, consider a d-dimensional self-similar space-filling curve f: [0,1] → [0,1]d (however, the approach below can also be applied, mutatis mutandis, to non-continuous traversals). We traverse the curve, that is, the values f(t), from t=0 to t=1, sampling it at a set T⊂[0,1] of n uniformly spaced values of t. When we are at a specific value of t, we generate a tone for each other point f(t′) with t′∈T, generating louder tones for points that, together with f(t), define pairs for which the space-filling curve does not preserve locality well. So in total, we generate roughly |T|² tones: there are |T| time steps t, and in each step, we superimpose |T|−1 tones, one for each pair (t,t′) with t≠t′.
Frequency: the generated tone for the pair (t,t′) is 24·sin(½π(t−t′)) semitones above C♯4 (so it will be between C♯2 and C♯6). For some sound tracks, I round the frequencies to discrete values.
Amplitude: let r be the Euclidean distance between f(t) and f(t′), and let V be the volume of a d-dimensional sphere with radius r. One could argue that in a hypothetical ideal locality-preserving space-filling curve, all points of that sphere would be covered by the curve section from f(t−½V) to f(t+½V). Therefore, we can say that f(t′) is “too far away” along the curve by a factor |t−t′| ⁄ (½V); we denote this factor by s. We now map this factor to an amplitude of, in principle, 0.01·cap(αs²), where α is a parameter that controls the sensitivity of the mapping (in practice, I used α=0.005 or α=0.05), and cap(x) = x ⁄ (1+x) is a function that dampens higher values so that the amplitude stays below 0.01. However, within distance r, there will be a number of points proportional to rd that generate waves of similar frequency and amplitude, and, unless they are somehow in phase, they will add up to a sound with an effective amplitude that is a sublinear but still rising function of rd. If we would not compensate for that, points farther away would completely dominate the sound track due to their sheer number. Therefore, for each point f(t′), we divide the amplitude by rβd; so far I got best results with β=1/2 if frequencies are rounded to discrete pitch values1), and with β=1/3 if they are not2). Finally, a correction is applied to compensate for the fact that our ears are less sensitive to lower frequencies: for frequency x we multiply the amplitude by (4 ⁄ log2(x ⁄ C0))1.2, where C0=16.35 Hz is considered unhearable, theoretically requiring an infinite multiplication of amplitude.
Phase: to prevent unintended interferences, a random phase shift is applied to each tone.
Timbre: for the six- and seven-dimensional curves, I used a somewhat richer timbre than for the three- and four-dimensional curves, where the timbre seems to be naturally richer, possibly due to the higher affordable spatial resolution and depth of recursion in the sampling of lower-dimensional curves.
Note that this mapping has two important consequences that can easily be recognized in the sound tracks.
Below are two sets of examples. The first set is just a showcase of nice tracks. Most of these seem to be atonal, with pitch mapping as described above, without rounding. However, for the three-dimensional Z-order traversal, I found that the track was dominated by tones around a limited number of pitch classes, and that these sounded better by rounding them to equal-temperament pitch classes, so that is what I did. The second set consists of five six-dimensional traversals, roughly ordered from smoothly (and quite boring) rising sound at the top to less-smoothly rising and melodically more interesting sound at the bottom. Does this correspond to an ordering by locality-preserving properties? All space-filling curves and traversals are described in my manuscript on higher-dimensional curves.
mp3 | traversal | recursion depth | points | points/second | sensitivity α | comments |
---|---|---|---|---|---|---|
Meurthe, 3D | 3 | 19,683 | 36 | 0.05 | long melodic phrases | |
Z-order, 3D | 5 | 32,768 | 60 | 0.005 | melodic and tonal | |
Peano, 4D | 2 | 6,561 | 40 | 0.05 | rolling waves | |
Z-order, 7D | 2 | 16,384 | 60 | 0.005 | steady train | |
Beta Hilbert, 7D | 2 | 16,384 | 60 | 0.005 | rising beats over an ostinato |
mp3 | traversal | recursion depth | points | points/second | sensitivity α |
---|---|---|---|---|---|
Beta Hilbert, 6D | 2 | 4,096 | 60 | 0.005 | |
Butz-Hilbert, 6D | |||||
Base-camp Hilbert, 6D | |||||
Inside-out traversal, 6D | |||||
Z-order traversal, 6D |