fix(bass-presets): move factory presets to channel subdirs + per-channel install

Root cause: factory presets for bass (banks 17-20) sat in the root
factory dir alongside guitar presets, and install_factory_presets()
used rglob() which picked up ALL presets into the GUITAR channel.

Changes:
- Move bank_17-20 from presets/factory/ → presets/factory/bass/
  (matching the existing keys/, vocals/, backing_tracks/ layout)
- Fix install_factory_presets() to scan channel-specific subdirectory:
  GUITAR scans root bank_* dirs, all others scan <channel>/bank_*
- Fix main.py to iterate over all 5 channels when installing factory
  presets (was only installing into GUITAR)
- Import Channel enum in main.py

Tests: 56/56 preset manager tests pass. Integration verified:
- GUITAR: 68 presets (banks 0-16)
- BASS: 16 presets (banks 17-20, SansAmp/Darkglass/Ampeg SVT)
- KEYS: 12 presets (banks 21-23)
- VOCALS: 12 presets (banks 24-26)
- BACKING_TRACKS: 12 presets (banks 27-29)
This commit is contained in:
2026-06-13 10:23:57 -04:00
parent 575535762c
commit 659e53766a
25 changed files with 162 additions and 10 deletions
+9 -5
View File
@@ -28,7 +28,7 @@ from src.dsp.pipeline import AudioPipeline
from src.dsp.nam_host import NAMHost
from src.dsp.ir_loader import IRLoader
from src.presets.manager import PresetManager
from src.presets.types import MIDIMapping, Preset
from src.presets.types import Channel, MIDIMapping, Preset
from src.midi.handler import MIDIHandler
from src.ui.footswitch import FootswitchController, FootSwitch, SwitchAction
from src.ui.leds import LEDController, LEDDriver, LEDConfig, LEDPattern
@@ -170,11 +170,15 @@ class PedalApp:
audio_pipeline=self.pipeline,
)
# Install factory presets (non-destructive by default)
# Install factory presets for all channels (non-destructive by default)
if pcfg.get("install_factory", True):
installed = self.presets.install_factory_presets(overwrite=False)
if installed:
logger.info("Installed %d factory preset(s)", installed)
for ch in Channel:
installed = self.presets.install_factory_presets(
overwrite=False, channel=ch,
)
if installed:
logger.info("Installed %d factory preset(s) for %s",
installed, ch.value)
ir_installed = self.presets.install_factory_irs(overwrite=False)
if ir_installed:
logger.info("Installed %d factory cab IR(s)", ir_installed)