Site Tools


sound_of_space-filling_curves_0

Herman Haverkort > Recursive tilings and space-filling curves > Sound of space-filling curves > Sound of space-filling curves 0

The sound of space-filling curves 0

Turning-function mapping: sonifying the twisting and recursive structure of plane-filling curves

This approach to sonifying plane-filling curves is one of several approaches I have explored. For the other approaches, please click here.

Turning-function mapping, explored on this page, was pioneered by Tom Johnson in several works (writings and musical compositions). For references and some further theoretical analysis you may want to have a look at:

  • The sound of space-filling curves.
    By Herman Haverkort.
    Technical report, Eindhoven University of Technology, 2017.
    full report (a shorter version was published in Bridges, but for a reasonable discussion of Johnson's work, you need the full report).

This web page contains a number of sound tracks based on turning-function mapping. Admittedly, this page is rather rudimentary, lacking figures in particular. I might work on it later, but for now: if you do not understand what is going on here, it might help to have a look at the aforementioned report or at my location-mapping approach first.

Turning-function mapping

The composer Tom Johnson wrote music based on the Heighway dragon curve, by encoding the left and right turns of a sketch of the curve as follows: at a left turn, move up in pitch; at a right turn, move down in pitch. This turns a traversal of the curve into a sound track that does not give the listener a sense of location the plane, but instead gives a sense of how much the curve spirals in and out while filling the plane. Because the sketch only defines one voice, it is relatively easy to overlay sketches of different refinement levels. (Johnson appears to do this in Formulas for String Quartet, part 7.) Below I apply such techniques to the Hilbert curve.

Hilbert curve sampled at square centre points and connecting points

We sketch the path of the Hilbert curve through a grid of 4k squares by drawing, in each square, a line segment from the point where the space-filling curve enters the square to the centre of the square, and from the centre of the square to the point where the space-filling curve leaves the square. In the sound track I overlay sketches for k = 1, 2, 3, 4, 5, played by five voices centred around G1, G2, G3, G4 and G5 respectively.

Only the first half of the curve is rendered. The coarser, and therefore shorter, sketches (k < 5) are spaced out with rests to remain synchronized with the most detailed sketch (k = 5). The sketches for k = 4 and k = 5 are truncated at the beginning and the end of the track, starting later and ending earlier than the other sketches. Phrasing is achieved by voices swapping sketches in a regular pattern, and by a regular progression of soft chords in the background (these are the only notes not determined by the space-filling curve). Dynamics are determined by location in the plane, getting louder when moving in the direction of the point half-way the rendered section of the curve, and softer when moving away from it.

Hilbert curve sampled at square centre points

Five levels of refinement

Below I start from a sketch of the Hilbert curve through a grid of 4k squares in the style of Hilbert himself: the sketch connects the centres of the squares in order. In his book Self-Similar Melodies, Johnson also proposes to use this style, and gives the melody (in abstract form, without a concrete scale) for k = 3. In my sound track I overlay sketches for k = 2, 3, 4, 5, 6, played by five voices centred on D2, A(!)3, D4, D5 and D6 respectively.

The top three voices use a pentatonic scale with D, E, F♯, A and B; the fourth voice uses a pentatonic scale with G, A, B, D, and E; the fifth (bottom) voice additionally includes C2 in the scale. The coarser sketches (k < 6) are stretched so that they synchronize with the most detailed sketch (k = 6). The sketch for k=6 is rendered at 7.5 notes per second, the sketch for k=2 has notes of more than half a minute. In the beginning of the sound track, the five voices enter one by one: this is because each sketch starts with an edge from the first square to the second, and it is only after half a minute that we reach the second square of the 16 squares represented in the coarsest sketch. The final chord represents a line segment that would connect the whole unit square to another square to the right of it.

Loudness is determined by distance (according to the L-metric) to the end point. Changes in relative volume of the voices and instrumentation (decaying versus sustained notes) are used to emphasize or suppress sketches for certain values of k in certain sections of the sound track. The melodic “climax” is reached after approximately 7.5 minutes, when the finest sketch completes a 540 degrees' turn to the right, taking it up to E7; a few seconds after that, the coarsest sketch completes it 180 degrees' turn to the right to enter the 14th of square of 16. In some sections in the last two squares, some voices are amplified by high or low “bells”. In the final square, voices swap sketches among them, ultimately moving the finest and fastest sketch down to the bass voice, to obtain a satisfactory closing.

All notes in the sound track linked above are space-filling curve notes; no hand-composed notes have been added. To get a pleasant sequence of harmonies, all I did is choosing the different scales for the different voices carefully.

Three levels of refinement

The track below plays the basic chords of the previous track as they emerge from the lowest three voices (that is, the sketches for k = 2, 3, 4), but a lot faster, and without the higher levels of refinement. Loudness is determined by distance to the centre of the third quadrant. I could not resist adding a supporting voice between the lowest voice and the middle voice in the last quarter of the track, and a rallentando in the last 1/16th part:

Peano curve

The track below plays the Peano curve, sampled at the centre points of the squares in the first four levels of refinement (94=6561 points). The pitch mapping is as follows (pitches representing the initial/final direction in bold): first level C2 F2 B♭2; second level C3 E3 G3 B♭3 C4 D4 F4; third level G3 B♭3 C4 D4 E4 F4 G4 A4 B♭4 C5 D5; fourth level C4 D4 E4 F4 G4 B♭4 C5 C♯5 D5 E5 F5 G5 A5 B♭5 C6. Volume decreases with L-distance to the corner that is reached at 3/4 of the track. As usual, consecutive notes at the same pitch are merged into one. No further tricks. Hear the curve rock or meander its way on multiple levels to the centre of the square, turning inwards by 720 degrees and up to C6, and then on to the corner at three quarters, after which the track finishes gently with a decrescendo repetition of the beginning.

Meander curve

The Meander curve, sampled at the centre points of the squares in the first three levels of refinement, gives a nice melody with an interesting metre. Pitch mapping: first level B1 D2 E2 G2; second level C♯3 D3 E3 F♯3 G3 A3 B3 C(!)4; third level F♯4 G4 A4 B4 C♯5 D5 E5 F♯5 G5 A5 B5 C(!)6.

sound_of_space-filling_curves_0.txt · Last modified: 2023/01/01 14:19 by administrator