feat: separate preset banks per channel (guitar/bass)

- Channel enum (GUITAR, BASS) with channel field on Preset dataclass
- Channel-prefixed storage: {root}/{channel}/bank_{bank}/preset_{program}.json
- PresetManager channel awareness: set_channel(), current_channel property
- Per-channel state persistence (channel_state.json per channel dir)
- Legacy migration: flat bank_* dirs auto-migrate to guitar/ on first boot
- All CRUD methods accept optional channel parameter
- API endpoints accept channel param on GET/PUT/DELETE /api/presets
- /api/channel GET/POST for channel switching
- 10 new channel tests (independence, switching, migration, scoping)
- Factory presets install to specified channel
This commit is contained in:
2026-06-12 23:22:47 -04:00
parent 0a21297f77
commit bfe1434f75
10 changed files with 1100 additions and 352 deletions
+6
View File
@@ -32,6 +32,7 @@ def mock_presets():
pm = MagicMock()
pm.current_bank = 0
pm.current_program = 0
pm._current_snapshot = 0
pm.load.return_value = Preset(name="Default", bank=0, program=0)
return pm
@@ -41,6 +42,11 @@ def mock_pipeline():
pl = MagicMock()
pl._bypassed = False
pl._tuner_enabled = False
pl._tuner_frequency = 0.0
pl._tuner_note = '--'
pl._tuner_cents = 0
pl._tuner_string = -1
pl._tuner_confidence = 0.0
pl._master_volume = 0.8
pl.routing_mode = "mono"
pl.routing_breakpoint = 7