Files
reaper-control/sdd/fix-drum-sample-paths/design.md
renato97 8562bfbed1 fix: real preset data for all VST2/VST3 plugins, template system with ground-truth registry
- Extracted preset data from all_plugins_v2.rpp for 14 previously broken plugins
- Fixed PLUGIN_REGISTRY entries: Kontakt 7, Gullfoss, ValhallaDelay, VC 160/76, The Glue
- Template parser falls back to PLUGIN_PRESETS when source RPP has fake data
- Substitute Transient Master (not installed) with FabFilter Pro-C 2
- All 25 plugins now load correctly in REAPER
- Added template generator scripts and ground truth references
- Cleaned up temp/debug files from output/
2026-05-03 18:54:40 -03:00

2.3 KiB
Raw Blame History

Design: fix-drum-sample-paths

Type: bugfix
Bug: Drum samples silent — samples_dir/output/samples/ paths point to nonexistent directory
Root cause: compose_full_track.py passes bare filenames to skeleton, which joins them with samples_dir expecting output/samples/. But pick() returns absolute paths from the sample library. The mismatch makes FL Studio look in the wrong place.


Changes

1. scripts/compose_full_track.py — lines 201210

Problem: samples dict receives bare filenames (ch10_perc, etc.) but skeleton needs absolute paths.

Fix: Change the samples dict to use the path* variables returned by pick(), which are absolute paths.

# Before (broken)
samples = {
    "channel10": ch10_perc,   # bare filename e.g. "perc_loop.wav"
    ...
}

# After (fixed)
samples = {
    "channel10": path10,      # absolute path e.g. "C:\Users\...\library\perc_loop.wav"
    ...
}

The path* variables already exist and hold m.get("original_path") from pick(). No other code needs changing — the samples dict key→channel mapping is already correct.


2. src/flp_builder/skeleton.py_patch_sample_path() around line 361

Problem: _patch_sample_path() always joins wav_name with self.samples_dir, which breaks when wav_name is already an absolute path (as it now is after fix #1).

Fix: Add an absolute-path guard before joining:

# In _patch_sample_path(), replace line 361:
# Before
full_path = os.path.join(self.samples_dir, wav_name)

# After
if Path(wav_name).is_absolute():
    full_path = wav_name
else:
    full_path = os.path.join(self.samples_dir, wav_name)

This preserves existing behavior for relative paths (used elsewhere) while correctly handling the absolute paths now being passed.


Files affected

File Lines Change
scripts/compose_full_track.py 201210 Use path* vars instead of ch*_var vars
src/flp_builder/skeleton.py 361 Add is_absolute() guard

Verification

  • Before fix: compose_full_track.py prints ch10: some_file.wav (bare filename)
  • After fix: compose_full_track.py prints full paths, skeleton detects them and skips join
  • Run python scripts/compose_full_track.py — FLP should load drum samples correctly