Funkin icon indicating copy to clipboard operation
Funkin copied to clipboard

Use chart inst offset for song resync + other resync fixes

Open Burgerballs opened this issue 1 year ago • 10 comments

resyncVocals() function in PlayState now makes use of instrumentalOffset.

This PR also halves the requirement for a resync, because 100ms is a big enough difference to greatly change timings in my personal opinion.

The resyncVocals() function now also resyncs the instrumental track the same way as the vocals.

Resyncing is checked every beat instead of every step.

This PR eliminates any and all resyncing issues players are plagued with, below is a before and after;

Before:

https://github.com/user-attachments/assets/7b822328-8787-425f-bdce-b942a3cc3156

After:

https://github.com/user-attachments/assets/379890b9-6d02-4738-8dac-90af3284a50f

Burgerballs avatar Jul 23 '24 18:07 Burgerballs

This finally fixes https://github.com/FunkinCrew/Funkin/issues/2888. Yay!

Hundrec avatar Jul 24 '24 09:07 Hundrec

Doesn't #2706 already do the desync fix?

NotHyper-474 avatar Jul 24 '24 10:07 NotHyper-474

Doesn't #2706 already do the desync fix?

I tried the pr and it doesn't fix the desync issue, this pr makes other changes in order to fix that

Burgerballs avatar Jul 24 '24 13:07 Burgerballs

LGTM

Cartridge-Man avatar Jul 24 '24 13:07 Cartridge-Man

Worked well for me when I tried it, and since it works for a bunch of other reviewers I'd say it's good.

EliteMasterEric avatar Jul 25 '24 10:07 EliteMasterEric

Any reasons the tracks are being paused though? You can just set the sound's time and move on

Sword352 avatar Jul 25 '24 16:07 Sword352

Any reasons the tracks are being paused though? You can just set the sound's time and move on

You can't just set the sound's time and move on without pausing as that would cause issues getting both the instrumental and vocals synced.

VirtuGuy avatar Jul 25 '24 19:07 VirtuGuy

Any reasons the tracks are being paused though? You can just set the sound's time and move on

Pausing both tracks at the same time stops the time variable from increasing while you're setting it, making it easier to resync, and makes it more accurate.

Burgerballs avatar Jul 26 '24 14:07 Burgerballs

Pausing both tracks at the same time stops the time variable from increasing while you're setting it, making it easier to resync, and makes it more accurate.

I was under the impression FlxSound.time only increases during the update() function.

EliteMasterEric avatar Jul 27 '24 05:07 EliteMasterEric

Pausing both tracks at the same time stops the time variable from increasing while you're setting it, making it easier to resync, and makes it more accurate.

I was under the impression FlxSound.time only increases during the update() function.

The time variable does change during the update function but it doesn't really increase if paused.

Burgerballs avatar Jul 28 '24 01:07 Burgerballs