// ZPWR-ALGO-PRODUCTION — DOCS

Report GitHub

>_ZPWR-ALGO-PRODUCTION

A Rust engine that generates a complete, professionally-arranged track from one action — song structure (intro / build / drop / breakdown), key + tempo, per-section MIDI, and an exported Ableton Live Set (.als), with per-genre engines on top. Ported faithfully from the Audio-Haxor generators; the library-scanner coupling is abstracted behind a host-provided sample source. Powers zpwr-daw's one-click production (INVENTIONS #5). Private — internal engine of the MenkeTechnologies audio stack.

Overview

One action drives the whole pipeline — pick key / tempo / samples, lay out the arrangement, generate the notes for every section, and write a host-loadable Ableton project. Generation is the workflow, not an assist bolted onto a linear DAW.

  • One action → a finished track — structure + key/tempo, per-section MIDI, and an exported .als.
  • Faithful port — the generators are lifted verbatim from the Audio-Haxor src-tauri backend; behaviour is preserved.
  • Standalone — the library-scanner coupling is abstracted behind a host-provided SampleSource trait, so the engine runs without the scanner.
  • Library crate — consumed natively by Audio-Haxor and over a C ABI (capi) by zpwr-daw.

Pipeline & Modules

The orchestrator (track_generator) selects key, tempo, and samples (the latter from the host-provided sample_source), then als_project lays out the arrangement; midi_generator fills each section with notes; genre engines such as trance_generator apply genre-specific arrangement and MIDI; finally als_generator writes the Ableton Live Set from bundled ALS/XML templates.

StageModuleRole
Song structure + theoryals_projectsection lengths / starts, key compatibility, section overrides
Per-section MIDImidi_generatornote-event generation per arrangement section
Ableton exportals_generatorwrites a full .als (MIDI + audio clips, automation)
Genre enginetrance_generatorgenre-specific arrangement + MIDI
Orchestratortrack_generatorpicks key / tempo / samples, drives the whole generation
Audio analysisbpm, similaritytempo estimation + audio fingerprint / similarity (symphonia, dep-light)
Supportmidi, sample_analysis, sample_filtersself-contained MIDI parser, sample name/manufacturer signals, filtering
Host surfacesample_source, capi, runhost-library trait, C ABI for zpwr-daw, run orchestration

Standalone By Design

Audio-Haxor's generators reached into its library scanner (sample picking, blacklist / whitelist, key / BPM extraction). Here those couplings are abstracted behind a host-provided sample-source trait (sample_source), so the engine runs without the scanner — the host (Audio-Haxor, zpwr-daw) supplies samples; the engine supplies the music. The host installs its library and data dir at startup (set_data_dir), then drives generation.

Port Status

Faithful port complete — all seven generator modules plus the support layer build, and the ported test suite (280 tests) passes (build + fmt + clippy + doc clean):

  • bpm, similarity — audio analysis (symphonia), zero external deps.
  • als_project, midi_generator, als_generator, trance_generator, track_generator — structure / MIDI / ALS / genre / orchestration.
  • Support: SampleSource trait (host sample library), sample_analysis name parsers + manufacturer signals, sample_filters, self-contained MIDI parser, host-set data_dir + write_app_log shim, the capi C ABI, and the run orchestrator.

See the engineering report for the module-by-module breakdown and architecture notes.

Build

cargo build
cargo test

Library crate (rlib), consumed natively by the Tauri host and over the capi C ABI by zpwr-daw. Vendored as a git submodule inside the consuming apps and the umbrella MenkeTechnologiesMeta repo.

© MenkeTechnologies — the algorithmic music-production engine of the MenkeTechnologies audio stack, behind zpwr-daw's one-click production and Audio-Haxor.
References: Engineering Report · Source.