Add parametric equalizer with interactive frequency response curve
I noticed a gap in the market for music players that have really decent, but easy to use, Parametric EQ capabilities. Amperfy is my go-to music player. So I wrote one!
This PR swaps the existing graphic EQ system for a comprehensive Parametric EQ system.
I've run it through the testing and formatting tools in the Amperfy repo, all of which pass. I've built it locally on my Mac and tested using simulators, but would welcome on-device testing.
It would be great to be able to allow the user to switch between the existing graphic and Parametric EQ's. Happy to build this functionality out if useful.
- Replace fixed 10-band graphic EQ with fully parametric EQ
- Support Bell, Low Shelf, and High Shelf filter types
- Add interactive frequency response curve with draggable nodes
- Implement undo/redo stack
- Add automatic migration from legacy graphic EQ presets
- Include unit tests for band parameters and migration logic
### Features:
- **Interactive frequency response curve** with draggable band nodes
- **Flexible filter types**: Bell (parametric), Low Shelf, High Shelf
- **Per-band controls**: Frequency (20Hz-20kHz), Gain (-12 to +12 dB), Q (0.1-10.0)
- **Professional features**: Undo/Redo, A-B comparison, global bypass
- **Automatic migration** from existing graphic EQ presets
## Changes
### New Files
- `Amperfy/SwiftUI/Settings/Player/ParametricEQ/` (5 files)
- `AmperfyKitTests/Cases/Player/ParametricEQTest.swift`
### Modified Files
- `AmperfyKit/Storage/PersistentStorage.swift` - New types and settings
- `AmperfyKit/AmperfyKit.swift` - Migration logic
- `AmperfyKit/Player/BackendAudioPlayer.swift` - Parametric EQ engine
- `AmperfyKit/Player/PlayerFacade.swift` - Protocol update
- `Amperfy/SwiftUI/Settings/ObservableSettings.swift` - Observable properties
- `Amperfy/SwiftUI/Settings/Player/EqualizerSettingsView.swift` - UI rewrite
- `Amperfy/Screens/ViewController/SettingsHostVC.swift` - Settings bindings
## Testing
- [x] Unit tests for band parameters and migration
- [x] Manual testing on device
- [x] Code formatted with `./BuildTools/applyFormat.sh`
## Screenshots
<img width="425" height="884" alt="image" src="https://github.com/user-attachments/assets/fc5e44de-ee85-4578-b884-dfe984ed7452" />
<img width="428" height="898" alt="image" src="https://github.com/user-attachments/assets/b4681393-98e0-4fea-aa3e-197ffed53561" />
合并状态:未合并 1 条评论