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

Vibrato depth calculation is imperfect #15

Open
beanieaxolotl opened this issue Oct 21, 2024 · 1 comment
Open

Vibrato depth calculation is imperfect #15

beanieaxolotl opened this issue Oct 21, 2024 · 1 comment
Assignees
Labels
bug Something isn't working GAX replayer Regarding the GAX replayer help wanted Extra attention is needed

Comments

@beanieaxolotl
Copy link
Owner

This happens in quite a lot of songs I have tried. Iridion II, The SpongeBob SquarePants Movie and Camp Lazlo: Leaky Lake Games have vibrato accuracy issues, and there are more titles that are affected by this.
The vibrato depth is often deeper or shallower than how it plays on mGBA, and this results in some tracks sounding either drunk or "straightened-out".

Attempting to calculate something like this in the past was an absolute nightmare; It was either reaching extreme frequencies and crashing outright due to an overflow, or the vibrato would not be present. At this point I just gave up and placed in a nasty placeholder magic number of 200, which only works for one instrument in The SpongeBob SquarePants Movie.

For an example of this issue, I have included a comparison of Camp Lazlo: Leaky Lake Games ~ 00: Grounds as Lazlo between being played back in an emulator (mGBA), and being played back using the current version of the replayer.
campLazlo_comparison.zip

@beanieaxolotl beanieaxolotl added help wanted Extra attention is needed GAX replayer Regarding the GAX replayer labels Oct 21, 2024
@beanieaxolotl beanieaxolotl self-assigned this Oct 21, 2024
@beanieaxolotl
Copy link
Owner Author

Gotten rid of the magic number, but it is still incorrect. I made this change a while ago:

if self.is_vibrato:
    self.vibrato_subtimer += 1*self.vibrato_speed
    try:
        self.vibrato_pitch = ((sine_table[self.vibrato_subtimer%64])/127) * (self.vibrato_depth/2.5)
    except:
        self.vibrato_pitch = 0

@beanieaxolotl beanieaxolotl added the bug Something isn't working label Oct 31, 2024
@beanieaxolotl beanieaxolotl pinned this issue Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GAX replayer Regarding the GAX replayer help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant