LH-K
lh-k:~/coding
LDN --:-- BER --:-- CHN --:--
~/coding · 6 programs · Python, Lisp

Code

Composition systems, OpenMusic libraries, and tools for analysis, synthesis and simulation, written alongside the compositional work.

Composition systems 2026

solver · Pythondocumented in the doctoral thesis

Constraint solver for String Quartet No. 1

A purpose-built composition program with a section-based arrangement view. Hard constraints prune pitch domains by propagation, soft constraints rank the remaining candidates, and backtracking search commits to solutions. Harmony is classified by the discrete Fourier transform of pitch-class sets.

Searchhard constraints → propagate, prune domains
soft constraints → rank survivors
backtracking → commit
harmony → DFT of pitch-class sets
library · Common LispOpenMusic / OM-Screamer

OMATP

A pitch and harmony library for OpenMusic and OM-Screamer: constraint boxes for modal fields, colour and talea cells, implied inner voices, pitch centres, voice-leading, DFT-based harmonic analysis, and harmonic tension shaped section by section.

github.com/kotoru-maker/OMATP ↗

Boxes
44 constraint boxes
Domain
Pitch, harmony, voice-leading
Host
OpenMusic, OM-Screamer
library · Common LispOpenMusic

OMAO

A rhythm library built on weighted cell trajectories. Rhythmic cells receive start and end weights that interpolate across a piece and are converted automatically into strict and heuristic rules.

github.com/kotoru-maker/OMAO ↗

Boxes
16 rule boxes
Domain
Succession, density, phrasing, relations between voices
Host
OpenMusic

Analysis, synthesis, simulation

analysis · Pythontkinter · matplotlib

Coefficient Product Analyser

Spectral analysis and classification of pitch-class sets with the discrete Fourier transform. It computes the DFT of binary pitch-class vectors over ℤ₁₂ and uses the complex product of selected coefficients as the main spectral invariant.

Each set is analysed for inversional symmetry, intervallic structure and spectral energy distribution, then mapped to harmonic archetypes and to heuristic categories inspired by Takemitsu.

Spectral invariantP = a₂ · a₃ · a₇  ∈ ℂ
Takemitsu categories
DreamWaterGardenCelestialBellMist
Coefficient Product Analyser showing pitch-class sets plotted in the complex plane
Sets plotted by the real and imaginary parts of P.
synthesis · PythonSciPy odeint

Kuramoto Oscillator Network Synth

Coupled phase oscillators rendered as sound and image. Natural frequencies come from uniform, Gaussian or log-normal distributions; coupling can be global, local or random, and its strength is modulated over time.

Phases drive waveform generators with gating, envelopes and stereo spatialisation. A browser version runs on the home page.

Watch demo ↗

Phase dynamicsdθi/dt = ωi + (K(t)/N) Σj Aij sin(θj − θi)
Order parameterR(t) = | (1/N) Σj eiθj(t) |
simulation · Python

Pulse 回路: Life Computer Simulation

A recreation of the simulation in Kiyoshi Kurosawa’s Pulse (回路, 2001). Points drift through a three-dimensional void, leaving fading trails. The further apart they are, the more they attract; when two come too close, one disappears. There is no collision, only absence. The space does not collapse. It empties.

The behaviour mirrors Schopenhauer’s hedgehog’s dilemma: closeness sought, and punished.

Watch simulation ↗

Rulesattraction ∝ distance
if d(p, q) < ε → remove one
no collision · no explosion · only absence