AGENT SKILL

midi-preprocessing

Inspect and adapt deepjazz MIDI preprocessing, Metheny part assumptions, and grammar corpus extraction before LSTM generation.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
midi-preprocessing
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Inspect and adapt deepjazz MIDI preprocessing, Metheny part assumptions, and grammar corpus extraction before LSTM generation.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

deepjazz MIDI Preprocessing

Use this sub-skill when a task is about preparing or diagnosing MIDI input for deepjazz: checking whether a file matches the default Metheny assumptions, changing melody/accompaniment part selection, extracting chords and measures, or producing grammar corpus inputs for the LSTM route.

Do not rely on reading or running the original preprocessing script at runtime. This sub-skill distills the relevant behavior and provides a safe bundled inspection helper.

Route elsewhere

Start with a MIDI compatibility pass

  1. Make sure music21 can parse the candidate MIDI file.

  2. Run the bundled structure inspector before training or changing generator settings:

    python scripts/inspect_midi_structure.py --midi-file <input.mid> --melody-part 5 --accompaniment-parts 0,1,6,7 --start-offset 476 --end-offset 548
    
  3. If the report warns that the melody part, accompaniment parts, or offset window do not contain the expected material, adapt the part indices/window before sending the file to the LSTM workflow.

  4. Only after the file has plausible melody and chord material should you route to grammar extraction or generation.

What to read or run

  • Read references/midi-preprocessing.md for the distilled get_musical_data(data_fn) and get_corpus_data(abstract_grammars) workflow, including the output objects expected by generation.
  • Read references/data-assumptions.md before applying deepjazz to a new MIDI file; it lists the hard-coded Metheny arrangement assumptions and what to change.
  • Read references/troubleshooting.md when music21 cannot parse a file, part indices fail, no chords appear, or measure/chord lengths do not match.
  • Run scripts/inspect_midi_structure.py for a deterministic, no-training/no-playback report on MIDI parts, voices, offsets, chord-like events, and selected-window warnings.

Distilled API facts

Function Inputs Returns Notes
get_musical_data(data_fn) path to a MIDI file (chords, abstract_grammars) Internally parses the MIDI, selects hard-coded parts/window, groups measures, and converts melody measures into grammar strings.
get_corpus_data(abstract_grammars) list of grammar strings (corpus, values, val_indices, indices_val) Flattens grammar tokens for LSTM sequence modeling and builds token-index maps.

Boundary checklist

  • Owns: file parseability, part/window discovery, melody/chord extraction assumptions, corpus inputs.
  • Does not own: exact grammar token semantics, note-generation choices, model architecture, training safety, or audio playback.
  • Safe validation signal: a MIDI report with parse success, plausible selected melody/accompaniment material, and clear warnings for mismatches.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351