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

Trackerboy playback speed differs from gbt-player in emulators #15

Closed
tadashibashi opened this issue Nov 13, 2022 · 2 comments
Closed

Comments

@tadashibashi
Copy link

tadashibashi commented Nov 13, 2022

Bug description

Trackerboy playback is slightly slower than playback in emulators (tested in SameBoy, Emulicious, GB Studio).
I'm using GB Studio's GBT Player with the same tick speed as in Trackerboy. Either increasing or decreasing tick speed doesn't align.

How to reproduce

  1. Write equivalent song with tempo ticks in .mod (F04) file as a .tbm (F40)
  2. Play back .mod in GB Studio or build ROM to test in other emulators

Information

  • Trackerboy version: v0.6.2

SourceFiles.zip
GBSpeedComparisonFiles.zip

@tadashibashi tadashibashi changed the title Trackerboy playback differs from gbt-player in emulators Trackerboy playback speed differs from gbt-player in emulators Nov 13, 2022
@stoneface86
Copy link
Owner

stoneface86 commented Nov 13, 2022

Interesting, I'm guessing the naive assumption of a vblank being exactly 59.7 Hz is the cause as each tick gets samplerate / 59.7 samples (with an extra sample on some ticks after accumulating the remainder).

I'll have to test this in the Nim rewrite to see if the same problem occurs there, which would confirm this is an architectural problem with the emulator.

@tadashibashi
Copy link
Author

tadashibashi commented Nov 16, 2022

I built a rom outside of GB Studio using their version of gbt-player and it's playing back at the speed of Trackerboy. I have no idea what the issue could be, but it's definitely on their end. Even the example files are playing back at the wrong speed.

Edit: I confirmed with one of the developers (Rulz) that this is an effect of GB Studio 3.0+ sound engine feature. It's running at a 64Hz tick speed to support playing WAV files at an even sample rate. 16384hz / 64 = 256hz (sample update) / 4 = 64hz music update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants