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

Background music constantly loops, even when loop is unchecked in 3.1 alpha0 (1847)

Open sttng opened this issue 2 years ago • 13 comments

Describe the bug Play music track event will loop music constantly in the exported game, even when "loop" is not checked.

To Reproduce Steps to reproduce the behavior:

  1. Create a scene
  2. Add "Play music track" event in On init tab
  3. Ensure "Loop" is not checked
  4. Export game. Music will loop.

Expected behavior Music doesn't loop / plays only once.

Platform (please complete the following information):

  • OS: macOS 10.14.6
  • App version: GB Studio 3.1 alpha0 (Pipeline: 1847)

Additional context Music Driver: GBT Player (mod file player)/

sttng avatar Aug 20 '22 07:08 sttng

At least, you do have a loop checkbox.

I don't: image

Platform:

  • OS: macOS 12.5
  • App version: GB Studio 3.1.0

Additional context: Music Driver: GBT Player (mod file player)

nagman avatar Oct 19 '22 14:10 nagman

At least, you do have a loop checkbox.

I don't: image

Platform:

  • OS: macOS 12.5
  • App version: GB Studio 3.1.0

Additional context: Music Driver: GBT Player (mod file player)

I used the Alpha-Version (GB Studio 3.1 alpha0 Pipeline: 1847). It seems in the release version the Loop-Checkbox was removed.

I think the expected workflow now is to modify your music files so they only play once if you need that feature. You can do so by creating a jump to an empty pattern and that pattern contains a jump to itself. I am personally not a fan of this workflow, as I think it wastes resources with keeping the player running - but playing 'empty' music. On the other hand I don't have the insight on the technical difficulties to stop the player and likely to restart it later....

sttng avatar Oct 20 '22 03:10 sttng

According to the docs, we should be able to enable/disable loop mode for music.

I've tried to launch my music with GBVM script rather than with the GUI:

VM_MUSIC_PLAY ___bank_song_music_rulz_intro_Data, _song_music_rulz_intro_Data, .MUSIC_NO_LOOP

But it's still looping...

So it seems this is not an expected behavior.

nagman avatar Dec 05 '22 16:12 nagman

that feature only works with the legacy GBT Player driver.

untoxa avatar Dec 05 '22 17:12 untoxa

@untoxa I do use the GBT Player :(

nagman avatar Dec 05 '22 17:12 nagman

so, that option is not for you.

untoxa avatar Dec 05 '22 18:12 untoxa

that feature only works with the legacy GBT Player driver.

I do use GBT Player.

nagman avatar Dec 05 '22 18:12 nagman

oh, yes, sorry. i forgot, that feature is prepared for being removed, because the new driver has no support for that. loop parameter has no effect since the point of merge of the new SFX engine. it was left only for the compatibility with the GBStudio codegen, because there is a lag between the core and IDE development.

untoxa avatar Dec 05 '22 18:12 untoxa

Oh crap :( So do we have to do as @sttng suggested?

I think the expected workflow now is to modify your music files so they only play once if you need that feature. You can do so by creating a jump to an empty pattern and that pattern contains a jump to itself.

nagman avatar Dec 06 '22 08:12 nagman

or you may use the music routine to switch to the next song or switch music off, for instance.

untoxa avatar Dec 06 '22 09:12 untoxa

I don't understand what routines are, and it seems they're related to .uge files (so not compatible with the legacy driver)

Attach a script to one of the four music routines that can be triggered from a .uge file. In the music editor you are able to use the call routine effect in your songs to trigger these scripts in time to music.

nagman avatar Dec 06 '22 09:12 nagman

for the legacy driver infinite looping is the only way

untoxa avatar Dec 06 '22 09:12 untoxa

So sad... But thanks for the help :)

nagman avatar Dec 06 '22 09:12 nagman