Audio Loop Suggestion

Hello everyone I would like to ask for a loop feature inside gdevelop for audio files, .wav, .mp3, .ogg

The video uses the DefleMask program and the sample song from Genesis. >Songs>Modules>GENESIS>Demo Songs>“aquaticambience”

0 to 2;25. - Identifying where is the loop saving the file and opening in audacity to confirm the exact seconds.

4;22- Opening the complete audio file erasing the program loop to avoid repeating the export, increasing the size of the exported file.

5;54- adding the complete audio file in audacity add +1 sec to start the loop shift+space to play only the loop.

Note the little green arrow “loop” when reaching the end of the song, it goes straight to the green arrow repeatedly playing only that part.
Sem título

Would it be possible to add timing options within the program to manually handle the loop within Gdevelop?
2022-04-15 19_46_16-Window

These events exist today. They are the offset conditions and actions. search for offset in the action finder and you will find them.

Use the condition to check the current offset of the sound file (Don’t use music aftions/conditions, they are an older sound system that can add delays/buffering)

Then use the action to set the offset to what you want.

Note, most events are framerate limited, so you have to check that the offset is greater than a specific amount of seconds, not exactly a specific amount of seconds, as you will never get closer than 0.016 seconds (with 60 frames a second)

1 Like

Do you know any “template” examples that show this process?

I have a project that involves music loop testing, but it’s really just this one event, so here you go.

1 Like