Files
reaper-control/.sdd/changes/smart-chords/tasks.md
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

1.6 KiB

Tasks: Smart Chord Engine

Phase 1: Foundation

  • 1.1 Create src/composer/chords.py with EMOTION_PROGRESSIONS dict and ChordEngine.__init__(key, seed)
  • 1.2 Implement ChordEngine._get_degrees(emotion) — resolve emotion → degree/quality list with classic fallback
  • 1.3 Implement ChordEngine._apply_inversion(voicing, inversion) — reorder notes so target is lowest (root=0, first=1, second=2)

Phase 2: Core

  • 2.1 Implement ChordEngine._score_voicing(prev, cand) — sum abs semitone diff per voice pair
  • 2.2 Implement ChordEngine._voice_leading(chords, inversion) — greedy min-score path, cap 4 semitones/voice
  • 2.3 Implement ChordEngine.progression(bars, emotion, bpc, inversion) — full pipeline: degrees → chords → voice leading → output

Phase 3: Integration

  • 3.1 Modify build_chords_track() in scripts/compose.py to import + instantiate ChordEngine, delegate chord generation
  • 3.2 Add --emotion and --inversion CLI flags to scripts/compose.py (default: romantic, root)
  • 3.3 Wire section energy (vm) from existing section loop into note velocity scaling

Phase 4: Testing

  • 4.1 Create tests/test_chords.py — unit test determinism: same seed → same output (R1)
  • 4.2 Test voice leading: assert max semitone diff ≤ 4 across all adjacent chord pairs (R2)
  • 4.3 Test inversions: assert bass note matches root/third/fifth (R3)
  • 4.4 Test emotion divergence: all 4 emotions produce distinct progressions (R4)
  • 4.5 Integration: compose.py --emotion dark --output test.rpp produces chords track using dark progression (R7)