Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing tempo with Fxx effect slows down song every time you use it #376

Closed
nyanpasu64 opened this issue Jun 21, 2021 · 4 comments · Fixed by #385
Closed

Changing tempo with Fxx effect slows down song every time you use it #376

nyanpasu64 opened this issue Jun 21, 2021 · 4 comments · Fixed by #385
Labels
bug Something isn't working

Comments

@nyanpasu64
Copy link
Contributor

nyanpasu64 commented Jun 21, 2021

Checklist

  • I am reporting exactly 1 bug with this issue.
  • This bug hasn't already been reported.
  • This bug hasn't already been fixed in the latest development build.

Bug Description

Every time you use Fxx to change a song's tempo mid-song, it resets the "partial" progress into the current row. So placing a Fxx on every row effectively rounds the song down to the next slower speed.

(Oxx groove effects do not cause a delay.)

How to reproduce

  1. Create an empty document, and add regularly spaced notes to act as a metronome.
  2. Either place a single Fxx effect at the top with xx >= 20, or place Fxx effects on every row with the same xx value.
  3. Compare their tempos.

For example, F80 (128 bpm) is just slightly slower than speed 7 (128.57 bpm), but if you spam F80 every row, you get speed 8 instead (112.5 bpm). The effect is more dramatic at higher tempos; for example, my example module uses FFF, which has a clearly audible change in tempo when spamming Fxx.

Example module: bambootracker fxx tempo bug.btm.zip

Screenshot_20210620_212121

System Information

  • Operating System: Arch Linux
  • BambooTracker Version: unstable-0142df4c01401c5ea525b68e9568fd3fd4063392
  • Build Type: AUR build from source
@nyanpasu64 nyanpasu64 added the bug Something isn't working label Jun 21, 2021
@rerrahkr
Copy link
Member

Thanks for your report. In BT, the step size is dynamically changed according to the tempo. In this case, the tempo is reset in each row, so the step size is not dynamically changed.
I will try not to reset the tempo if it is set the same as the previously set one.

@nyanpasu64
Copy link
Contributor Author

If you ignore Fxx effects which don't change the tempo, it won't fix the real-world problem: using a Fxx effect on every row to simulate a tempo slide (ritardando/accelerando) will still result in the playback rate being rounded to the next slowest integer speed, instead of the fractional speeds achievable with a tempo.

@rerrahkr
Copy link
Member

I know, but at the moment it's hard to think of a solution that would essentially solve that problem.

Many MML drivers for YM2608 use built-in timers to set the playback speed more precisely. In these drivers, the number of ticks in a whole note is fixed. It's too late now, but BambooTracker should have had such a playback system.

@rerrahkr
Copy link
Member

not to reset the tempo if it is set the same as the previously set one.

For now, I fixed it in 2ac8e4c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants