Files
renato97 014e636889 feat: professional reggaeton production engine — 7 SDD changes, 302 tests
- section-energy: track activity matrix + volume/velocity multipliers per section
- smart-chords: ChordEngine with voice leading, inversions, 4 emotion modes
- hook-melody: melody engine with hook/stabs/smooth styles, call-and-response
- mix-calibration: Calibrator module (LUFS volumes, HPF/LPF, stereo, sends, master)
- transitions-fx: FX track with risers/impacts/sweeps at section boundaries
- sidechain: MIDI CC11 bass ducking on kick hits via DrumLoopAnalyzer
- presets-pack: role-aware plugin presets (Serum/Decapitator/Omnisphere per role)

Full SDD pipeline (propose→spec→design→tasks→apply→verify) for all 7 changes.
302/302 tests passing.
2026-05-03 23:54:29 -03:00

2.2 KiB

Tasks: Section Energy Curve

Phase 1: Schema + Foundation

  • 1.1 Add vol_mult: float = 1.0 field to ClipDef in src/core/schema.py
  • 1.2 Add TRACK_ACTIVITY dict and _section_active() helper to scripts/compose.py
  • 1.3 Add SECTION_MULTIPLIERS dict and update build_section_structure() to set velocity_mult and vol_mult per section type
  • 1.4 Rename buildpre-chorus in SECTIONS and DRUMLOOP_ASSIGNMENTS in scripts/compose.py

Phase 2: Builder Refactor

  • 2.1 Refactor build_drumloop_track() — use _section_active() instead of DRUMLOOP_ASSIGNMENTS dict lookup
  • 2.2 Refactor build_perc_track() — replace if section.name in (...) with _section_active()
  • 2.3 Refactor build_bass_track() — replace section.energy with section.velocity_mult for velocity calc
  • 2.4 Refactor build_chords_track() — use _section_active() for section check, velocity_mult for velocity
  • 2.5 Refactor build_lead_track() — use _section_active() for section check, velocity_mult for velocity
  • 2.6 Refactor build_clap_track() — use _section_active() instead of section.name.startswith(...)
  • 2.7 Refactor build_pad_track() — use _section_active() for section check, velocity_mult for velocity

Phase 3: RPPBuilder D_VOL Emission

  • 3.1 Update _build_clip() in src/reaper_builder/__init__.py to emit D_VOL when clip.vol_mult != 1.0 and clip is audio
  • 3.2 Update _build_midi_source() to scale notes by clip.vol_mult (post-processing fallback)

Phase 4: Tests

  • 4.1 Add test_build_section_structure_sets_multipliers to tests/test_section_builder.py — verify per-section velocity_mult/vol_mult
  • 4.2 Add test_section_active_helper — edge cases: unknown section, unknown role, all known combos
  • 4.3 Add test_clipdef_vol_mult_default to tests/test_core_schema.py
  • 4.4 Add test_dvol_emission to tests/test_reaper_builder.py — audio clip vol_mult≠1.0 emits D_VOL, default vol_mult=1.0 does not
  • 4.5 Update test_compose_integration.py — verify sparse intro (no bass/chords/lead) vs dense chorus, section rename
  • 4.6 Run full test suite (167 tests) — 161 pass, 6 pre-existing failures in test_chords.py (unrelated)