Files
reaper-control/.sdd/changes/hook-melody/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

2.0 KiB
Raw Blame History

Tasks: Hook-Based Reggaeton Melody

Phase 1: Melody Engine Core

  • 1.1 Create src/composer/melody_engine.py with build_motif(key_root, key_minor, style, bars, seed)list[MidiNote]
  • 1.2 Implement "hook" style: arch contour, chord tones on strong beats, 48 notes
  • 1.3 Implement "stabs" style: 16th-duration hits on dembow positions [1.0, 2.5, 3.0, 3.5] per bar
  • 1.4 Implement "smooth" style: stepwise scalar eighth-note motion
  • 1.5 Implement apply_variation(motif, shift_beats, transpose_semitones)list[MidiNote]
  • 1.6 Implement build_call_response(motif, bars, key_root, key_minor, seed)list[MidiNote]
  • 1.7 Wire internal helpers: _resolve_chord_tones(), _resolve_tension_notes()

Phase 2: Integration

  • 2.1 Modify build_lead_track() in scripts/compose.py to delegate to melody_engine.build_call_response()
  • 2.2 Pass seed through to melody engine calls
  • 2.3 Keep get_pentatonic() and CHORD_PROGRESSION unchanged in compose.py

Phase 3: Testing

  • 3.1 Create tests/test_melody_engine.py with test_motif_deterministic (same seed = same output)
  • 3.2 Test test_motif_different_seeds_different_output
  • 3.3 Test test_invalid_style_raises_value_error
  • 3.4 Test test_hook_chord_tones_on_strong_beats (≥70% ratio)
  • 3.5 Test test_stabs_grid_alignment (all notes on dembow positions)
  • 3.6 Test test_smooth_stepwise_motion (consecutive ≤2 semitones)
  • 3.7 Test test_variation_preserves_note_count_structure
  • 3.8 Test test_call_ends_on_tension_response_ends_on_tonic (V/VII → i)
  • 3.9 Test test_call_response_fills_bars (motif repeats to fill section)
  • 3.10 Update test_melody_uses_pentatonic in tests/test_compose_integration.py for hook structure

Phase 4: Validation

  • 4.1 Run full test suite: pytest tests/ -x — 247/248 pass (1 pre-existing failure, unrelated)
  • 4.2 Manual verification: generate .rpp with --seed 42, confirm lead clips contain repeating motif structure