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

[NCSF] Hilarous pitch bend effect on some instruments in some songs. #7

Closed
AmiSapphire opened this issue Aug 19, 2024 · 4 comments
Closed

Comments

@AmiSapphire
Copy link
Contributor

AmiSapphire commented Aug 19, 2024

Grabbed a compiled build dated May 15, 2022 from here and ran into this. Most notable in Battle! Team Plasma from Pokémon Black and White, in which some other instruments play wrong as well. That song plays fine with the ancient 12-09-2014 v1.11.1 NCSF build plugin.

Sample here. (joshw download), 2SF comparison. (joshw download)

Update: the July 9, 2020 compiled build plays Battle! Team Plasma fine, so a commit post-dating that build did... something.

Update 2: Sunyshore City (Day) from Pokémon Diamond and Pearl is also affected, but that one is quite subtle.

@CyberBotX
Copy link
Owner

NCSF having incorrect playback of some music is a problem I know exists. It has something to do with the way that the underlying FSS code I used handles things (but I don't recall what the exact problem is). Others have looked into patching the code to make it work, whereas I've been attempting to replace the player with one based on the decompilation of Pokémon Diamond, as it should give me, in theory, better output. But I haven't set aside enough time to finish that update and make sure it still works. Last time I looked into it, it seemed to fix some things but cause problems like clipping elsewhere. I'll eventually get around to replacing the player, but it won't be any time soon.

As for it being correct in the July 9, 2020 build but not the one you downloaded from the GitHub issue, I am not sure why that would be the case, and there has been far too many changes to the code to narrow things down.

@AmiSapphire
Copy link
Contributor Author

AmiSapphire commented Aug 20, 2024

Found the commit that caused it in the first place: 3f890b6 However, that was rewritten over time, so I had to find those rewritten lines, remove them, and recompile to test: NCSF SSEQPlayer, Track.cpp, Line 698 NCSF SSEQPlayer, Track.cpp, L704 - I should experiment if one specific line really affects this rather than both. Either way, Battle! Team Plasma plays well now.

I eyed that commit from the start before I made the issue, to be honest. (Just didn't have a VS2019 setup until now.) Though, it's pretty amusing it mostly affects some of the Pokémon music in various ways.

Update: It's Line 698 of NCSF SSEQPlayer, Track.cpp (the PortamentoTime command) that really affected some Pokémon music. I re-added the line that was in Line 704 (the SweepPitch command) and it wasn't the cause.

@CyberBotX
Copy link
Owner

Interesting, and it is possible that was just one of the potential "fixes" that others have tried in order to patch the current player. I think one of the biggest reasons to replace the player is mainly that the underlying code, fincs' FeOS Sound System (which was meant to run on a DS under the homebrew OS FeOS) is also around a decade old at this point. The last few changes fincs made were probably because of the problems found when using it for NCSF.

@AmiSapphire
Copy link
Contributor Author

Fixed per #8. 🙂

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