Background music loops in XACT

Hiho, my friends!

I’m currently working on a platformer in Monogame (.Net/DX).
When it comes to SFX and bgm, I decided to use XACT(v3.0) as it provides many useful functions for sound design. But I ran into a problem regarding the lack of documentation around XACT:

My goal is to first play an intro song one shot, then continuously loop another audio file. I tried for multiple hours to get this to work, but either there is a noticable gap between the two songs or it doesn’t work at all.

Also the issue with not being able to compress your sound data(only PCM works, ADPCM crashes while playing, xWMA crashes while loading the wave bank) is pretty annoying.

Do you guys have experience with XACT and could help me with my issue? Do you know if there is a way to fix the compression issue? Or would you recommend me to just drop XACT and work with an alternative?

Greeting,
Creme

… Not a solution, just a quick tip from a prob I had way back… (looping mp3)… apparently, the length of an mp3 file is set in increments, NOT determined solely by the duration of the audio, meaning that you will always have gaps looping them, unless your actual song ends RIGHT when the mp3 FILE ends…

I’m sorry, I might not have been clear enough…

It actually DOES loop perfectly, the problem lays in the transition from the “intro” file to the “loop”.

I don’t suppose you can combine the 2 songs into one track, and then just specify a time-stamp to loop from?

Sadly not, you can clearly hear where the Reverb and echo cuts off

first song and second song spliced together into a third longer song where the line between is blurred. look into “mixing”, dj’s do this all the time…

THEN you take this long mix, and append the second song AGAIN, all now one long track… And THEN you loop it from a specified location…

It’s a stupid work-around, but I think it might work…

ppp

The white gap here, is where you would loop from :slight_smile:

Sounds like a great idea!

I can’t realize it with XACT tho, as it doesn’t allow me to get or set the position of the song :confused:

Yea… I don’t even know what to say… Looping music seamlessly. You’d think that one was solved by now…!
I’ll get out of your way, but surely someone can help you loop a song, we know it happens out there from time to time…

1 Like