Update .wav samples to use 'agbl' chunk to accomodate for vanilla's off-by-one loop end behavior #712
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.
Vanilla instruments (and cries) have an off-by-one error in their loop-end. This off-by-one "bug" has been baked into
aif2pcmin the past, and was also baked intowav2agbduring that recent migration to .wav files. This was potentially problematic for custom samples created over the years because people worked around that off-by-one behavior with their .aif files by specifying an extra "+1" for the loop-end marker in the .aif file. During the .wav migration, this info was lost when translating the .aif -> .wav file, possibly resulting in clear audio artifacts and/or detuning.I believe the simplest and least paniful way to address this is to mark the vanilla samples as "special" by teaching
wav2agbabout a new custom chunk calledagbl, which contains a loop-end override. This allows vanilla samples to embed their buggy off-by-one loop end, while custom-made samples will work as expected and result in a normal loop end value.It's possible that there are custom samples out there that rely on the buggy off-by-one behavior. If anyone is affected by that, they can update their samples to include the
agblchunk by running the following command: