How to make music looping?

Godot Version

4.7.2

Question

I have got music from this GameDev source, it’s .wav format of file.

But for some reason I can’t trim this audio and it showing as read-only. Is there some step I need to do to be able to unlock it and enable loop mode?

in import as is those options →

In the Import tab, Change the “Loop Mode” and reimport

It got fade out, some tip how to guess length in samples?

Personally I would use an audio editor like Tenacity to find the sample start end, as described in this blog

I tried https://tunebat.com/Analyzer which found bpm 134

knowing mix rate 48000, bars I guess 8.

divided 60/134bpm

result 1 * 48000 mix rate

result 2 * 4 beat in bar(4/4)

seem to be looping ok :slight_smile: maybe bpm detector be great as func in Godot.