gb-studio icon indicating copy to clipboard operation
gb-studio copied to clipboard

FX hammer sfx trigger via music routine that is only ch02 also kills ch04

Open Beatscribe opened this issue 2 years ago • 4 comments

Describe the bug If you play a FxHammer sfx (from a .sav) which only uses ch02 from a 6xx music routine in a .uge, the ch02 sound plays but ch04 is also muted. This should probably not occur.

To Reproduce Steps to reproduce the behavior:

  1. Make a .uge with 600 called occasionally. The .uge should have nothing in ch02 but stuff in ch04.
  2. In any scene make an on init set music routine index 0, and the event for music routine is play sound effect, play a fx hammer sfx with only ch02 used.
  3. Run the game, you'll hear ch04 is also disabled when SFX plays.

Expected behavior CH04 should continue playing uninterupted.

See attached sample. Gb studio 3.1.0 https://drive.google.com/file/d/1WqdRPF017Fe13CCDHid4gxgL_Qe69OYC/view?usp=share_link Title screen shows how song should sound. First scene with elephant shows issue.

Beatscribe avatar Feb 15 '23 15:02 Beatscribe

~~as i get it, it is not a music routine issue, it is an FXHammer converter issue. converter does not "look" into the FXHammer save file to determine what channels are actually used and always emit the same mute mask for the channels 2 and 4.~~

untoxa avatar Feb 16 '23 08:02 untoxa

as i get it, it is not a music routine issue, it is an FXHammer converter issue. converter does not "look" into the FXHammer save file to determine what channels are actually used and always emit the same mute mask for the channels 2 and 4.

Is this message crossed out because you found out it’s not correct or ...

maxoakland avatar Feb 16 '23 15:02 maxoakland

my guess was incorrect, mute masks are ok. so it is either SFX driver code or the FXHammer converter compileFXHammer.ts issue (wrong data?)

untoxa avatar Feb 16 '23 15:02 untoxa

so. that FXHammer effect in question pans CH4 to NONE, at the beginning and pans CH4 to LR at the end, that results in muting of the CH4 for the hUGEDriver music while the effect is playing. converter handles panning incorrectly when the channel is not used.

untoxa avatar Feb 16 '23 16:02 untoxa