Saturday, January 15, 2022

Tuning Tangle

The appearance of orderly structure in the world is a fascinating puzzle. Mathematics studies the properties of orderly structures. Are mathematical objects features of the world, or features of our minds? Do the mathematical regularities we see in the world appear just because that's how our minds process sensory data? Aren't our minds part of the world, anyway?

The vision of the world as mathematically structured is traditionally credited to Pythagoras. One of the cornerstones of this vision is the notion of musical consonance as mathematically structured. Music is built from consonant intervals, the relationships between tones that sound good together. Musically consonant intervals correspond to mathematically simple integer frequency ratios. An "A" pitch with frequency 440 Hertz and the "A" pitch an octave higher, with frequency 880 Hertz, have the frequency ratio 2:1. The 440 A relates to the 660 E that is a perfect fifth above it, with a frequency ratio of 3:2.

Musically, a song is a pattern of notes that are related by a variety of such consonant intervals. Of course songs also involve rhythmic patterns etc., but here I am just focusing on harmonic patterns.

Patterns arise in many ways, but generally they are the outcome of some sort of process. For example, tree rings appear from the varying growth rate of the tree through the regular changing of the seasons. Another kind of pattern arises as liquids cool and solidify. A quick cooling will form finer grained crystals; slow cooling allows the crystals to grow larger. Thermodynamic phase transitions, such as freezing and melting, are a rich field for the study of how order can emerge spontaneously. Musical patterns can be generated by thermodynamic simulation; consonant clusters of notes, such as chords, are similar to crystals that emerge from the process of freezing.

The algorithmic composition method I describe here relies on thermodynamic simulation to choose the pitches to be played at each time. The simulation works with a matrix of points at which a pitch is to be played. This matrix defines connections between such points. Pitches to be played at the same time are connected; pitches played at successive times are connected. Musical patterns generally have a structure of repetition and variation. The matrix is constructed with a fixed repetition structure: connections are made between pitches played at the corresponding points in successive cycles of repetitions.

Thermodynamic simulation is driven by temperature as a key control parameter. Degrees of consonance correspond to energetic possibilities. At high temperatures, pitches are chosen relatively freely; only the most dissonant choices are discouraged. At low temperature, only the most consonant choices are allowed between connected points in the matrix. Initially the points in the matrix are assigned random pitches. The simulation begins at a very high temperature, and then gradually the temperature is reduced. The pitches in the matrix are randomly reassigned again and again. Gradually patterns of mutual consonance begin to emerge.

While the temperature is still quite high, very little orderly structure has emerged: 118edo 3x3x3x3x3 1.

A graphical score also shows a lack of structure:

Here the vertical axis is the pitch, and the horizontal axis is time.

A slow cooling process will allow long range order to emerge, so eventually the entire matrix becomes consonant: 118edo 3x3x3x3x3 22

At an intermediate temperature, there can be fluctuations within an overall harmonic framework, a balance of order and variation that approaches musicality: 118edo 3x3x3x3x3 13

The harmonic movement here is quite limited. One avenue that can open up a richer harmonic landscape is the introduction of tempered tuning. The tuning used here divides octaves into 118 equal steps (118edo), instead of the conventional 12 equal steps (12edo) of a piano. Dividing octaves into some moderate number of equal steps is a practical way to organize the set of pitches used in a composition. If the pure rational intervals such as the perfect fifth 3:2 and the major third 5:4 are used, these can be combined in an infinite number of ways. If the number of equal steps per octave is chosen carefully, good approximations for these pure intervals are available: four steps of 12edo is 1.2599, quite close to the pure 1.25. 38 steps of 118edo is a frequency ratio of 1.2501, imperceptably close to the pure 1.25.

Another feature of these tempered tunings is that the infinite number of ways to combine the fundamental consonances will give only a finite number of results, within an overall pitch range. A given interval can be constructed from multiple combinations of fundamental consonances. For example, in 12edo, a major third can be reached by moving four perfect fifths up and then down two octaves. Each tuning has a different pattern of such combinational coincidences. A Tonnetz diagram provides a useful summary:

In this diagram, the octaves are omitted. E.g. all the ways to play a "C" note in various octaves are all represented as just "C". This diagram is for the 118edo tuning, so instead of the usual 12 note names like "C", "C#", etc., the numbers 0 to 117 are used.

The repeating structure in this diagram, e.g. the multiple occurrances of the 0 pitch, are a result of the tempering of the tuning. E.g., moving by 8 perfect fifths and then a major third will result in the same pitch where one started (moving as many octaves as needed). This property of tempered tunings introduces the possibility of loops in a compositional structure. The Tonnetz diagram shows that loops in 118edo need to be quite long: there are no short paths from a 0 pitch to another 0 pitch in the diagram.

The compositional matrix used above was given a repetition/variation structure of a five dimensional torus with circumferences uniformly size 3. This created a large space but where no large loops will easily arise. Another large compositional space is a two dimensional torus with circumferences size 18. The compositional torus can easily accommodate tuning loops as long as 18 measures. This is long enough that several loops in the tuning space can fit.

Starting the thermodynamic simulation from a random pitch assignment and gradually cooling, these sorts of tuning loops will tend to get trapped in the matrix. When the system is cooled to a very low temperature, the tuning loops remain: 118edo 18x18 cold.

The harmonic movement makes even this very orderly pattern somewhat interesting. At a moderately higher temperature, there are short term fluctuations together with long range movement, producing a composition that is even more musical: 118edo 18x18 10.

Friday, January 7, 2022

Science without Progress

There's a notion of science for which progress is essential to science. Science is a process of steadily broadening, deepening, and refining our knowledge about the world. It's a process of steady improvement. This year's science is better than last year's science, and next year's will be better yet. Whether this process converges on some ultimate theory that captures precisely the way things are, that's a bit beside the point. The sequence of integers 1, 2, 3, etc. steadily get bigger, without ever converging on some final largest integer.

For this kind of steady progress to be the way science works, two things must be true. First, we need a way to compare our scientific knowledge at one time to our scientific knowledge at another time. We need a way to tell which state of scientific knowledge is better. Once we have that measuring stick, then we can at least check empirically whether science is constantly improving. We can develop some kind of model of the evolution of scientific knowledge, and check whether at least the model guarantees continual progress into the future.

It's easy to sketch out a model of the evolution of scientific knowledge that implies perpetual progress. Such a model may not be accurate, though! A major question in examining the dynamics of science is its coupling with the world outside science, with social, ecological, and geological systems. Science is a social institution, intimately connected with the rest of society. When sources of funding, materials, equipment, and personnel dry up, science cannot thrive.

One measure of the state of scientific knowledge is the size of the total accumulation of scientific publications. As long as some library somewhere continues to accumulate the mass of literature, as long as scientific literature is not lost, then scientific knowledge will continue to advance, by this measure.

There are two problems with this logic. First, it is unreasonable to expect all scientific literature to be preserved in perpetuity. It's not even clear what exactly should count as scientific literature. Parapsychology, the study of phenomena such as telepathy, is an example of a discipline whose scientific status has been debated. Should raw data accumulated by scientific instruments count as scientific literure? As our boundary that defines scientific literature changes, our measuring stick to detect progress is being updated. We don't have a consistent measure by which to determine whether science progresses consistently.

Even if we maintained a constant definition of what should count as scientific literature, it is not reasonable to expect all such literature to be maintained in perpetuity. There is some expense involved in preserving information. There is additional expense involved in converting old literature to new formats. Not all printed literature is scanned to digital form. Digital formats are steadily changing, and obscure literature will generally be given a low priority for format conversion.

Even if a record of some coherent piece of scientific knowledge has been preserved in a library somewhere, it can easily happen than no one is alive any more who can make any sense of it. The papers involved may easily refer to scientific instruments that no longer exist, for example.

One can slog through endless such details to determine whether scientific progress is inevitable. In the face of impending climate catastrophe and the profound social upheavals that will bring, the idea that science will somehow weather the storm despite all the challenges... perhaps no amount of detailed argument will convince a true believer!

If progress is essential to science, but if progress is not a secure ground on which to build... must science then crumble, too? Can science survive and even thrive without progress? Is progess, after all, essential to science?

It is a vital project to develop a vision of science that does not depend on progress. We in that part of the world that supports science are at grave risk for a major decline in our general level of prosperity. Science will participate fully in the trajectory of decline and collapse. If we can maintain a thriving science despite that decline, our ability to cushion that decline will be significantly enhanced. We will be better able to respond to recurring crises in medicine, agriculture, etc. If the scientific community cannot find a way to dance with circumstances, we will all suffer from that failure.

An analogy should be useful in developing a vision for science that doesn't depend on progress. Darwin's theory of evolution shows how species are constantly adapting themselves to their circumstances. The steady extension and refinement of scientific knowledge is similar to biological evolution. But biological evolution does not imply any kind of progress. Species today are not more advanced or better adapted than were species ten million years ago. Species ten million years ago were reasonably well adapted to their circumstances back then, which were very different than the circumstances of species today. Some of these changes are surely geological, but they are largely due to the interdependence of species, the nature of the ecological web. When one species develops some new characteristic, that changes the circumstances of other species, pushing them to adapt in new ways. There is no fixed measuring stick by which to determine whether one species is more advanced that some other species.

When we dream of some ultimate scientific truth and view science as a path leading to that goal, progress seems to be essential to science. But if we understand science to be a practical approach to engaging with our experience, enabling us to respond more effectively to our circumstances, then it becomes natural that our scientific knowledge must shift and adapt as our circumstances change.