# dffmonolith/harmonizer architecture

> Architecture diagram of the GitHub repository dffmonolith/harmonizer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dffmonolith/harmonizer
- Repository: https://github.com/dffmonolith/harmonizer

## Overview

Harmonizer is a browser-based workbench for sketching vocal scores, generating SATB parts, and rehearsing or exporting the result. The documented workflow runs from note and chord entry through arrangement and playback, with import, export, examples, and browser autosave as supporting capabilities. The README describes the runtime as a single vanilla-JavaScript HTML file, so several responsibilities share that path. Source excerpts cover only peripheral sound-bank tooling; runtime relationships below rely on README statements, not inspection of the application code.

Main entry points: [`app/harmonizer.html`](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html) (Score editor), [`data/index.json`](https://github.com/dffmonolith/harmonizer/blob/main/data/index.json) (Example arrangements), [`app/harmonizer-piano-samples.json`](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer-piano-samples.json) (Piano samples), [`app/harmonizer-bank-choir-aah.json`](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer-bank-choir-aah.json) (Instrument banks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Score authoring"]
  node_score_editor["Score editor<br/>[harmonizer.html]"]
  node_example_arrangements["Example arrangements<br/>[index.json]"]
end

subgraph group_arrangement["Part arrangement"]
  node_satb_generator["SATB generation<br/>[harmonizer.html]"]
  node_refine_parts["Part refinement<br/>[harmonizer.html]"]
  node_partwriting_checks["Part-writing checks<br/>[harmonizer.html]"]
end

subgraph group_rehearsal["Playback and sounds"]
  node_score_playback["Score playback<br/>[harmonizer.html]"]
  node_sound_selection["Sound selection<br/>[harmonizer.html]"]
  node_piano_bank["Piano samples"]
  node_instrument_banks["Instrument banks"]
end

subgraph group_exchange["Import and storage"]
  node_score_import["Score import<br/>[harmonizer.html]"]
  node_score_export["Score export<br/>[harmonizer.html]"]
  node_autosave_library["Autosave and library<br/>[harmonizer.html]"]
end

node_musician(("Musician"))
node_browser_storage[("Browser storage")]

node_musician -->|"enters notes"| node_score_editor
node_example_arrangements -->|"provides examples"| node_score_editor
node_score_editor -->|"generates parts"| node_satb_generator
node_score_editor -->|"refines parts"| node_refine_parts
node_score_editor -->|"checks parts"| node_partwriting_checks
node_score_editor -->|"plays score"| node_score_playback
node_score_playback -->|"uses sounds"| node_sound_selection
node_sound_selection -->|"loads piano"| node_piano_bank
node_sound_selection -->|"loads instruments"| node_instrument_banks
node_musician -->|"imports scores"| node_score_import
node_score_import -->|"opens score"| node_score_editor
node_score_editor -->|"exports score"| node_score_export
node_musician -->|"requests export"| node_score_export
node_score_editor -->|"autosaves songs"| node_autosave_library
node_autosave_library -->|"stores songs"| node_browser_storage

click node_score_editor "https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html"
click node_example_arrangements "https://github.com/dffmonolith/harmonizer/blob/main/data/index.json"
click node_satb_generator "https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html"
click node_refine_parts "https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html"
click node_partwriting_checks "https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html"
click node_score_playback "https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html"
click node_sound_selection "https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html"
click node_piano_bank "https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer-piano-samples.json"
click node_instrument_banks "https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer-bank-choir-aah.json"
click node_score_import "https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html"
click node_score_export "https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html"
click node_autosave_library "https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_score_editor,node_example_arrangements toneBlue
class node_satb_generator,node_refine_parts,node_partwriting_checks,node_browser_storage toneAmber
class node_score_playback,node_sound_selection,node_piano_bank,node_instrument_banks toneMint
class node_score_import,node_score_export,node_autosave_library toneRose
class node_musician toneIndigo
```

## Components

### Score authoring

- [Score editor](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html): `app/harmonizer.html`
- [Example arrangements](https://github.com/dffmonolith/harmonizer/blob/main/data/index.json): `data/index.json`

### Part arrangement

- [SATB generation](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html): `app/harmonizer.html`
- [Part refinement](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html): `app/harmonizer.html`
- [Part-writing checks](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html): `app/harmonizer.html`

### Playback and sounds

- [Score playback](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html): `app/harmonizer.html`
- [Sound selection](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html): `app/harmonizer.html`
- [Piano samples](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer-piano-samples.json): `app/harmonizer-piano-samples.json`
- [Instrument banks](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer-bank-choir-aah.json): `app/harmonizer-bank-choir-aah.json`

### Import and storage

- [Score import](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html): `app/harmonizer.html`
- [Score export](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html): `app/harmonizer.html`
- [Autosave and library](https://github.com/dffmonolith/harmonizer/blob/main/app/harmonizer.html): `app/harmonizer.html`

### Other components

- **Musician**
- **Browser storage**

## Connections

- Musician → Score editor: enters notes (evidence: `README.md`)
- Example arrangements → Score editor: provides examples (evidence: `README.md`)
- Score editor → SATB generation: generates parts (evidence: `README.md`)
- Score editor → Part refinement: refines parts (evidence: `README.md`)
- Score editor → Part-writing checks: checks parts (evidence: `README.md`)
- Score editor → Score playback: plays score (evidence: `README.md`)
- Score playback → Sound selection: uses sounds (evidence: `README.md`)
- Sound selection → Piano samples: loads piano (evidence: `README.md`)
- Sound selection → Instrument banks: loads instruments (evidence: `README.md`)
- Musician → Score import: imports scores (evidence: `README.md`)
- Score import → Score editor: opens score (evidence: `README.md`)
- Score editor → Score export: exports score (evidence: `README.md`)
- Musician → Score export: requests export (evidence: `README.md`)
- Score editor → Autosave and library: autosaves songs (evidence: `README.md`)
- Autosave and library → Browser storage: stores songs (evidence: `README.md`)
