October 17, 2018, 05:18:25 AM

Author Topic: Is there a way to loop a portion of a .WAV file?  (Read 255 times)

Offline Adam Novagen

  • Jr. Member
  • **
  • Posts: 8
Is there a way to loop a portion of a .WAV file?
« on: May 16, 2018, 02:44:12 AM »
Title mostly says it all. What I'm looking for is the ability to work with "loop points" in a .WAV file or other audio. Basically, imagine you have a music track that has an intro, and the rest of it loops; obviously if you loop the whole file, you'll just get the intro every time. Is it possible to get BlitzMax to loop back to a certain point within an audio file?

Alternative option: obviously I could take the aforementioned audio file and cut it into "intro.wav" and "loop.wav," but how would I guarantee that "loop.wav" would play seamlessly on time after "intro.wav" had finished?

Offline GW

  • Full Member
  • ***
  • Posts: 142
Re: Is there a way to loop a portion of a .WAV file?
« Reply #1 on: May 16, 2018, 08:41:32 AM »
I think the fmod library can set loop points, but I've never done it. 

Offline Henri

  • Full Member
  • ***
  • Posts: 154
Re: Is there a way to loop a portion of a .WAV file?
« Reply #2 on: May 16, 2018, 11:50:13 AM »
Hi,

there is also maxmod2 https://github.com/bmx-ng/maxmod2.mod which might be able to do that.

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Offline Adam Novagen

  • Jr. Member
  • **
  • Posts: 8
Re: Is there a way to loop a portion of a .WAV file?
« Reply #3 on: May 16, 2018, 11:41:44 PM »
Thanks. I've been working with Brucey's GME module via OpenAL, ran into some problems last night with the exported .VGM files from the program I'm using to compose but I thiiiiiiiink I've managed to work them out. I'll refer back to these suggestions if things go tits-up later.