beatflow-skill
Compose, revise, validate, compare, inspect, and export original multi-track music as Standard MIDI with BeatFlow's compact, style-neutral Python DSL. Use for turning a musical brief into a deterministic Composition, testing explicit phrase/counterpoint/theme contracts, or inspecting MIDI.
The English summary is being prepared. Showing the original description.
See how to installFiles included (26)
- SKILL.md3.1 KB
- agents/openai.yaml220 B
- LICENSE34.3 KB
- references/architecture.md1.1 KB
- references/composition-format.md3.1 KB
- references/diagnostics.md1.3 KB
- requirements.txt29 B
- scripts/beatflow_core/__init__.py871 B
- scripts/beatflow_core/cli.py11.1 KB
- scripts/beatflow_core/composer.py33.0 KB
- scripts/beatflow_core/composition_compiler.py19.1 KB
- scripts/beatflow_core/composition_diagnostics.py19.6 KB
- scripts/beatflow_core/composition_models.py22.2 KB
- scripts/beatflow_core/composition_validation.py18.1 KB
- scripts/beatflow_core/counterpoint_diagnostics.py24.9 KB
- scripts/beatflow_core/diagnostic_models.py1.1 KB
- scripts/beatflow_core/harmony_utils.py3.9 KB
- scripts/beatflow_core/inspect_midi.py4.4 KB
- scripts/beatflow_core/meter.py1.9 KB
- scripts/beatflow_core/models.py1.1 KB
- scripts/beatflow_core/realized_score.py1.6 KB
- scripts/beatflow_core/renderer.py9.1 KB
- scripts/beatflow_core/thematic_diagnostics.py10.3 KB
- scripts/beatflow_core/validation.py987 B
- scripts/beatflow.py241 B
- scripts/run.py3.4 KB
SKILL.md (original)
Review the instructions the agent will receive before you install.
BeatFlow
Use Codex for musical decisions and BeatFlow for exact timing, functional pitch realization, validation, diagnostics, MIDI rendering, and inspection.
Run python "<skill-root>/scripts/run.py" <command> .... Write scripts and
outputs in the user's workspace, never inside <skill-root>.
Workflow
- Extract duration, tempo, meter, tonal center, form, instrumentation, energy path, priorities, and exclusions. Make reversible assumptions when needed.
- Read composition-format.md before authoring. Read diagnostics.md only when adding explicit contracts, comparing candidates, or revising findings. Read architecture.md only for runtime maintenance.
- Plan the shared clock, harmony, bass, role entries, rests, foreground, arrivals, and development before adding decoration.
- Author a trusted Python file whose
build()returnsComposition. PreferSongBuilderand exactbeat()values. Style belongs in authored material, not compiler branches. - Keep identity-bearing material recognizable before transforming it. Declare phrases, interactions, counterpoint, themes, or silence only when the brief makes them testable.
- Render and inspect:
python "<skill-root>/scripts/run.py" compose song.py --midi song.mid --composition song.composition.json --report song.report.json
- Treat validation errors as hard failures. Treat diagnostics as evidence against declared intent, never as a universal taste score. Listen before making the final musical judgment.
Constraints
- Keep timing quantized unless the user explicitly requests timing variation.
- Count the perceptual tactus; do not assume every quarter note is one felt beat.
- Preserve essential instruments; repair writing or balance before dropping them.
- Give foreground a clear rhythmic identity, internal contrast, and arrival.
- Coordinate roles without forcing identical attacks.
- Use
top_targetwhen a chord's top voice carries the line. - Keep all realized onsets and durations explicit.
- Create original music; do not copy a reference melody or imitate a living artist.
- Treat General MIDI as a preview, not final production timbre.
Commands
compose SCRIPT --midi MIDI [--composition JSON] [--report JSON]analyze COMPOSITION [--output REPORT]compare COMPOSITION... [--revision] [--output REPORT]inspect [MIDI|COMPOSITION] [--schema] [--output REPORT]self-check
Interruptions
The Python source is the durable checkpoint. --composition is written
atomically before MIDI rendering, and MIDI/report outputs are also atomic.
After interruption, rerun the same command; deterministic realization restarts
cheaply without requiring an internal project cache.
Reviews
No reviews yet. Tell others what you thought.
Comments
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.