Attempt to preserve sample control point bank when encoding beatmap #32098
+3
−1
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.
RFC. Opening as draft as I'm not sure whether this is going to be accepted, and what the wider implications of this change may end up being.
This was reported internally in https://discord.com/channels/90072389919997952/1259818301517725707/1343470899357024286. The issue described was that sample specifications on control points in stable disappeared after the beatmap was updated from lazer.
The reason why the sample specifications were getting dropped is that they got lost in the logic that attempts to translate per-hitobject samples that lazer has back into stable "green line" type control points. That process only attempted to preserve volume and custom sample bank, but did not keep the standard bank - likely because it's kind of superfluous information for correct sample playback of the objects, as the samples get encoded again for each object individually. However dropping this information makes for a subpar editing experience.
The choice of which sample to pick the bank from is sort of arbitrary and I'm not sure if there's a correct one to pick. Intuitively picking the normal sample's bank (if there is one) seems most correct.
The reproduction case given was senya - Koakuma Ringo (EUROBEAT Remix).zip (included with permission), which after submission from lazer turned into 2225109 senya - Koakuma Ringo (EUROBEAT Remix).zip.
The changes in question:
I can probably make a test case for this but it's a bit annoying. None of our existing conversion stability can really cover this because they either test that consecutive exports from lazer are stable, or if they test just normal stability, they don't exercise sample control points for obvious reasons.
I'm somewhat certain this shouldn't break stuff because the per-object samples should take precedence over control point specs, but I'm not super sure how to verify that in any robust way.