Wednesday, July 31, 2024

Interval Space Randomness

This article investigates the nature of "randomness" in music, specifically concerning pitch and tuning systems. I argue that true randomness is rarely achieved, even when using seemingly arbitrary number sources. Through examples and compositional analysis, I will demonstrate how traditional musical concepts continue to influence even the most unconventional pitch choices. The exploration includes the construction of diverse "random" scales, their integration within established music theory, and the impact of measurement challenges on our perception of randomness.

Defining Randomness?

Common responses to inquiries about randomness or aleatority include:

-"Unpredictability of future events."
-"Absence of discernible patterns or order."
-"Reliance on chance and luck."
-"Equal probability of all outcomes."
-"Chaos, lacking apparent causality."
-"Statistical independence of events."
-"Manifestation in natural phenomena (e.g., weather, genetic mutations, dice rolls)."
-"Fundamental aspect of quantum mechanics (e.g., particle behavior)."

These diverse responses reflect varying perspectives and levels of understanding.  Individuals draw upon their experiences, education, and the specific context in which they encounter randomness.  For example, a statistician might emphasize probability, while a physicist might invoke quantum mechanics.

In essence, randomness is a multifaceted concept intersecting diverse fields of knowledge and human experience.  It challenges our notions of predictability and order, serving as both a source of complexity and a catalyst for creativity.

Defining Musical Tuning Systems

Just as the concept of music defies singular definition, so too do tuning systems.  A traditional definition might be: a predefined set of pitches available for musical creation and performance.

Tuning systems are often defined by their generation process: a set of rules or algorithms that produce a finite set of pitches.  For example, the Pythagorean scale, which yields 12 notes, involves one algorithm for note generation and another for application, the latter often constrained by the instrument's range.  This application typically involves a period of repetition, most commonly the octave, also known as the interval of equivalence or "equave."  The equave represents the most "informative" interval within the set.  For instance, 12-tone equal temperament (12-EDO) offers multiple intervals of repetition, but the octave division is the most intuitive.

Some systems, like the harmonic series, may lack a defined period, as each successive "period" introduces additional notes (e.g., 1, 2, 3, 4, 5, 6, 7...).

Numerous generation processes exist, accompanied by a variety of justifications for their "validity."  The standard 12-tone equal temperament, for example, has multiple origins and rationales.  The Pythagorean concept of rational number metaphysics persists as a common explanation, despite the inherent "comma" (the misalignment of exponential sequences of 2 and 3).  Modern theories often attribute the perceived "goodness" of the 12-tone scale to its approximation of rational intervals involving small prime numbers (3 and 5), though this is a fragile concept.  A more robust explanation involves modern consonance models, which consider the complex timbre of sounds like the human voice or plucked strings.  These sounds, rich in harmonics (integer multiples of the fundamental frequency), are analyzed through perceptual consonance models based on the beat effect, resulting in a dissonance curve.  Applied to harmonic timbres, the minima of this curve align with the pitches of the 12-tone system. 

This level of abstraction is crucial for isolating the principle and context of "randomness."  By focusing on the "object" as a source of numbers or proportions, we can analyze it more effectively.  While numbers may be sourced from various mediums and interpreted as random (even if they are not), the impact of precision and error becomes a key consideration.  Furthermore, the extent to which a set of values can be "randomized" by a single defined rule warrants investigation.

Representing a set of numbers as proportions offers the advantage of base-independence.  For example, when constructing a set based on the sizes of solar system objects, the specific unit of measurement (meters, inches, etc.) is irrelevant.  The proportional relationship between objects, such as the moon's approximate quarter-size relative to Earth, remains constant. By normalizing to one value within the set, and because we will be creating periodic systems, any value as base renders the same set. (We will also create other types, non-periodic).

Examples of "Random" Scale Generation

The following examples illustrate the creation of musical scales using "random" numbers derived from various sources. These examples demonstrate how even seemingly arbitrary number sources can generate musically coherent results, further supporting the argument that true randomness is elusive in this context.

Planetary Data and the "Music of the Spheres"

The concept of the "music of the spheres," associating celestial bodies with musical harmony, has resonated across cultures, from ancient Greece to pre-Columbian America. While some specific examples of simple harmonic ratios exist in celestial mechanics (e.g., orbital resonances), many planetary properties do not readily translate into easily recognizable musical intervals. This section explores the creation of musical systems based on planetary data, examining whether these seemingly arbitrary values can generate musically meaningful results.

Scales were constructed using data from NASA (2018), specifically:

- Average surface temperature
- Orbital period
- Planet size (including the Sun)

Pitch generation employed octave equivalence. For example, in the planet size (diameter) scale, values were normalized relative to Earth (Earth = 1). The Sun's diameter, for instance, is approximately 109 times Earth's. These normalized values were then octave-folded into the range of 1 to 2 (representing Earth to "2 Earths") and then duplicated to cover the audible or instrumental range. This process was repeated for the other planetary properties.

The resulting music reveals that these seemingly arbitrary values can generate surprisingly stable chords and progressions, sometimes even exhibiting a clear tonal center. Most remarkably, the scale derived from planetary sizes contains a fully functional pentatonic blues scale, inspiring the track title "The Astrocaster Blues." This suggests a deeper, perhaps unexpected, connection between planetary proportions and familiar musical structures.

---

Video.01 Description: "Astrocaster Blues"

 

This video showcases the planetary diameter data used to calculate the pitches for "Astrocaster Blues." It displays the numerical values and visualizes the scale construction process.

A prominent feature of the video is a pitch dial, displaying a single octave for each instrument (piano, guitar, and bass). This allows viewers to clearly see the interactions of chords and the intervallic relationships within the scale as the music is played.

The most striking aspect of this scale is the presence of a fully functional pentatonic blues scale. This led to the lighthearted observation that the search for extraterrestrial life might be best focused on solar systems with a high potential for blues musicians. The irony is that, within this planetary-diameter-derived blues scale, Earth itself is assigned the "bluesy" microtonal inflections. While the pitches are normalized relative to Earth's diameter, the tonal center of the music gravitates towards Saturn.

-----

Video.02 Description: "The Dance of Entropy"

"The Dance of Entropy," based on planetary temperatures, is a waltz-like composition with a distinctly 18th-century European neoclassical orchestral vibe. The addition of a bandoneon, however, infuses the piece with a touch of tango, creating a unique blend of styles.

This video provides a visual representation of the scale constructed using planetary temperatures and the resulting musical composition, "The Dance of Entropy." It clearly displays the planetary temperature values used in the scale's construction, along with a step-by-step visualization of the process itself.

A key feature of the video is a "planet grid-keyboard" that illuminates the notes as they are played. This allows the viewer to directly observe the consonant relationships within the scale and identify the tonal center of the music.

It's important to note that the order of the planets on the grid-keyboard does not correspond to their spectral order within the solar system. The octave folding process used to create the scale results in a different arrangement of pitches. As with other planet-based scales in this work, Earth is used as the base for normalization. However, because these systems are periodic, the choice of base is inconsequential; the resulting musical relationships remain consistent regardless of which planet is used as the reference point. The scales are not geocentric in any meaningful sense.

-----

"Soles Mortem," using orbital periods, produced the least consonant of the three scales. While it still contains numerous usable chords (as demonstrated in the audio example), identifying a stable tonal center within traditional musical frameworks proved challenging.

-----

Order or Chance?

The question arises: is it even possible to encounter a scale derived from planetary data that is truly unusable? The consistent emergence of musical coherence from these seemingly "random" sources suggests that, even within the vastness of space and the complexity of celestial mechanics, underlying order and harmonic potential may be far more prevalent than one might initially assume.

Clearly, these planetary data do not conform to the strict definition of randomness—"all outcomes have equal chance"—as the number and sizes of planets within a solar system are inherently constrained. The question remains: is it randomness, or simply a form of order we have yet to fully comprehend?

Furthermore, the near-uniform distribution of these values within the octave raises another crucial point. Why is it so difficult to find a set of "random" numbers that, after octave folding, reveals only near-octave values or a cluster of notes that lack any tonal meaning? Is this simply a matter of chance?

It's unlikely. The consistent emergence of usable musical scales from diverse "random" sources, including planetary data, suggests that there's more at play than mere coincidence. The constraints of human hearing, the inherent properties of number relationships within a bounded space (like the octave), and perhaps even deeper, undiscovered principles of harmonic organization seem to guide the formation of musical structures, even when starting from seemingly arbitrary data. The "randomness" we perceive may be, in fact, a manifestation of underlying order that we are only beginning to understand. The universe, it seems, may be inherently musical.

-----

The Riemann Zeta Function

The Riemann Zeta function, a complex-valued function with deep connections to number theory, was used to generate a set of pitches for musical composition. The imaginary parts of the Zeta function's zeros, while not truly random, exhibit statistical properties that make them a suitable source of seemingly random numbers. Unlike previous examples that focused on selecting a small set of values and applying a fixed interval of equivalence (like the octave), this approach directly utilized 28 consecutive imaginary parts of the Zeta function's zeros. These values were interpreted as cents and directly applied to control synthesizer pitches.

Octaves, in traditional periodic tuning systems, provide confinement for the total pitch availability. Knowing that any interval present in one period is found in the next (up or down, depending on the instrument's range) allows for predictability, manageability, and perceptual substitution of pitches. The scale constructed with Riemann Zeta function values doesn't inherently contain octaves. Any octaves, or approximations thereof, that appear, do so by chance, as do other consonant intervals. This absence of a pre-defined octave is a key element of the experiment, challenging conventional notions of consonance and scale construction.

The deliberate omission of a defined equave or period of repetition makes the results particularly intriguing. As demonstrated in the audio example below, the resulting music, while using an unconventional scale, sounds surprisingly "normal." It rarely registers as overtly microtonal. Instead, it possesses a rock-folk-like quality, suggesting the use of unusual but not entirely foreign scales. It certainly does not sound atonal or xenharmonic. Clear, recognizable chord progressions emerge readily, and consonance is not compromised across a wide range of timbr


(Zeta function 28 notes music)

The timbres, all synthesized, contribute to a rich sonic spectrum. The distinct harmonic characteristics of the synthesized guitar and strings create clear timbral differentiation. Some instruments handle otherwise dissonant intervals more gracefully than others. The guitar, with its inherently harmonic timbre, serves as a kind of consonance "stress test." If an interval sounds good on the guitar, it generally passes a basic consonance check, even if that consonance is subjective. Essentially, if it sounds good on the guitar, it's likely to be perceived as consonant.

The resulting musical texture underscores the central point: these values, derived from a complex mathematical function, do not sound as "random" as one might initially expect. The emergence of familiar musical elements, even without a pre-defined tonal framework, suggests an underlying order and reinforces the idea that true randomness is elusive in musical contexts.

Interval Matrix for the Riemann 28 note Scale

-----

The Question of Randomness

The observation that simple octave folding of seemingly random values consistently leads to relatively uniform interval distributions, often guaranteeing a degree of tonality, raises fundamental questions about the nature of randomness itself. It forces us to reconsider not only the "randomness" of our chosen values but also the "randomness" of our conventionally accepted methods for scale construction.

A previous study [link] analyzing the Scala Archive (a vast library of over 5000 world tunings) revealed a striking phenomenon. Generating random pitch sequences using even simple pseudo-random number generators (like those built into web browsers) often resulted in scales that closely approximated (within ±10 cents) or even perfectly matched existing scales in the archive. These archived scales, of course, have established origins, structures, and "mathematical justifications."

This finding is significant. It suggests that what we perceive as "random" in the context of pitch spacing may be less random than we think. The inherent properties of number relationships, coupled with the constraints of human hearing, appear to guide the formation of musical scales, even when starting from seemingly arbitrary data. This raises a profound question: what, then, is true randomness, at least within the realm of musical pitch and human perception?

The Challenges of Measurement and Their Impact on "Randomness"

As previously discussed, some "random" number sources, such as the output of random functions, were used directly without imposing a specific period or equave.  For instance, one scale was derived directly from the zeros of the zeta function, with values interpreted as cents.

Other sources, like planetary properties (e.g., sizes interpreted as Hertz values), required a different approach.  Scales were constructed from a fixed set of values (e.g., ten planetary sizes).  However, to expand these sets to a wider pitch range, a rule for extending the values was necessary.  While the planetary sizes themselves might be considered a source of "randomness," the choice of how to extend their range (e.g., by octave transposition) could introduce additional bias.  Simply using octaves based on Earth's values, while seemingly logical, doesn't constitute a purely "random" approach.  Compositions were created based on various planetary properties, like size, temperature, and rotation, including their octave transpositions.

A more complex challenge arose with data from sources like mountain heights.  Using the "fourteeners" (the tallest Himalayan mountains), the very definition of height became problematic.  The influence of sea level, for example, significantly affects perceived height.  The same mountain, measured from different baselines, will have different proportional heights relative to other mountains, even though the absolute difference in height remains constant.  This necessitated the introduction of both an equave and a sea-level reference point.  Music based on these mountain heights has also been composed.

(Himalayan 14 periodic notes music)



Images Description:

This image visually represents the process of constructing the Himalayan tuning scale. The fourteen highest peaks in the Himalayas (the "fourteeners"), a list derived from mountaineering tradition and historical convention rather than strict geological definition, are depicted as individual rectangles, arranged horizontally to illustrate their relative heights above the 8000-meter mark (indicated by the red baseline). It's important to note that these peaks are geographically dispersed across the Himalayan range; their proximity in the image serves only to convey their height relationships. The inherent ambiguity in defining a "peak" (as opposed to a sub-peak or shoulder of a larger mountain mass) is also acknowledged, highlighting the challenges in establishing a definitive list.

Below the height representation, the image demonstrates the octave duplication process used to extend the scale. While the typical method involves octave folding the initial set of mountain heights into a single octave and then duplicating that octave, the image illustrates an alternative, but mathematically equivalent, approach: multiplying and dividing the original heights by powers of 2 to generate octaves, and then selecting the results that fall within the audible range. The duplicated heights are marked on the image, and some may visually align with other mountain silhouettes in the background. These background mountains are purely illustrative; the fourteeners (shown in white) are the primary focus of the scale construction.

The resulting music evokes the epic and adventurous spirit often associated with the Himalayas, reflecting the grandeur and challenge of these mountains.

The choice of sea level appeared to be a more significant factor in altering the proportional relationships within the scale than the choice of octave.  Small changes in sea level resulted in drastically different proportions between mountain heights (whether analyzed in octave space or any other proportional space).  While all combinations of the 14 mountain heights were theoretically possible, certain proportions became more probable than others due to the influence of the chosen sea level.

Illustrative Examples: Normalization and Equivalence

To illustrate the impact of these measurement choices, consider a simplified example.  Let's start with a set S = {2, 800, 1040}.  We can normalize this set by choosing a base value (e.g., 2) and dividing all elements by that base: S(base:2) = {2/2, 800/2, 1040/2} = {1, 400, 520}.

Next, we can create a new, reduced set by applying an equivalence relation, such as the 1:2 octave relationship.  We find representatives of 400 and 520 within the octave range (1 to 2).

400 / 2^8 = 400 / 256 = 25/16

520 / 2^9 = 520 / 512 = 65/64

The minimal generating set in octave space becomes {1, 65/64, 25/16, 2}.  This set preserves the original proportions of S within the octave.

With unambiguous measurements (like planetary sizes), this process works well.  However, with context-dependent measurements (like mountain heights), changing the sea level alters the proportions, rendering the normalized set no longer representative of the original relationships.  For example, adding a constant delta of 150 to each element of S results in a completely different generating set.


The Challenge of Precise Proportional Calculations

Calculating precise proportions within a given musical space presents a significant challenge, particularly when dealing with numbers spanning vastly different orders of magnitude or when measurement precision is limited.

Let's first illustrate a scenario where this problem is less pronounced.  Consider creating a scale based on the sizes of two planets.  Assume their sizes are A = 200 and B = 1200 (in some arbitrary unit).  The first step is to normalize the values by choosing a base.  Using A as the base, we get {A = 200/200, B = 1200/200} = {A = 1, B = 6}.  Next, we define our musical space, in this case, the octave (a 1:2 ratio).  A remains at 1 (the unison).  B must be scaled to fit within the octave (1 to 2].  We divide B by 2^2 (4) to get 6/4 = 3/2 = 1.5, representing a perfect fifth.  Our generating set is {1, 1.5}.  We can extend this scale by repeatedly multiplying by 2 (within the instrument's range).

In this scenario, small variations in the initial measurements have minimal impact on the final proportions.  For example, if the measurements were slightly off (e.g., {201, 1205} or {199.32142, 1200.0000001}), the resulting proportions within the octave remain practically the same.  The generating set might become {1, 1.50003}, but this tiny difference is negligible in musical terms.  Planet B is still perceived as roughly a fifth above planet A.

The Problem of Scale and Precision

The problem becomes much more acute when dealing with values that span a vast range, such as particle energies, which can range from giga-electronvolts (GeV) to electronvolts (eV).  Measurements at these scales often have varying degrees of precision.  Consider a simplified example (not a real-world physics case) to illustrate the issue.  Suppose we have two particle energies: A = 1000 and B = 0.09155...  Normalizing to A gives us {1, 0.0009155...}.  Scaling B to fit within the octave (1 to 2] requires multiplying by a power of 2.  In this specific example, B * 2^x happens to equal 1.5, a perfect fifth.

So far, so good.  But what if the measurement of B was slightly different due to limitations in precision?  Let's say B = 0.0781 (a seemingly small difference).  Now, when we scale B to fit within the octave, we get a different result: B * 2^n = 1.25, a major fourth.  A tiny change in the initial value of B has resulted in a significant change in the musical interval.

Therefore, unless we have extremely precise values for particle energies (which span an even wider range than our simplified example), we cannot reliably claim consistent proportional relationships within a musical space.  While we can say that "planet B is a fifth of planet A" with reasonable certainty, saying that "an electron is a major fourth of a muon" based on imprecise energy values would be misleading.  The inherent uncertainty in the measurements prevents us from establishing such precise musical relationships.

Nature of Musical Structure

This exploration, while seemingly trivializing historical efforts in scale creation, is not intended to diminish their significance. Rather, it builds upon the observation that the Scala Archive contains over 5000 documented tuning systems, raising the question: does everything sound good? My approach of constructing scales from random sources is primarily for inspiration. The resulting scales often either already exist within the archive or possess inherent musicality that can be further enhanced with appropriate timbral choices.

This leads to a fundamental question: what are the underlying principles that govern musical structure? Octave equivalence, periodicity (though not always present, as seen in the Riemann scale example), and a tendency towards uniformity across the hearing range, with a bias toward octave-based relationships (even when the octave is not pure), appear to be recurring themes.

But what about the diatonic and pentatonic scales? The major chord itself? Are these truly foundational elements of music, or are they primarily learned constructs shaped by cultural context and familiarity? Is there anything objectively special about the function of tonal modes or chord inversions? Or are they simply products of neurological evolution favoring harmonic timbral preferences, coupled with cultural development?

The fact that the diatonic scale appears in diverse and geographically separated cultures suggests that it may not be purely a learned construct. It likely has a deeper connection to timbre perception, as recognized by modern music theory.

The Role of Human Intervention

While the selection of pitches in the scales described above was often based on "random" sources, it's crucial to emphasize that the composition of the music was not. A human mind, with its inherent perceptual biases and musical understanding, ultimately shaped the final musical output. The composer, working within the constraints and possibilities presented by the "random" scale, makes choices about melody, harmony, rhythm, and form. This human element is essential for transforming a set of pitches into a meaningful musical experience.

This distinction is important. I've also explored algorithmic and generative music for years, both by studying the work of other artists and by developing my own algorithms. For example, this app [link] allows users to create music based on cellular automata (like Conway's Game of Life), translating cell states and coordinates into musical parameters.

While these explorations have yielded fascinating results, I've yet to discover a simple or complex algorithm that consistently generates music that sounds convincingly human. Many algorithms can create interesting sonic textures and patterns, but they often lack the expressive nuances, the sense of narrative, and the subtle irregularities that characterize human-created music. The only algorithms that seem to approach this level of "human-likeness" are those based on artificial intelligence and machine learning. These AI systems, however, operate on a fundamentally different principle than simple, rule-based algorithms. They learn patterns from vast datasets of existing music and then generate new music based on these learned patterns, rather than following a pre-defined set of instructions.

Therefore, while randomness can play a role in pitch selection, its impact on musical composition is less direct and less compelling. Human intervention, with all its subjective biases and creative insights, remains a crucial ingredient in the creation of music that resonates with human listeners. The "randomness" of the initial pitch set, in a sense, becomes a canvas upon which human musicality is expressed.

Fitting "Random" Scales within Established Frameworks

Earlier, I mentioned that these "random" scales could be understood within the context of established music theory. While the preceding examples demonstrated this through the creation of musically coherent pieces, the underlying framework deserves further explanation. The sheer existence of the Scala Archive, with its thousands of diverse tuning systems, provides compelling evidence that, in a broad sense, "anything works" musically. However, we can be more specific about how these "random" scales relate to established theoretical frameworks.

Modern music theorists have explored dividing the octave into an increasingly large number of intervals, often with the goal of cataloging and analyzing scales that more closely approximate specific intervals of interest, such as perfect fifths. However, the limits of human pitch perception must be considered. The just noticeable difference (JND) for pitch, averaging around 10 cents in the central hearing range, means that many of these highly refined scales contain distinctions that are imperceptible to the human ear. What, then, is the practical purpose of constructing scales with hundreds or even thousands of divisions per octave if these microtonal nuances are not perceivable? Such explorations are, of course, valuable from a theoretical standpoint, but their direct relevance to musical practice is less clear.

This framework of highly granular octave divisions, however, provides a context for understanding how our "random" scales can be "fitted" into established musical thinking. Any of these randomly generated tuning systems can be considered a subset of a highly divided equal temperament (e.g., 100-EDO or even less). For example, analysis of the Riemann Zeta function scale using an interval matrix reveals that numerous 12-EDO approximations (within ±15 cents) are present at various transpositions. This demonstrates that even seemingly arbitrary number sources can generate scales that, upon closer examination, relate to familiar tonal structures.

This brings us back to the central question: what constitutes "random numbers" in this context? If even "random" data can be mapped onto existing musical frameworks, are we truly dealing with randomness, or simply exploring different facets of a deeper, underlying order?


EXTRA:

Color Attractor Spectral Location and Wavelength-Derived Musical Scales

Historically, attempts have been made to establish connections between the musical and visual domains. Isaac Newton famously associated the colors of the rainbow with musical notes. Despite the prevalence of equal temperaments, such as the 12-tone system, during his era, Newton's pitch calculations were rooted in Pythagorean metaphysics and rational harmony. However, the challenge of consistently aligning scales, intervals, and light wavelengths with musical octaves prevented the development of a definitive model.

This part of the study adopts a reverse approach, constructing musical scales based on the spectral locations of color attractors rather than imposing existing musical structures onto the light spectrum. These hues, identified as "best exemplars" in color science literature, exhibit notable individua internal consistency across studies. The derivation of scales from these data points reveals remarkably stable musical structures, distinct from the rational intervals sought by Newton, yet no less compelling.

This section presents short musical examples based on tuning systems derived from the wavelengths of color attractors reported in color science literature.

It is crucial to note that wavelengths, measured in nanometers, are part of a human-defined measurement system. The scales presented here are not constructed by directly mapping nanometers to frequencies (Hz). Instead, they are based on the proportional relationships between color attractors, abstracting away from specific unit systems.

For the creation of these musical scales, wavelengths are considered proportionally relative to a base color and adapted for practical implementation on specific instruments. For example, a synthesizer may map a central tone to 261 Hz (middle C), with subsequent scale values expressed as frequency multiples to establish a periodic system. Within this framework, the perceptual spectrum functions as a torsor, where relative relationships are of primary importance.

Torsor (in the context of color): A torsor describes a set lacking a distinguished origin or zero point, yet possessing a well-defined notion of relative position or displacement. In the context of color, the set of all possible hues constitutes a torsor. The difference between two hues can be defined (e.g., "this hue is 30 degrees clockwise from that hue"), but there is no absolute "zero hue." In this context, the hues form a torsor relative to the scales (nm, Hz, cents, mocts, etc.), meaning that the relationships between hues are preserved regardless of the measurement units employed.

Mathematical Process Summary:

The concept of a torsor within the context of hues and the spectral octave can be illustrated through an example.

While color science typically employs wavelength measurements (nm) within the electromagnetic spectrum, music utilizes audio frequencies (Hz). These quantities are inversely related. Analogous to musical frequency ratio calculation from string lengths (or wavelengths), where the specific frequency value is less important than the ratio itself (assuming constant string tension), the precise terahertz values or photon energy are not directly employed here. Wavelength units (nm) are sufficient for determining proportional frequencies, calculated as inverses of the wavelengths. For example, the frequency ratio from "red" (700 nm) to "cyan" (495 nm) is calculated as follows:

Red (base): 700/700 = 1

Cyan frequency ratio: 1 × (700/495) ≈ 1.414

In the generated scales, ratios are calculated relative to red. However, given the cyclical nature of the system, the choice of base color is arbitrary; the proportional intervals remain invariant regardless of which color is chosen as the root or unison. This invariance exemplifies the torsor nature of hues.

The position, wavelength, and corresponding musical note assigned to "magenta" are derived from the observed complementary relationships. Specifically, the frequency ratio assigned to magenta is the frequency ratio of green multiplied by √2. This methodology accounts for individual variations in the spectral octave range (e.g., 370–740 nm, 405–810 nm), which are dependent on the location of the green attractor. While the graphics presented here utilize a constant 375–750 nm range for illustrative purposes, this choice reflects the torsor nature of hues.

Examples of Unique Hue-Based Scales:

  • Modern Trichromat Research: This scale utilizes median unique hue data from contemporary color vision studies on normal trichromats.
  • Tetrachromat Data: This scale is derived from studies on individuals with genetic predispositions to a fourth photopigment.

Auditory Examples:

The following auditory examples demonstrate the translation of unique hues into musical scales, revealing perceptual and structural parallels between light and sound.

...


Musical Properties of Hue-Derived Scales and the Role of Uniform Distribution

If strikingly unusual or exotic microtonal sonorities are anticipated from these hue-derived scales, their relative conventionality may be surprising. While subtle microtonal inflections may be perceptible to trained listeners, the overall impression is often surprisingly consonant with established musical practice. As previously mentioned, not only the tritone is frequently approximated by frequency ratios derived from hue data, but also other stable musical intervals, such as the major third and perfect fifth, emerge from various color combinations. The resulting scales exhibit major and minor chords, and each scale features varying degrees of consonance with other traditional intervallic relationships, corresponding to intervals such as sixths and sevenths. However, bad news for Newton, a single diatonic scale is not derived from a single root; multiple intervals are present, but their non-uniform distribution prevents direct transposition of chords derived from one color to another. The fact that these scales exhibit musical usability with common timbres, as demonstrated by the piano example in Audio:Trichromats01, is notable.

[...]

This reinforces the principle that uniform distribution within the octave is a primary factor in creating musically usable scales.

Therefore, the relative conventionality of the hue-derived scales is not entirely unexpected. The color attractors themselves are well-distributed across the "color octave," naturally facilitating traditional tonal and modal usage.

While the musical usability of these scales may be statistically probable, their origin in physical reality and human perception imbues them with additional meaning. These are not merely arbitrary numerical values; they are rooted in the fundamental properties of light and its perception.

About the "Spectral Octave":

If the visible spectrum spanned a significantly different range—either much smaller (e.g., 400–430 nm) or spanning multiple "octaves" (e.g., 400–3500 nm)—the relationship between color and chroma would become less compelling. The fact that colors exist within a single spectral octave strengthens the perceptual analogy.

This limited range also addresses the question of whether sufficient color distinctions exist to represent functional harmonies. The answer is affirmative. The fine distinctions made in color perception are analogous to the subtle distinctions made in musical intervals. Just as musicians may debate whether an interval is a "super major second" or a "sub minor third," distinctions are made between colors such as "yellowish orange" and "orangish yellow." This shared phenomenon highlights the fine granularity of both auditory and visual perception.

3D Fractal Xenharmonic Synth, Web App

 Virtual Virtual Instrument?

An experimental program for creating microtonal music.

Sound is generated from a 3D object, a fractal. Clicking on the object's surface produces a set of pitches based on the click point's coordinates (X, Y, Z, and distance to the surface). Each click remaps the keyboard with these new pitches.

The demo video showcases live performance with only drums added afterward.

Play using left and middle clicks, assigning sounds to four keys on two keysets (A, S, D, F and H, J, K, L).

The blinking lights indicate key presses (A, S, D...). The "chord compass" next to it simplifies chord prediction by referencing a 12-tone equal temperament framework.

Built with JavaScript and the browser's Audio API.

Note on microtonality: This program doesn't focus on specific fractal tunings. Musical patterns emerge from the object's geometry, but all fractals potentially contain the same intervals.

Core concept: Generating pitches from arbitrary object coordinates. The code includes primitive 3D shapes for experimentation.

How to play:

  • Left and middle clicks trigger notes based on X, Y, Z, and D coordinates.
  • Use keysets 1 (A, S, D, F) and 2 (H, J, K, L) to assign sounds.

Pitch generation: Pitch is derived from the click point's coordinates. In linear mode, X=1 corresponds to a pitch of 1 Hz.



SFINX - Xenharmonic Guitar Learning App

SFINX 
Stringed Fretted Instruments Notes Explorer



SFINX - (Stringed Fretted Instruments Notes Explorer)

NEW VERSION IS COMING!


1. Introduction


This free web-based app is designed to help you explore and experiment with stringed fretted instruments from traditional to alternative tunings and xenharmonic (micro/macro-tonal) guitars.

Key Features:

  • Generate scales and chord diagrams for custom instruments and tunings
  • Play and find chord progressions on an interactive virtual instrument/guitar
  • Utilize a built-in tuner and fretboard calculator

Basic Concepts:

  • Alternative Tuning: SFINX focuses on exploring alternative tunings that go beyond the usual 12-tone equal temperament. It allows users to design custom tunings using any possible set definition.
  • Virtual Fretboard: The app provides an interactive virtual instrument/fretboard interface to visualize and experiment with different tunings, scales, and chords.
  • Preset Management: Users can save and load instrument and scale presets for quick access and experimentation.

 1.1 General App Workflow 🎸


SFINX accepts any set of pitch values as input. These can be specified in multiple formats:
  • Frequency ratios (e.g., 2:3)
  • Fractions (e.g., 3/2)
  • Decimal representations (e.g., 1.5)
  • Cents (e.g., 701¢)
  • Milioctaves (e.g sqrt(2) is at 500 mocts)
  • Or any combination of the above.

1.1.1 Validation and Range Adjustment

  • The app first validates the set by attempting to map it into the audible range (20–20 000 Hz), even if custom min/max ranges are set.
  • Before defining the guitar’s physical parameters, you can assign any value from the set as the unison at a specific frequency, on a specific string and fret.
  • From this reference point, the tuning system is mapped across the fretboard, taking into account:
    • Number of strings and frets
    • Tuning relationships between strings


1.1.2. Built‑In Tuning Generators


SFINX includes generators for:
  • Equal divisions (EDO/EDx)
  • Group tunings
  • Random tunings for exploration


1.1.3. Default Guitar Setup


By default, SFINX builds:
  • A 6‑string guitar
  • A fret count that does not exceed two octaves
  • A string‑to‑string tuning pattern that mimics a common gauge setup
These parameters are fully customizable, making the app equally useful for:
  • Standard guitars
  • Non‑conventional instruments (e.g., left‑handed 10‑string guitars, 24‑fret extended‑range setups, drop tunings)
  • Microtonal and experimental designs
Finding accurate scales and chord diagrams for such setups is notoriously difficult, SFINX automates it.


1.1.4. Analytical Class System


Analytical classes in SFINX operate independently of both:
  • The tuning definition
  • The guitar’s physical parameters
  • Any class system you create can be transported to another instrument.
  • By default, the app includes:
    • 12‑EDO classes (C, C♯, D, …, B)
    • Common scales saved by name (e.g., Diatonic, Pentatonic)
  • Classes are defined numerically and can be:
    • Named (e.g., “C”, “D♯”)
    • Left as indexed numbers by default
Key Advantage

This separation of tuning, instrument layout, and analytical classes means you can:
  • Apply the same class system to multiple tunings
  • Experiment with alternative analytical equivalences
  • Work with systems that aren’t even EDO, including harmonic series subsets or irrational divisions.

2. User Interface & Controls


2.1 Main Layout Overview: Help(outdated)


Default presets include normal 12ed2 guitar and bass.
SFINX saves presets per browser, allowing you to import and export settings. Overwriting existing presets is possible, but remember to save the instrument preset after creating or modifying scales.

2.2 Instrument Setup

  • Strings and Frets: Define the physical parameters of your virtual instrument. Number of strings and maximum frets per string.
  • Tuning Pattern: Determine the open string note of each string relative to the previous one. This allows for various tuning configurations, including drop tunings.
    Each string you add, also adds a control on its left that sets the open string note in relation with its previous string (that is why the lowest string doesn't have one).
    The standard guitar tuning pattern is 5, 5, 5, 4, 5.
    A one step drop tuning pattern is: 7, 5, 5, 4, 5.
  • Min/Max Frequency: If no reference fret is used, the lowest or highest available pitch in Hertz can be defined from this point, and the rest of the guitar is mapped accordingly. If the guitar's parameters don't match, the range is clipped to the audible spectrum, and an error is displayed for exceeding frets or strings.
  • Reference Fret Mapping: Specify the exact fret and string along with the desired frequency. For instance, the open string (0 fret) of the 5th string can be set to 220 Hz.


2.3 Visualization Tools

  • Interval Rulers: Measure intervals and string lengths for in-depth analysis.
    • The pink ruler marks always the "equave".(the last number in the interval list, or the interval used for the division in equal-division systems, outdated)
    • The fixed green 12ed2 ruler is useful to measure other tunings, since most musicians are familiar with the role of those tempered 12, is easy to relate new tunings using the ruler for quick comparison. (it can be moved)
  • Calculator ruler: Displays a ruler (orange) with the relative size of the string when hovering a fret.
  • Size: Sets the nut to bridge length for calculations. In units.
For deeper interval analysis and measurement beyond the basic tools provided, explore my other app, 'Interval Matrix.'. Unlike SFINX, which focuses on a fixed interval matrix inherent to the guitar, this app offers a more flexible and comprehensive approach to interval exploration. (See Fretboard-Matrix Equivalence)
  • Highlights: Select specific notes on the fretboard to focus on particular scales or chords. The number of notes is determined by the classes.
    Here is where you set the scale to be displayed on the fretboard.
    Each marked note, adds a control for arpeggiate a chord.
  • Chord Pattern: Define the notes for each chord position.
    Each string added, adds a control for selecting a note for the chord-row.
  • Colors: Customize the appearance of notes based on:
    • Single: Plain color.
    • Class: Notes get a unique color by its class.
    • Row: Colorize by chord row, controlled by the chord pattern.
    • Chroma: Notes get a color by their musical chroma(see section 3), this uses a custom sRGB hue wheel, and the root color is red.


2.4 Playback & Sound

  • Arpeggiator: Play notes sequentially in different patterns (up, down, converge, diverge).
  • Speed: Arpeggio note separation speed in seconds.
  • Synth Sound: Choose from available sounds for the virtual guitar.
  • Note Length: Control the duration of played notes.
  • Volume: Adjust the overall volume of the virtual guitar.

Tuning System(outdated)

Decimal Ratio List: The program accepts intervals in decimal ratio, comma-separated. The last ratio represents the octave equivalent.
Equal Division: Divide the octave into a specified number of equal intervals.

2.5 Display Adjustments

  • Width, Length, Zoom: Adjust the visual representation of the fretboard without affecting the tuning or sound.



3. Core Concepts: Basics of Music and Tuning

(the "minimum universal theory")

To understand the complexity and musical possibilities of any system, SFINX focuses on a small set of universal principles. These are the foundations from which any tuning, traditional or experimental, can be explored.

3.1 Tuning Systems – App Philosophy


Just as music resists a single absolute definition, so too do tuning systems. Across music theory, numerous philosophical schools offer different views on what a tuning system is and how it should be analyzed. SFINX is built on a generalized framework designed to accommodate them all. Here, the core axiom is simple: a tuning system is any non‑empty set of pitches. How that set is analyzed, whether by octave, chroma, geometric repetition, or custom equivalence, is personal and flexible.

Understanding Properties of sound perception vs Music Manipulation

The main focus is on distinguishing the types of equivalences that are often confused in music (perceptual, analytical, geometrical).




3.2 Octave


In music, an octave is the interval between a reference pitch \( P \) and another pitch with twice its frequency, corresponding to the second harmonic. More generally, octaves from a reference pitch \( P \) are defined by all frequencies of the form \( P \times 2^n \), where \( n \) is an integer. Related intervals include the double octave (fourth harmonic) and the sub-octave (second subharmonic), among others.

Octaves are perceptually identified as similar, as exemplified by all C notes on a piano. This perceptual equivalence is rooted in the harmonic structure of timbre: in sound sources with harmonic spectra (where overtones align closely with the harmonic series), multiplying or dividing frequency by 2 results in spectral redundancy. No new overtone content is introduced, and our auditory system, evolved in a world saturated with such sounds, detects this redundancy as similarity.

Crucially, the octave does more than suggest similarity; it introduces a cycle. This perceptual equivalence transforms the linear, undifferentiated pitch continuum (spanning roughly 20 Hz to 10-20 kHz, with individual resolution limits around 5-25 cents) into cyclical chromas. Within this framework, pitch difference becomes inferential and relational, allowing tones separated by octaves to be treated as functionally equivalent.

This octave equivalence allows for the transposition of chords and voicings while preserving their musical function. It facilitates transcription across ranges, such as adapting piano music (with ~80 notes) to guitar (with fewer than 30), and supports the substitution of notes with their octave duplicates without significant loss of tonal meaning or structural role.

For a deeper exploration of the octave’s ontological status, see Tonal Constancy.


3.3 Chroma


Chroma denotes the relative position of a pitch within a perceptual cycle. For harmonic timbres, this cycle is typically the octave, meaning the chroma of a pitch remains consistent across its octave equivalents. For example, the 3rd, 6th, 12th, 24th, and 48th harmonics all share the same chroma in octave space; these correspond to the interval of a fifth.

Mathematically, this can be understood by observing that the base-2 logarithms of these harmonic numbers share the same fractional part. In musical contexts, especially within just intonation, logarithmic representations are often avoided in favor of more direct ratio-based reasoning.

A formal expression of chroma is:
\[
\text{chroma}(x) = 2^{\log_2(x) \bmod 1}
\]
Alternatively, using a multiplicative modulo operation:

\[
\Xi(x) = x \bmod 1{:}2
\]
This formulation highlights that chroma is invariant under space scaling, multiplying or dividing a pitch by powers of, in this case, 2 (i.e., \(2^n\), where \(n \in \mathbb{Z}\)) does not alter its chroma. For instance, relative to a reference pitch of 1:1, the chroma of 3, 6, 12, 24, etc. is 1.5, corresponding to the frequency ratio 2:3, a fifth.

Example: Harmonic Instruments


On traditional harmonic instruments like the guitar or piano, a frequency multiple of 5 from the fundamental, i.e., the 5th harmonic (and its octave multiples: 10th, 20th, etc.), corresponds to a major third. In octave space, this maps to the ratio 4:5, meaning its chroma is that of a major third. These harmonics align with the base-2 logarithmic structure of pitch perception, even if the tuning system itself doesn’t explicitly include octaves.

Non-Octave Systems and Timbre Manipulation


Even in systems that omit octaves, such as those based on irrational cycles like π (e.g., a 1:3.14 repetition) our auditory system still tends to perceive pitch relationships through a base-2 logarithmic lens, due to biological conditioning and harmonic familiarity.

However, if the timbre is manipulated such that the perceptual equivalence is based on a different cycle, say, 1:π then the chroma of a pitch becomes relative to that new cycle. In such a system, a frequency multiple of 5 (and all values of \(5 \times 3.14 \times n\)) might no longer be perceived as a major third. Instead, its chroma would be defined by:

\[
\text{chroma}_\pi(x) = \pi^{\log_\pi(x) \bmod 1}
\]
This represents a base-π chroma, and reflects how timbre and spectral structure can reshape the perceptual geometry of pitch space.

Key Insight


Chroma is not an intrinsic property of an isolated pitch. It emerges from the relationship between a pitch and a reference point, shaped by both spectral content and perceptual context. A pitch \( P \) alone does not possess chroma; only when considered in relation to a reference pitch \( A \), do \( P \) and all its perceptual equivalents (e.g., \( P \times 2^n \) or \( P \times \pi^n \)) share a common chroma.

Note: Timbre manipulation and psychoacoustic thresholds continue to challenge and expand our understanding of chroma. As sound synthesis evolves, even the logarithmic perception of pitch may take on new forms.

Next: separating two different invariance concepts that often get conflated because of how Xedo “cheats” by aligning them.

3.4 Geometrical Repetition

(structural / physical invariance, if any)

Definition: 


The smallest positive interval \(R_g\) such that the set is invariant under translation by \(R_g\) in its raw coordinate space (cents, ratios, etc.).
Key point: This is about the actual step size that tiles the set without changing its internal relationships.

Example:


  • In 12edo, \(R_g = 100\) cents, because every pitch is an integer multiple of 100 cents and transposing by 100 cents preserves all interval relationships.
  • In Pythagorean 12-tone, \(R_g = 1200\) cents (the octave), because the steps are not equal , transposing a triad by a single step changes the exact interval sizes, so only a full octave preserves the internal structure.

Details in appendix.

3.5 Pitch Class


In modern music theory, a pitch class (or simply class) is an abstract concept analogous to an equivalence class in algebra. It denotes a set of pitches related by a specific, defined equivalence relation. This relation is not inherently perceptual and can be arbitrarily defined according to the needs of a particular musical system or analytical framework.

In octave-based systems such as 12‑tone equal temperament (12‑TET), the most common equivalence relation is octave equivalence, which causes pitch class and chroma to coincide. However, this is only one possible choice, other equivalence relations can be imposed for analytical or compositional purposes.

A pitch class functions as an assigned label or identifier for a pitch within a defined system. This assignment is absolute for that pitch in the given framework, but it does not inherently:
  • Convey the pitch’s intervallic relationship to other pitches
  • Indicate its harmonic or tonal function

In short, the pitch class names the pitch in the context of the chosen equivalence, but the relationships between classes, and their musical meaning, are determined separately.


3.6 Analytical Equivalence


3.6.1 Definition:

An analytical equivalence is established by choosing a fixed number of pitch classes and defining a modular space within which musical elements, such as scales, chords, and progressions, are analyzed and manipulated.
The number of classes often corresponds to a musically significant interval that serves as the boundary of the analytical cycle, but this is not required. In algebraic terms, these are equivalence classes: once defined, each pitch is assigned to a class, often given symbolic names (e.g., Do, Re, Mi or letter names with sharps/flats).

3.6.2 Key Characteristics


  • Independent of geometry or perception: Analytical equivalence does not depend on the tuning’s inherent geometrical structure or repetition or perceptual chroma.
  • Flexible perspective: You can impose any class system that is useful for analysis, composition, or experimentation.
  • Naming system: Once the equivalence is chosen, pitches are grouped and labeled according to that system, regardless of their actual frequency ratios.


3.6.3 Why It’s Useful


Analytical equivalence allows you to assign a meaningful or informative class system to tuning systems that might otherwise resist simple description, such as irrational divisions of irrational intervals.

Example: 11.5 equal divisions of π:
  • Question: How many notes does it have?
  • Answer: That depends on the analytical equivalence you choose. You could define it to have 10, 15, or any other number of classes for convenience.


3.6.4 Case Study: Equalized Bohlen–Pierce


Often labeled 13ed3:
  • “13” here is not the number of classes, it’s a title indicating the step size (≈146 cents) and its connection to the third harmonic (3/1 tritave).
  • This label is informative about origin and step size, but not directly about how it maps to harmonic instruments like piano or guitar.
  • This system has a near-octave of ≈1180 cents:
    • Melodically, it can pass as an octave.
    • Harmonically, it often sounds “out of tune” relative to octave-based harmony.
    • For chord-building intuition, it can be analytically treated as having 8 classes, since it behaves locally like 8-EDO.


3.6.5 Beyond EDO


Analytical equivalence works for:
  • Non-EDO systems (e.g., harmonic series subsets)
  • Experimental tunings with no obvious periodicity
  • Custom cycles chosen for compositional effect


3.6.6 Extra Example


In a 100-cent step scale (true geometrical repetition = 100 cents), you could define only 2 analytical classes:
  • Class A
  • Class B
Playing only the A’s yields the whole-tone scale, but with the class system acting as a shortcut.


3.6.7 Core Insight


Analytical equivalence is a lens, not a property. It’s the act of deciding what counts as “the same” for the purposes of analysis, naming, and manipulation, free from the constraints of the tuning’s physical structure or perceptual cycles.

3.7 Summary


3.7.1. Octave (or chosen perceptual cycle)

  • The perceptual repetition unit , often 2:1, but could be any, π‑periodic, its always timbre‑based. (subjective thresholds).
  • Turns the infinite pitch continuum into a cyclic space.

3.7.2. Chroma

  • The position within that cycle , the “color” of a pitch, invariant under the cycle’s repetition.
  • In octave space, all C’s share the same chroma; in other cycles, the mapping changes.

3.7.3. Geometrical Repetition (if any)

  • The structural repetition of the tuning itself, the smallest shift that leaves the set’s raw geometry unchanged.
  • In 12‑EDO: 100 ¢; in Pythagorean 12‑tone: 1200 ¢; in other tunings: could be none.

3.7.4. Analytical Equivalence (Classes)

  • The imposed modular space for analysis — how you decide “these pitches count as the same” for naming, chord building, and scale logic.
  • Independent of the tuning’s geometry or perceptual cycles.
  • Lets you treat wildly different tunings with the same symbolic framework.


With just those four, a user can:
  • Load any pitch set into the app.
  • Map it to any instrument geometry.
  • Apply any analytical lens (octave‑based, tritave‑based, custom modulus).
  • Start building scales, chords, and progressions without needing to “speak” a particular school’s theory.

Everything else, cadences, modes, voice‑leading, genre styles, is layered on top of these fundamentals.
it’s theory‑agnostic but still complete enough to navigate the app and make music right away.

3.8 Extra

Analytical equivalence is essentially naming and organizing abstract ratios under a chosen “modulus”, whether that’s the octave, 900 cents, a tritave, or something else entirely. It’s the act of saying “these two pitches are the same for the purposes of my analysis” even if, physically, they’re not the same frequency ratio.

Jazz example:

  • You impose a 900 cent cycle instead of the octave.
  • You treat pitches separated by 900 cents as the same “class”, just like calling them the same letter name in a custom alphabet.
  • This lets you build chord progressions and voice-leading patterns that have their own internal logic, independent of the usual octave-based chroma.

Musicians have been doing this forever, often without formalizing it.
  • Like previous example, in jazz, it’s common to treat certain intervals as “equivalent” for reharmonization tricks.
  • In experimental tuning, analytical equivalence is the key to making sense of irrational divisions or non-octave systems, you pick the modulus that makes the relationships meaningful for your purpose.

The framework then separates:
  • Geometrical repetition (if any), what the set actually repeats at in raw space.
  • Analytical repetition, what you choose to treat as equivalent for naming, analysis, and composition.

That separation is what lets you say:

    > “12edo is analytically octave-based, but geometrically it repeats every 100 cents, and I can choose to analyze it under any modulus I want.”


4. Practical Features


4.1. Instant Fretboard Accuracy


  • Auto‑calculates exact fret positions for any tuning system, including JI, EDO, non‑octave, and irrational divisions.
  • Eliminates manual math errors and saves hours of setup time.

4.2. Microtonal “Test Drive” Before You Commit


  • Simulate any microtonal fretboard before physically modifying or buying a guitar.
  • Compare multiple tunings side‑by‑side to see which feels and sounds right.

4.3. Interactive Learning & Composition Tool


  • Clickable/Playable fretboard — hear notes, chords, and scales instantly.
  • Built‑in arpeggiators and backing track generators for real‑time practice and composition.

4.4. Scale & Chord Visualization


  • Displays accurate diagrams for any tuning, not just standard 12‑EDO.
  • Works with custom analytical class systems, so you can label notes however you want (letters, numbers, symbols).

4.5. Cross‑Instrument Portability


  • Analytical classes and scale definitions can be applied to any instrument layout, not just the guitar you started with.
  • Great for multi‑instrumentalists or luthiers designing new instruments.

4.6. Flexible Physical Parameters


  • Supports non‑standard guitars: extended‑range, left‑handed, drop tunings, altered string counts.
  • Adjustable fret counts, string intervals, and scale lengths.

4.7. Creative Experimentation


  • Try irrational cycles (e.g., π‑periodic systems) or non‑harmonic timbre‑based equivalences.
  • Explore “what if” scenarios for chord shapes, voicings, and modulations in exotic tunings.

4.8. Educational Value


  • Perfect for teaching tuning theory, interval relationships, and fretboard geometry visually.
  • Bridges the gap between abstract theory (interval matrices, chroma, equivalence) and hands‑on playing.

4.9 Shareable, Interactive Setups


  • Because SFINX runs in the browser, you can configure an instrument, set the tuning, define analytical classes, load scales, and even create chord progressions, and then generate a unique shareable URL.
  • Anyone with the link sees exactly what you set up: the same fretboard layout, same tuning, same class system, same progression.
  • Perfect for:
    • Sending musical ideas to bandmates
    • Sharing teaching examples with students
    • Posting microtonal experiments in forums or social media
  • Recipients don’t need to install anything, they just open the link and can interact with the fretboard immediately.


5. Analytical Tools & Visualization


5.1 Color‑Coded Octaves and Chroma Analysis


The infinite, continuous, and cyclical nature of musical chroma parallels the visual spectrum. When color‑coding is applied to musical notation, it becomes a powerful tool for visualizing pitch relationships, whether in complex microtonal contexts or conventional 12‑tone systems.

Perceptual Questions


Color‑coding raises intriguing perceptual issues:
  • Are there enough distinct colors in the visual spectrum to represent subtle pitch distinctions?
  • Where are the perceptual boundaries between adjacent note/color pairings?
  • As Newton observed: “the just confines of the colours are hard to be assigned, because they pass into one another by insensible gradation.”

This is strikingly similar to a core question in music theory: When does one pitch function shift to the next?
Our ears often resolve such ambiguity by prioritizing contextual relationships over exact interval boundaries.

5.1.1 Color in Notation Systems


Many notation systems, from traditional staff notation to MIDI rolls, have experimented with color to represent octave equivalence and pitch classes.
Modern software makes it easy to integrate color‑coding into both microtonal and standard workflows, aiding learning and analysis.

Example (12‑EDO):


In a color‑coded MIDI roll, 12 evenly spaced hues from the sRGB wheel are assigned to the 12 pitch classes, with an arbitrary origin (e.g., red = C).
  • A nine‑note chord might display only three colors, instantly revealing it’s a major triad (R, G, B) without manual interval calculation.


5.1.2 The Spiral Harp: A Case for Color Coding


The Spiral Harp is a virtual instrument that generates pitches from the lengths of spiral polygonal chain segments.
  • It can produce over 1,000 distinct non periodic pitches in the audible range.
  • Traditional labeling is impractical, and enumerating all interval ratios is infeasible.

Solution: Color‑coding by octave equivalence.
  • Strings of the same color share the same chroma and produce consonant sonorities.
  • An alternative sRGB hue wheel is used, revealing not only octave equivalence but also intervallic relationships.


5.1.3 Color and Interval Relationships


Complementary colors (red–cyan, orange–blue, yellow–violet, green–magenta) correspond to tritone relationships.
  • In music theory, the tritone is the geometric mean of the octave:
\[
\text{Tritone ratio} = \sqrt{2}
\]
  • In color perception research, complementary “color attractors” in the spectrum often appear at wavelength ratios approximating \(\sqrt{2}\), a striking cross‑domain coincidence.
  • Unlike perfect fifths and fourths, which invert into each other, the tritone is symmetrical under inversion, reinforcing its ambiguous, “achromatic” quality.


5.1.4 In the App


SFINX supports different independent coloring modes:
  1. By Analytical Class, colors follow your chosen modular analysis (e.g., 12‑EDO letters, custom class systems).
  2. By Perceptual Chroma, colors follow the pitch’s position within the perceptual cycle (octave or other).
  3. Chord-Row.
  4. Plain.
This approach means you can:
  • See how analytical equivalence maps onto perceptual space.
  • Instantly spot consonances, dissonances, and structural patterns, even in dense microtonal textures.


5.2 Interval & Chroma Matrices



5.2.1. Overview


In music theory, interval matrices are analytical tools for exploring the relationships between pitches in a tuning system or scale.
  • Some tunings are octave‑periodic.
  • Others use alternative periods or have no periodicity, potentially generating an infinite number of chromas.


To fully understand such systems, it’s often necessary to calculate pitches beyond the minimal generating set, revealing scale extensions and emergent musical possibilities.


5.2.2. Interval Matrix (Definition)


Prime numbers up to 19. Delta = -1, octave-space.
\(\mathbf{Ä}_{1:2}^{-1}(P_{19})\)

An interval matrix is a table showing the intervals between all pairs of pitches in a given tuning or scale.
  • Particularly useful for non‑equal temperaments or scales with non‑uniform step sizes.
  • In equal temperaments, the matrix contains redundant patterns, making it less informative.
  • Example: The diatonic scale’s interval matrix reveals the characteristic structures of its modes (Ionian, Dorian, Phrygian, etc.).

(Image.5.2.2), sRGB color‑coded interval matrix of the 3‑limit diatonic scale
Group presentation: ⟨2, 3 | 3⁷ ≡ 1⟩
Each row = a cyclic permutation of the scale.
Displayed logarithmically with a 12‑EDO ruler for reference.


5.2.3. Chroma Matrix


A chroma matrix is an extended interval matrix where the octave is fixed as the period.
  • Color‑coding is applied based on octave equivalence by default, and an arbitrary reference pitch.
  • One color in the matrix → the system contains only octave duplications.
  • Multiple colors emerging as pitches are added → the system has infinite chroma.

5.2.4. Analytical Value

  • In octave‑based tunings (even with unequal divisions), chroma matrices have limited analytical value, adding pitches beyond the octave does not produce new chromas.
  • In non‑octave tunings, chroma matrices are far more revealing.

5.2.5. Example: 13‑ED3 (Bohlen–Pierce Equal Temperament)

  • Period = tritave (3:1), equally divided into 13 steps.
  • Interval matrix rows are identical due to equal division and arbitrary choice of equivalence class.
  • Local interval relationships are the same from any pitch, so the global structure is not captured.
  • Chroma analysis (folding the set into the octave) is more informative — here, the chroma matrix acts as an external interval matrix, using the octave as the modulus.


5.2.6. Key Insight

  • Interval matrix → internal relationships within the system’s own period/equivalence.
  • Chroma matrix → those same relationships, but folded into an external reference period (often the octave).
  • Color‑coding makes finite vs. infinite chroma sets visually obvious.

5.2.7 Fretboard-Matrix Equivalence


The “interval matrix” and the “fretboard” are isomorphic representations of the same underlying mathematical object, the only differences are:

  • Domain:
    • Interval matrix → frequency (ratio) domain, fixed period, full permutation of the set.
    • Guitar → string length domain, fixed physical constraints, partial permutation (limited rows, fixed string‑to‑string interval).
  • Permutation scheme:
    • Interval matrix → usually permutes by 1 step through the generating set, producing an \(n \times n\) grid.
    • Guitar → permutes by the tuning interval between strings (e.g., perfect fourths), producing a subset of the full matrix.
  • Period choice:
    • Interval matrix → period is whatever modulus you choose for the analysis (octave, tritave, external element).
    • Guitar → period is implicit in the physical layout (scale length, fret spacing), but you can still “fold” it analytically into any modulus.


Why they’re the same object


Both are visualizations of multiplicative set geometry:
  • The rows are cyclic permutations of the generating set.
  • The columns are positions within the chosen period.
  • The coloring (by chroma, class, or other equivalence) reveals structural symmetries and repetitions.

The guitar is just a physically parameterized, incomplete interval matrix, a “cropped” and “tilted” slice of the full mathematical grid, optimized for human hands.
The interval matrix is the abstract, complete guitar, unconstrained by ergonomics, range, or tuning tradition.


> Any fretted string instrument layout is a partial, parametrized realization of an interval matrix in the string‑length domain. Conversely, any interval matrix can be interpreted as the complete, unconstrained fretboard of a generalized string instrument.

6. Special Topics


6.1 The Impact of Non‑Octave Tunings on Music


6.1.1 Basics


  • Chroma content; the set of distinct pitch positions within the chosen perceptual cycle, is a key factor in understanding any tuning system.
  • If the tuning’s period is the octave (or a power of the octave), the chroma set is finite.
  • If the period is not an integer multiple of the octave, the chroma set is infinite.
  • Infinite chroma sets are theoretically rich but often harder to use in conventional music‑making, especially in collaborative contexts.
  • Octave‑based systems make it easy for musicians to match pitch classes across registers; non‑octave systems require much deeper familiarity to coordinate.

6.1.2 Details


Generating Sets (in the context of tuning)


  • A generating set is a finite collection of pitches (ratios, cents, etc.) from which the full tuning is derived.
  • In instruments and software, this set is mapped across the audible range, whether the system is periodic or not.
  • This is distinct from the abstract group‑theory definition of a generating set.


Finite vs. Infinite Chroma Sets


  • Octave‑periodic tunings (period = 2ᵏ/1) → finite chroma set.
  • Non‑octave‑periodic tunings → infinite chroma set, because no finite set of chromas repeats exactly under octave equivalence.

Example: Bohlen–Pierce (13‑ED3)


  • Often described as having “13 classes” (13 equal divisions of the tritave).
  • On a standard 6‑string guitar tuned in 13‑ED3 (each string a 4th fret above the previous), you actually get 28 unique chromas across the fretboard, far more than the nominal 13.
  • A Bohlen–Pierce piano might have 80 keys, many of which are chromas unavailable to the guitarist.


Practical Implications


  • In octave‑based systems, musicians can play in any register and still match pitch classes (e.g., C major chord in multiple octaves).
  • In non‑octave systems, playing in different “periods” can disrupt harmonic function unless all players know the tuning’s full chroma content and relationships.
  • This makes non‑octave tunings powerful for solo exploration or specialized ensembles, but challenging for traditional collaborative workflows.

6.2 Why Frets Matter in Microtonality


Something a lot of people miss when they imagine “just go fretless” as the universal microtonal solution.

On paper, fretless seems like the ultimate freedom: no fixed grid, infinite pitch choice, no compromise to a temperament. But in practice, the physics of strings and the psychology of pitch perception pull you toward certain “gravitational wells”, the harmonic series, familiar consonances, and the natural resonances of the instrument. That’s why bowed strings like violin, viola, cello tend to orbit tonal centers even in free improvisation: the instrument wants to sing in tune with its own overtones.

Frets, paradoxically, are what let you escape that gravity. They impose a structure that might feel “wrong” at first, but that’s exactly what allows you to:
  • Accumulate subtle interval hacks, 5‑EDO example: stacking 480¢ “sub‑fourths” to land exactly on a 2400¢ double octave, versus 12‑EDO’s 500¢ fourths overshooting to 2500¢. Without frets, hitting those micro‑targets consistently is cognitively exhausting.
  • Exploit non‑intuitive cycles, you can train your hands to navigate a temperament’s quirks without your ear constantly pulling you back to “natural” intervals.
  • Play complex chords in JI or odd lattices, on fretless, the intonation demands for multi‑note chords are brutal; with frets, the geometry locks them in.

So frets aren’t just a fetishized relic of guitar design, they’re a cognitive prosthetic. They let you live inside a tuning system’s logic long enough to internalize it, instead of constantly being dragged back to harmonic gravity. Once it’s in your muscle memory, sure, you can take it fretless and keep the system alive in your hands. But without that scaffold, most players never get past the pull of “natural” intonation.

It’s almost poetic:
  • Fretless = the ocean, infinite but with strong currents.
  • Frets = a map of an invented continent, letting you explore terrain that doesn’t exist in nature.


7. Limitations & Workarounds


7.1 Regarding Fretboard Customization


The application presents certain inherent limitations regarding the direct creation of highly customized fretboard configurations, specifically:
  1. Unique Individual Frets: It is not possible to directly add a single, unique fret at a specific position on only one string without incorporating that interval into the underlying pitch set definition for the entire instrument.
  2. Fret-Skipping Patterns: Creating patterns where entire frets are omitted across all strings cannot be achieved through a direct fret-removal function.
These limitations are not arbitrary but stem from the application's core design philosophy, which prioritizes the generation and analysis of scales and patterns based on consistent, underlying pitch sets. Allowing arbitrary fret additions or removals would undermine this analytical framework. However, practical workarounds exist, grounded in established music theory principles. Understanding these limitations and their justifications clarifies the application's logic, which shares conceptual roots with historical approaches to instrument notation.


7.2 Historical Precedent and Theoretical Foundation


The methodology adopted finds a parallel in historical solutions developed during the Middle Ages for fretted instruments like the cittern. As instrument makers experimented with different fretting patterns (including microtonal variations, just intonation, and skipped frets), tablatures became inconsistent and difficult to interpret across instruments. A crucial development, particularly coinciding with the standardization towards 12-tone temperament, was to number frets according to their position within the complete theoretical chromatic scale, even if the physical fret was absent. (See Duodecimability)

For instance, if a string only possessed a single fret precisely at its midpoint (the octave), it was labeled "fret 12," not "fret 1." This indicated its position within the 12-tone system. This elegant solution not only standardized tablature but also facilitated theoretical understanding. It implicitly treated transposition algebraically (akin to coset shifts in modern terminology), ensuring that musical patterns like chord shapes remained consistent conceptually, even when physical frets varied. Attempting to transpose patterns based solely on naive fret counting on irregularly fretted instruments would quickly lead to inconsistencies.


7.3 Application Context: Timbre and Octave Equivalence


It is pertinent to note that while the application offers various synthesized guitar timbres, all are fundamentally harmonic. This guarantees the perceptual validity of the octave as the primary cycle of pitch repetition. Consequently, the application's chroma-based color-coding system is fixed to octave equivalence, reinforcing the focus on cyclical pitch structures.


7.4 Workaround: Simulating Unique Fret Additions


Consider the scenario of adding a single extra fret to a standard 12-tone guitar – for example, a quarter-tone fret between the 3rd and 4th traditional frets on one string. This might represent a neutral third, a specific microtonal inflection, or serve another modal/contextual purpose.

Directly modeling this single fret addition is not supported. The required workaround involves redefining the instrument's fundamental pitch set to include the desired new interval. This means the interval will be replicated at octave-equivalent positions across the entire fretboard. While a single physical fret might be intended as ornamental, incorporating its pitch interval categorically into the underlying set maintains theoretical consistency.

This approach offers significant advantages:
  • It preserves a coherent, cyclical pitch structure, which is easier to implement computationally.
  • It results in a more intuitive playing and analysis experience, as patterns remain consistent.
  • Chord progressions and scale analyses remain valid across the fretboard. Integrating the new note reveals its systematic relationship within the established structures.
To implement this, you would define the new pitch set using cents notation, incorporating the new interval. For instance, adding a quarter tone (50 cents) near the beginning of the scale: {50, 100, 200, 300, ... , 1200}. Tuning shifts can then be used to position this interval relative to the open string as desired.


7.5 Workaround: Simulating Fret-Skipping


Fret-skipping, common in constructing instruments based on subsets of larger microtonal systems (e.g., selecting specific pitches from 31-EDO), presents a different challenge. It's crucial to distinguish between:
  • Removing specific notes from a system: This is how regular temperaments are often realized (e.g., a 7-note diatonic scale derived from 12-EDO). On a guitar, this might appear as skipped frets, but the same set of notes remains available across the entire fretboard, just spaced differently.
  • Skipping entire frets across all strings: This creates a complex scenario where the availability of specific pitches becomes inconsistent across different positions and octaves.

While it is technically possible to pre-calculate the exact pitches resulting from a fret-skipping pattern and input them as a fixed, non-repeating scale into the application, this is highly impractical for analysis. It essentially defines a unique, non-standard instrument configuration, limiting the applicability of standard analytical tools and pattern recognition.

The recommended and more practical approach mirrors the historical solution: analyze the instrument based on the full, underlying pitch set (e.g., the complete 31-EDO scale if the physical instrument omits some 31-EDO frets). Although diagrams might show chords or scales utilizing frets physically absent on the specific instrument, this method allows:
  • Understanding the underlying theoretical structure and harmony.
  • Identifying alternative voicings or inversions of desired chords/patterns that are physically playable.
  • Avoiding the creation of highly specific notation tied exclusively to one instrument's unique fretting.


7.6 Conclusion


The application's limitations on direct, arbitrary fret manipulation encourage users to work within consistent theoretical frameworks. By defining instruments based on complete, cyclical pitch sets (standard or custom), the application facilitates robust musical analysis, pattern recognition, and understanding of transposition and harmony, echoing effective principles developed historically for managing complex fretting systems. The focus remains on the underlying musical structure rather than idiosyncratic physical layouts.



8. Appendix


Mathematical Formalism of Chroma


Using logarithmic and modular notation makes chroma computation explicit and practical for coding. For example, in Python:

chroma = 2 ** (math.log2(x) % 1)

This method bypasses manual interval reduction (e.g., repeated division by 2 for values > 2 or multiplication for values < 1), offering a direct way to compute a pitch’s position within the octave cycle.

Equivalence Relation and Group Structure


Chroma can be formalized via an equivalence relation on positive real numbers:
\[
x \sim y \iff x = 2^n \cdot y \quad \text{for some } n \in \mathbb{Z}
\]
This defines a multiplicative equivalence class under octave scaling. The quotient space \( (0, \infty)/\sim \) maps naturally to the unit circle via logarithmic and exponential functions:
\[
\frac{(0, \infty)}{\sim} \xrightarrow{\log_2(\bullet)} \mathbb{R}/\mathbb{Z} \xrightarrow{\exp(2\pi i \bullet)} \mathbb{S}^1 \subseteq \mathbb{C}
\]
Or more compactly:
\[
[x] \mapsto \log_2(x) + \mathbb{Z} \mapsto e^{2\pi i \log_2(x)}
\]
This mapping preserves structure and enables the construction of pitch class diagrams, such as the circle of fifths, and even spectral representations like hue wheels, where pitch chroma is visualized on the unit circle in the complex plane.

Musical Implications

This formalism reveals that melodies and chords rely on more than octave equivalence alone. The fractional parts of the log₂ scale, the “colors” of pitch, are essential to musical identity. This becomes especially relevant in tuning systems that deviate from the traditional octave structure, where chroma must be redefined relative to alternative cycles (e.g., tritave, π-periodic systems).

9. References & Further Reading

Interval Matrix, Tonal Constancy, Interval Space Randomness, Spiral Harp, Group Theory In Tunings


Diophantine Limits of Quantum Probability Amplification

Grover’s algorithm is usually described geometrically as a repeated rotation. Here we reinterpret those rotations as a Diophantine approxima...