Skip to main content

Musical Harmony and Gematria

Trinity connects mathematics to two ancient disciplines: musical harmony (the Pythagorean tradition of ratios governing sound) and gematria (the assignment of numerical values to letters). Both reveal deep connections to the ternary base, the golden ratio, and the number 3.

Source: src/tri/tri_math.zig (Cycles 87, 97)


Musical Harmony​

Pythagorean Tuning​

The Perfect Fifth

The most consonant musical interval (after the octave) is the perfect fifth:

frequency ratio = 3 : 2

The Pythagoreans discovered that the most harmonious intervals correspond to simple integer ratios. The simplest ratios involving powers of 2 and 3 produce the fundamental intervals of Western music:

IntervalRatioCentsNotes
Unison1:10Same note
Octave2:11200Doubling frequency
Perfect Fifth3:2701.963 appears
Perfect Fourth4:3498.043 appears
Major Third5:4386.31-
Minor Third6:5315.64-

The Circle of Fifths​

Stacking 12 perfect fifths (3/2)^12 = 129.746 almost equals 7 octaves (2^7 = 128). The small discrepancy is the Pythagorean comma:

(3/2)^12 / 2^7 = 3^12 / 2^19 = 531441 / 524288 = 1.01364...

This comma (23.46 cents) is why Pythagorean tuning doesn't close perfectly -- it requires tempering. The number 12 appears because log2(3/2) β‰ˆ 7/12, making 12-tone equal temperament a natural approximation.

Equal Temperament​

In 12-tone equal temperament (12-TET), each semitone has the frequency ratio:

r = 2^(1/12) = 1.05946...

The perfect fifth is approximated as 2^(7/12) = 1.4983..., very close to 3/2 = 1.5. The deviation is only 1.96 cents -- below the threshold of human perception.

The Golden Ratio in Music​

Phi appears in musical structure in several ways:

Formal proportions:

  • In many compositions, the climax occurs at the golden section of the total duration
  • Bartok's Music for Strings, Percussion, and Celesta has movements whose lengths approximate Fibonacci numbers (Lendvai, 1971; note: this analysis has been debated in musicology -- see Howat, 1983, for a more cautious treatment)
  • Debussy consciously used golden-ratio proportions in his formal structures

Frequency relationships:

Minor sixth frequency ratio = 8/5 = 1.6  (close to phi = 1.618)
Major sixth frequency ratio = 5/3 = 1.667 (brackets phi)

Fibonacci in rhythm:

  • Time signatures 3/4, 5/8, 8/8, 13/8 use Fibonacci numbers
  • Rhythmic patterns based on Fibonacci durations (1, 1, 2, 3, 5, 8 beats)

Overtone Series​

A vibrating string produces a fundamental frequency f and overtones at integer multiples:

f, 2f, 3f, 4f, 5f, 6f, ...

The 3rd harmonic (3f) produces the perfect fifth (an octave + a fifth above the fundamental). This makes 3 the most important harmonic after the octave, reinforcing Trinity's foundational role.

Ternary Connection​

Musical ConceptTernary Value
Perfect fifth ratio3:2
Perfect fourth ratio4:3
Major triad3 notes (root, third, fifth)
3/4 time signature3 beats per measure (waltz)
A440 concert pitch440 β‰ˆ 3^4 Γ— 5 + 35
12-TET semitones12 = 4 Γ— 3

Reference: Benson, D. J. Music: A Mathematical Offering. Cambridge University Press, 2006.


Gematria​

Coptic Gematria System​

27 = 3^3 Glyphs

The Coptic gematria system uses 27 characters -- exactly 3^3, the size of a ternary tryte space.

Trinity implements the Coptic gematria (isopsephy) system, which assigns numerical values to 27 glyphs following the Greek alphabetical number system:

GroupGlyphsValuesCount
UnitsAlpha through Theta1--99 = 3^2
TensIota through Koppa10--909 = 3^2
HundredsRho through Sampi100--9009 = 3^2
Total1--90027 = 3^3

Isopsephy​

Isopsephy is the practice of computing the numerical value of a word by summing the values of its letters. This was a common practice in Hellenistic and early Christian texts:

JESUS (Iesous):  I(10) + E(8) + S(200) + O(70) + U(400) + S(200) = 888

Ternary Encoding of Gematria​

The 27 glyphs of Coptic gematria map naturally to balanced ternary trits:

27 values = 3^3 = one ternary tryte

Glyph 1 (Alpha=1) --> trit: (-1, -1, -1)
Glyph 14 (Xi=40) --> trit: (0, 0, 0)
Glyph 27 (Sampi=900) --> trit: (+1, +1, +1)

This is not a coincidence -- the ancient numerological structure perfectly matches the ternary computing model. Each glyph-value pair encodes exactly one tryte of information.

Mathematical Properties​

The structure of the gematria table has interesting arithmetic properties:

Sum of all units:     1+2+3+...+9 = 45
Sum of all tens: 10+20+...+90 = 450
Sum of all hundreds: 100+200+...+900 = 4500
Total sum: 45 + 450 + 4500 = 4995

Each group sum is 10x the previous, reflecting the decimal (not ternary) structure of the value assignments. However, the grouping into 3 groups of 9 = 3^2 elements is inherently ternary.

Sacred Multiplier​

Trinity's sacred number theory notes that:

37 Γ— 3 = 111
37 Γ— 6 = 222
37 Γ— 9 = 333
...
37 Γ— 27 = 999

The number 37 is the sacred multiplier -- multiplying it by any multiple of 3 produces a repdigit. And 37 Γ— 27 = 37 Γ— 3^3 = 999, connecting gematria (27 glyphs) to the sacred number 999.


Connection to Trinity​

The Number 3 in Music and Language​

DomainRole of 3
Music3:2 perfect fifth, 3 notes in triad, 3/4 waltz time
Gematria27 = 3^3 glyphs, 3 groups of 9 values
Physics3 spatial dimensions, 3 generations, 3 colors
Mathematicsphi^2 + 1/phi^2 = 3 (Trinity Identity)

Information Theory​

Both music and gematria are encoding systems -- they map abstract concepts (pitch, meaning) to structured numerical representations. Trinity's VSA does the same with hypervectors. The 27-glyph Coptic system encodes exactly 1 tryte (log2(27) = 3*log2(3) = 4.755 bits) per character.


Try It with TRI CLI​

tri math harmony          # Musical ratios, Pythagorean tuning, phi in music
tri math gematria # Coptic gematria (27 glyphs, isopsephy 1-900)
tri math gematria LOGOS # Compute isopsephy value of a word

References​

  1. Benson, D. J. Music: A Mathematical Offering. Cambridge University Press, 2006.
  2. Livio, M. The Golden Ratio: The Story of Phi, the World's Most Astonishing Number. Broadway Books, 2002.
  3. Lendvai, E. Bela Bartok: An Analysis of His Music. Kahn & Averill, 1971. Analysis of Fibonacci proportions in Bartok's formal structures.
  4. Howat, R. Debussy in Proportion: A Musical Analysis. Cambridge University Press, 1983. A more cautious approach to golden-ratio analysis in music.
  5. Katz, V. J. A History of Mathematics. Addison-Wesley, 3rd edition, 2009. Chapter 3 covers Greek number theory and isopsephy.
  6. Dantzig, T. Number: The Language of Science. Macmillan, 4th edition, 1954.

phi^2 + 1/phi^2 = 3 = TRINITY