lmms
lmms copied to clipboard
Changing BPM on sliced samples is broken
Bug Summary
As the title says, when you change the BPM of your song after having correctly sliced one or more samples according to your needs, will mess up with the sample, considering the start of the clip the original start of the sample and not where you sliced it/them. Having this behaviour will need a rerender of the sliced part everytime you wanna change bpm and it's not comfortable.
Steps to reproduce
- Open LMMS and load up a sample, then set the bpm as the sample sayd to have it playing in time.
- Slice the sample as you please
- Now change the BPM of the track as you may prefer (imagining you've changed idea on how fast you want the song to be)
As you can see the end result is broken and not what you chose to slice out of the original sample.
Expected behavior
The expected behaviour can be seen in FL Studio following the same steps
Sliced sample before changing the BPM
After changin the BPM
Affected LMMS versions
LMMS 1.3.0 Alpha 1.102, Windows 10 Home 64bit
Unrelated to the knife tool and duplicate of #4153
I was going to agree with you @RoxasKH that this bug report brings to light something not mentioned in the other one...
Then I realized that @Spekular is right. Both bugs are due to SampleClip storing it's length and offset as a TimePos. A TimePos is affected by BPM, but it stays constant in relation to the rest of the song.
If sample clip instead stored it's length and offset as number of sample frames it would stay constant in relation to the sample itself, but vary in relation to the rest of the song.
Probably the easiest solution would be to just recalculate these two values on a BPM change.