m4/org/openalice-media

openalice-media

[Atlas card](https://atlas.blal.pro/repos/openalice-media)

Features
9
Status
·unknown
Last activity
1mo ago
Branch
mvp

Architecture rating

D1mo ago
consistencyC

Clean modular layout — 5 cohesive cargo crates, 0 circular deps, 0 dead imports, drift 100/manifest 100; undercut by 102 star imports and 19 duplicate signatures showing uneven idiom adoption across crates.

docsC-

Strong top-level docs — valid manifest (100), AGENTS.md + README present, 9 @feature annotations (features 92); weakened by 261 missing docstrings across modules and roadmap 30/100 (the repo's weakest quality dimension).

reliabilityD

Rust memory-safety helps, no circular deps; but no SIGTERM/idempotency/retry needs for an offline lib, and inspector flags 19 god modules + max complexity 27 with no visible error-handling tests, so robustness of audio-graph processing is unverified.

securityD

Offline Rust/WASM audio library — zero network/auth surface (runtime_deps 0, no https endpoint), so SSRF/injection/rate-limit/headers are largely N/A; but no demonstrated input-validation or unsafe-block audit on WAV/MIDI parsing, graded conservatively for absent evidence.

data layerD

No database, schema, or migrations (migrations/tests section empty, manifest_owns_tables []); persistence is 1342 WAV samples on filesystem — no RLS/FK/tenant/GDPR concerns apply, scored conservatively as the axis is essentially N/A with no constraints to evaluate.

observabilityF

No metrics, tracing, health probes, or structured logging — Atlas health probe fails (no https endpoint in manifest), 0 console statements; appropriate for a library but no instrumentation signal whatsoever, graded absent.

testingF

No test suite detected (migrations/tests presence empty, no #[test]/integration signal); the 14 unreferenced `main` fns are example binaries, not tests — critical audio-graph/euclidean/reverb paths have no automated coverage.

source · auto-grader-2026-06-16

Ecosystem manifest

.atlas-deps.yml

Rust + WASM AI-agent-native audio creation platform — audio graph, euclidean rhythms, Schroeder reverb, 9 genre KBs, MIDI export, 1342 WAV samples.

Exposes
  • cargo_crate: openalice-media-core
  • cargo_crate: openalice-media-music
  • cargo_crate: openalice-media-tools
  • cargo_crate: openalice-media-voice
  • cargo_crate: openalice-media-sfx

Code composition

tokei · loc
8.8kloc
  • Rust99.1%
  • TOML0.9%
  • Rust99.1%· 8,687
  • TOML0.9%· 83
Language% codecodecommentsblanksfiles
Rust99.1%8,6875851,38740
TOML0.9%836126
Markdown0.0%071372

Telemetry ribbon · last 90 days

2 events
MAYJUNJUL2026-05-21 · commit · new commit b62f5f1 → 7538e0d2026-05-22 · commit · new commit 7538e0d → dc77be5NOW
commitmanifestlifecyclekind

media/core

2 features
  • media.core.music-theory
    crates/media-core/src/time.rs:3
    Tempo (BPM↔samples, swing offset), Note (12 pitch classes, MIDI, Hz), 15-scale Scale enum (Major → Chromatic), and octave-range MIDI note sets. Shared music-theory primitives used by sequencer, melody, and genre modules.
  • media.core.pcm-buffer
    crates/media-core/src/buffer.rs:3
    Interleaved f32 PCM buffer with mono/stereo helpers, WAV read/write (hound), equal-power crossfade, peak normalize, and clamp. Shared foundation for all audio processing in the openalice-media workspace.

media/music

6 features
  • media.music.arrangement
    crates/media-music/src/arrangement.rs:3
    `Song` holds named `Track`s and ordered `Section`s (intro→build→drop→outro). Each section activates a subset of tracks with gain overrides; master chain applies compressor + saturator per section. `demo_song` builds a 32-bar structured track from the sample library at runtime. A `Song` consists of named `Section`s (intro, verse, drop, etc.) arranged in sequence. Each section specifies which tracks are active and at what gain. The engine renders sections sequentially with optional crossfades.
  • media.music.audio-graph
    crates/media-music/src/graph.rs:3
    Directed acyclic graph (petgraph StableGraph) of DspNode processors. Topological sort ensures correct processing order; cycle detection prevents hangs. Core routing primitive for all rendered audio in openalice-media. Topological sort ensures correct processing order (sources → sinks). Multiple inputs to a node are passed as `&[&Block]`.
  • media.music.automation
    crates/media-music/src/automation.rs:3
    Keyframed `Automation` curves (step/linear/S-curve/exponential), `FilterSweep` (LP/HP with perceptually-linear exponential sweep), `SidechainCompressor` with `house_pump()` preset, and `NoiseRiser` (white noise through sweeping HP filter). All implemented as `DspNode`s for direct placement in the audio graph. These are time-varying DSP nodes that change parameters over the course of a section or song, enabling professional production techniques.
  • media.music.genre-knowledge
    crates/media-music/src/genres.rs:3
    9 GenrePresets (House, Techno, DnB, Hip-Hop, Lo-fi, Psytrance, Classical, EDM, Ambient) each with BPM range, sub-genres, moods (energy/darkness/tempo bias), AI prompt template, drum hints, effects chain, and recommended samples. `genre_prompt(genre, mood, sub_genre)` builds a structured prompt for an LLM agent to generate genre-correct music from scratch. Each genre defines: BPM range, time signature, recommended samples, chord progressions, patterns, effects chain, and sub-genres with moods. An AI agent reads these presets to generate genre-appropriate tracks.
  • media.music.mini-notation
    crates/media-music/src/notation.rs:3
    Compact pattern DSL: sequences, subdivisions `[a b]`, alternations `<a b>`, Euclidean rhythms `(3,8)`, speed `*n`/`/n`, rests `~`. Bjorklund algorithm for Euclidean distribution. Pattern→DrumPattern conversion for audio rendering. Compact notation for patterns: ```text "bd sd [hh hh] cp" → kick, snare, two hi-hats (subdivided), clap "bd*2 sd" → kick played twice fast, then snare "bd/2" → kick at half speed "<bd sd cp>" → alternate between kick, snare, clap each cycle "(3,8)" → euclidean rhythm: 3 hits in 8 steps "~ bd" → rest, then kick ```
  • media.music.pattern-dsl
    crates/media-music/src/pattern.rs:3
    Human- and LLM-writable grid notation: "kick: x . x . | . . x ." Parses named tracks, maps instrument names to DrumSound variants, and renders to AudioBuffer via BPM-locked sample placement. Patterns use a simple grid notation that is both human-readable and LLM-parseable: ```text ``` Each `x` = hit, `.` = rest, `|` = bar divider (visual only).

media/tools

1 feature
  • media.tools.agent-interface
    crates/media-tools/src/lib.rs:3
    JSON-schema tool definitions + typed Rust handlers for OpenAI/Anthropic function-calling: `music_pattern_create`, `music_render` (→WAV), `music_midi_export` (→SMF). The main OpenAlice agent calls these tools; handlers dispatch to media-music internals and return human-readable results. Provides tool schemas and handlers for the OpenAlice agent system: - `music_pattern_create` — create drum/melody patterns from notation - `music_render` — render patterns to audio (WAV) - `music_midi_export` — export patterns to MIDI files - `music_play` — preview audio in the browser