/
/
# What does this implement/fix? When Smart Fades finishes analysing a track it runs the beat detection model, and until now that ran as one long block of work. On a small server that is one core fully occupied for several seconds in one go, while music is playing. It turns out Beat This already predicts a long track as a series of 30-second windows internally — it was simply doing all of them behind a single call. This runs those same windows from our side instead, so the work arrives in short pieces, and while a player is streaming it waits a moment between pieces instead of running them back to back. Detection results are unchanged. ## Changes - Beat detection now runs window by window rather than as one long block. - While a player is streaming, it pauses between windows so it never occupies a core continuously (roughly halves the CPU it takes at any moment). Idle and nightly scans still run at full speed. - Other analysis work (and a track skip) no longer has to wait for a whole track's inference to finish first. - Added a test that pins the windowed result to Beat This' own whole-track prediction. - Corrected two stale notes in the README files. ## Types of changes - [ ] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [ ] New feature (non-breaking change which adds functionality) — `new-feature` - [ ] Enhancement to an existing feature — `enhancement` - [ ] New music/player/metadata/plugin provider — `new-provider` - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) — `breaking-change` - [ ] Refactor (no behaviour change) — `refactor` - [ ] Documentation only — `documentation` - [x] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `pytest` passes, and tests have been added/updated under `tests/` where applicable. - [ ] For changes to shared models, the companion PR in `music-assistant/models` is linked. - [ ] For changes affecting the UI, the companion PR in `music-assistant/frontend` is linked. - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have [raised a PR against the documentation repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md) targeting the main or beta branch as appropriate.