Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new dB + per-bin spectrum assumptions in WaveformView are incompatible with the existing JavaFX spectrum producer, likely breaking visualization for the JavaFX backend.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the audio spectrum pipeline to map spectrum bins to frequency correctly (up to Nyquist), and bumps the project version to 0.1.1 for release packaging.
Changes:
- Extend
VisualizationFrameto carrymaxFrequencyHzand propagate Nyquist (sampleRate / 2) from the JavaSound engine into the UI. - Rework JavaSound spectrum generation to return per-bin linear amplitudes, and update
WaveformViewto perform logarithmic frequency banding plus a dB-based display projection. - Bump release/version metadata from
0.1.0to0.1.1in Maven and the release workflow.
File summaries
| File | Description |
|---|---|
src/main/java/club/muimi/kimusic/view/component/WaveformView.java |
Consume per-bin spectrum + Nyquist, remap to log-frequency bands, and render using dB normalization. |
src/main/java/club/muimi/kimusic/service/playback/VisualizationFrame.java |
Add maxFrequencyHz to carry Nyquist through the visualization pipeline. |
src/main/java/club/muimi/kimusic/service/playback/JavaSoundPlaybackEngine.java |
Compute calibrated per-bin linear amplitudes and attach Nyquist when publishing frames. |
pom.xml |
Version bump to 0.1.1. |
.github/workflows/release.yml |
Update packaged artifact names and jpackage app version to 0.1.1. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+168
to
+171
| float raw = (float) (spectrum[index] * displayScale); | ||
| double db = 20 * Math.log10(raw + 1e-12); | ||
| double normalized = (db + 120) / 120; | ||
| double magnitude = Math.max(0.025, Math.min(1.0, normalized)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.