Published: December 17, 2025 • 10 min read
LucidHarmony is built as a full pipeline: we train transformer models offline, run real-time inference inside a JUCE audio plugin via ONNX Runtime, and support it all with a static website + infrastructure for shipping updates and documentation.
This post is a living inventory of the technologies we use across the three layers.
Modeling & Data Pipeline (Offline)
Programming language & runtime
- Python — the primary language for dataset extraction and training.
Symbolic music + analysis
- music21 — corpus access, score parsing, and harmonic / Roman numeral analysis.
Machine learning
-
Transformer (attention-based sequence model) — the primary architecture for learning harmonic progressions as of v1.3.0. Replaced the earlier LSTM approach for richer, more expressive output.
-
ONNX — models are exported from PyTorch to ONNX format for cross-platform inference.
-
Temperature sampling — controls randomness during generation.
-
Top-K sampling — restricts sampling to the K most likely tokens.
Music representation
-
Roman numeral tokens — functional harmony representation (e.g.
I,V6,ii°, etc.). -
Quantized harmonic rhythm — extracting chords on strong beats (e.g. quarter‑note grid) to suppress passing-tone “chatter”.
Plugin (Real‑Time)
Languages & standards
- C++17 — core implementation language.
Frameworks
- JUCE — plugin framework (UI, audio/MIDI plumbing, file export).
Plugin formats / DAW integration
-
Audio Units (AU)
-
VST3
-
CLAP
Inference runtime
-
ONNX Runtime — the plugin loads trained models exported to ONNX format and runs inference via the ONNX Runtime C++ API. This replaced a custom LSTM implementation in v1.3.0.
-
Softmax + sampling — generation uses softmax probabilities, temperature scaling, and top-K style filtering.
Voicing / musical constraints
-
Beam search / Viterbi-style path search — used to select voiced 4‑part realizations over time.
-
Constraint-based voice leading heuristics — avoid parallels, encourage stepwise motion, reward common tones, etc.
MIDI
-
MIDI file generation — exports single-track and multi-track MIDI, with time signature meta events.
-
Drag-and-drop MIDI UX — DAW-friendly workflow to get generated harmonies into your project quickly.
Website (lucidmusician.com)
Framework
- Astro — static site generator. All pages are pre-rendered HTML at build time with zero client-side JavaScript by default.
Styling
-
Tailwind CSS 4
-
Tailwind Typography (prose styling for markdown content)
Content
-
Astro Content Collections — blog posts and docs pages are authored in Markdown with typed frontmatter schemas.
-
@astrojs/sitemap — auto-generated sitemap at build time.
Performance
- lite-youtube-embed — lightweight YouTube facade that loads the real player only on click.
Infrastructure / deployment
IaC
- AWS CDK (TypeScript)
Hosting + CDN
-
Amazon S3 (static assets)
-
Amazon CloudFront (CDN)
DNS / certificates
-
Amazon Route 53
-
AWS Certificate Manager (ACM)
Release Packaging (macOS AU)
For macOS distribution, we automate AU installer creation with a small Bash script:
scripts/package_au_pkg.sh
At a high level it:
- Stages the built
.componentinto a temporary directory (mktemp,ditto). - Code-signs the component (hardened runtime optional) using
codesign, then verifies the signature. - Builds an installer package using Apple’s packaging tools:
pkgbuild(component package)productbuild(final signed installer)- https://developer.apple.com/documentation/installerproducts
- Notarizes the resulting
.pkgwithxcrun notarytool submit --wait. - Staples the notarization ticket to the
.pkgwithxcrun stapler staple.