Skip to content

Makam scales

The computations for section 4.4 of the brief. Contains 5 code cells and 1 figures.

math/notebooks/05-makamlar.ipynb

The code does not run here. The outputs you see were saved when the notebooks were last run.
Code, comments and printed output are in Turkish. The explanations are translated.

Brief 4.4: the shape of the scales on the network. V2 (the comma steps) is still an assumption. The tonic is taken as 0.

This notebook produces computations and figures. The proofs and the report text belong to the students.

Setup

Loads the package and the plotting library. kaydet saves a figure as PNG and SVG into rapor/sekiller. tablo_yaz writes a table as CSV into rapor/tablolar and prints it. t53 is the Tonnetz with 53 divisions, used in the rest of the notebook.

Setup code (imports and helper functions)
from pathlib import Pathimport csvimport matplotlib.pyplot as pltfrom tonnetz import *from tonnetz.plot import draw_latticeRAPOR = Path("..") / ".." / "rapor"SEKIL = RAPOR / "sekiller"; SEKIL.mkdir(parents=True, exist_ok=True)TABLO = RAPOR / "tablolar"; TABLO.mkdir(parents=True, exist_ok=True)def kaydet(fig, ad):    for uzanti in ("png", "svg"):        fig.savefig(SEKIL / f"{ad}.{uzanti}", dpi=300, bbox_inches="tight")def tablo_yaz(ad, basliklar, satirlar):    with open(TABLO / f"{ad}.csv", "w", newline="", encoding="utf-8") as f:        w = csv.writer(f); w.writerow(basliklar); w.writerows(satirlar)    genislik = [max(len(str(x)) for x in sutun) for sutun in zip(basliklar, *satirlar)]    for satir in (basliklar, *satirlar):        print("  ".join(str(x).rjust(g) for x, g in zip(satir, genislik)))t53 = Tonnetz.tet(53)

Analysing the scales

parse_steps turns the interval symbols (T, K, S, B, A) into numbers of commas. analyze builds the pitches of the scale starting from the tonic. It then computes the chords the scale contains, the connected components and the arc the scale covers in the chain of fifths. The comma steps rest on assumption V2.

In 2

bilgi = {k: analyze(t53, 0, parse_steps(m["steps"])) for k, m in MAKAMS_53.items()}satirlar = []for k, m in MAKAMS_53.items():    b = bilgi[k]    satirlar.append([m["name"], m["steps"], " ".join(map(str, b["steps"])), b["major_count"], b["minor_count"],                     len(b["node_components"]), b["chain_arc_length"]])tablo_yaz("makamlar", ["makam", "adımlar", "koma", "majör", "minör", "düğüm bileşeni", "zincir yayı"], satirlar)

Output

  makam        adımlar            koma  majör  minör  düğüm bileşeni  zincir yayı
 Çargâh  T T B T T T B   9 9 4 9 9 9 4      0      0               1            7
Bûselik  T B T T B T T   9 4 9 9 4 9 9      0      0               1            7
  Kürdî  B T T T B T T   4 9 9 9 4 9 9      0      0               1            7
   Rast  T K S T T K S   9 8 5 9 9 8 5      2      1               1           12
  Uşşak  K S T T B T T   8 5 9 9 4 9 9      1      0               1           12
  Hicaz  S A S T B T T  5 12 5 9 4 9 9      1      1               2           16

Shape classes

analyze also produces a canonical form for each scale. Scales with the same canonical form under translation and reflection give the same shape on the network. The code groups the scales by canonical form.

In 3

siniflar = {}for k, b in bilgi.items():    siniflar.setdefault(tuple(b["shape"]), []).append(MAKAMS_53[k]["name"])for s in siniflar.values():    print(s)

Output

['Çargâh', 'Bûselik', 'Kürdî']
['Rast']
['Uşşak']
['Hicaz']

The widths of the thirds

A triangle needs a third of 14 or 17 commas and a fifth of 31 commas. The code lists the widths of the thirds formed by skipping one pitch in each scale. The Çargâh, Bûselik and Kürdî scales have no third of 14 or 17 commas.

In 4

for k, b in bilgi.items():    p = b["pitches"]    ucluler = sorted({(p[(i + 2) % 7] - p[i]) % 53 for i in range(7)})    print(MAKAMS_53[k]["name"].ljust(8), "üçlüler (koma):", ucluler)

Output

Çargâh   üçlüler (koma): [13, 18]
Bûselik  üçlüler (koma): [13, 18]
Kürdî    üçlüler (koma): [13, 18]
Rast     üçlüler (koma): [13, 14, 17, 18]
Uşşak    üçlüler (koma): [13, 14, 17, 18]
Hicaz    üçlüler (koma): [13, 14, 17, 18]

The six scales are drawn on the lattice. Dark nodes are the pitches of the scale and filled or hatched triangles are the chords it contains.

In 5

fig, axes = plt.subplots(2, 3, figsize=(18, 9))for ax, (k, b) in zip(axes.flat, bilgi.items()):    akorlar = [Chord(c["kind"], c["root"]) for c in b["chords"]]    draw_lattice(t53, ax, cols=9, rows=6, chords=akorlar, nodes=set(b["pitches"]))    ax.set_title(f'{MAKAMS_53[k]["name"]}: {b["major_count"]} majör, {b["minor_count"]} minör')kaydet(fig, "makamlar")
The shapes of six makam scales on the lattice with 53 divisions. The pitches of each scale are dark nodes and the chords it contains are filled and hatched triangles.

Every number on this site comes from data produced by the Python core and is checked by tests.

TÜBİTAK 2204-A mathematics project