System Architecture

System Architecture#

The repository is organized as a multi-package Python project under ../src. Each major score path is implemented as its own package with a CLI entry point. This is a better fit than a single monolithic script. It keeps each score family readable, allows each package to evolve at its own pace, and makes the build process consistent across the repository.

There are now several active package paths with different compositional roles. modus_operandi_abjad contains a fixed three-movement piano work. jazz_rhythm contains reusable rhythmic studies. algorithmic_piano_quartet_no1 contains the first config-driven quartet generator. algorithmic_piano_quartet_no2 contains the forked and more experimental second quartet generator. bird_im_migration contains an analysis-driven birdsong reduction built from curated spectral data. bird_im_migration_ensemble expands that material into a chamber piece with three main movements and an appendix-style transform study, all with separate instrumental and render layers. algorithmic remains a placeholder package for future work. The package entry points are defined in ../pyproject.toml and exposed both as python -m ... module invocations and as installed console scripts.

Within each score package, the code usually separates into three layers. The CLI layer handles arguments, output selection, and compilation. The generation layer defines musical material or event logic. The score layer turns that material into Abjad objects and then into LilyPond source. Quartet packages add a fourth layer for configuration loading and a fifth layer for SoundFont handling. The bird packages show that the same architecture also works for analysis-driven material. bird_im_migration adds a preprocessing step that turns SPEAR partials into quantized phrase material, and bird_im_migration_ensemble then treats those phrases as modular source objects for a larger score and for appendix-style transform demonstrations.

The architecture also separates stable work from exploratory work. Algo Rhythms Quartet No. 1 stays fixed as a proof-of-concept score. Algo Rhythms Quartet No. 2 is allowed to diverge. The same pattern now appears in the bird material. bird_im_migration remains the tighter spectral proof of concept, while bird_im_migration_ensemble uses that earlier reduction as source material for a more independent chamber composition. This is a software architecture decision, but it is also a compositional one. It lets the repository preserve finished work without blocking further musical experiments.

One small but important detail is the use of entry points instead of one-off scripts:

Console script entry points defined in the project metadata.#
[project.scripts]
modus-operandi-abjad = "modus_operandi_abjad.cli:main"
jazz-rhythms = "jazz_rhythm.cli:main"
algorithmic-piano-quartet-no1 = "algorithmic_piano_quartet_no1.cli:main"
algorithmic-piano-quartet-no2 = "algorithmic_piano_quartet_no2.cli:main"
algorithmic = "algorithmic.cli:main"