Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Alternative audio libraries - suggestions?  (Read 4533 times)

0 Members and 1 Guest are viewing this topic.

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
Alternative audio libraries - suggestions?
« on: March 01, 2010, 09:21:33 am »
Hey guys. I am working on a game right now with levels being generated infinitely.

Anyway, I wanted to have a simple looping melody for "music" and I was going to shift the tempo up each level. As far as I know, OpenAL and SFML can't do this - it is quite a difficult operation (if it can even be done realtime on my hardware, while there is other stuff using my CPU). So I am looking for a different audio library to use. Either one that can change tempo of an mp3/ogg/whatever without shifting the pitch too, or perhaps a library to play MIDI or popular tracker formats, or even a SID emulator or SPC700.

Has anyone here got any experience with anything like this or any suggestions?

By the way, I have thought about having a different loop for each level, but when 15+ levels is a reasonable amount to get through on your first play, this seems a little excessive.

Cheers guys.

PS Sorry for asking for <not SFML> in the SFML forum, Laurent. It handles everything else beautifully :)

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Alternative audio libraries - suggestions?
« Reply #1 on: March 02, 2010, 10:03:39 pm »
Maybe fmod, don't know if it supports that.

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
Alternative audio libraries - suggestions?
« Reply #2 on: March 03, 2010, 06:00:14 am »
Thanks, will try it out tonight. Has a pretty long feature list. I would prefer and open source library though.

model76

  • Full Member
  • ***
  • Posts: 231
    • View Profile
Alternative audio libraries - suggestions?
« Reply #3 on: March 07, 2010, 05:38:07 am »
What you are asking about is known as "time stretching" in the pro audio world, and is indeed a difficult task. Especially if you want it to sound good, too... I think you will be hard pressed to find an audio library for games that can do this in real time.
I think your best bet would be to apply such an operation to the sound, between levels, because of the complexity.

I have no idea where you could find such an algorithm, or how to apply it, though.

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
Alternative audio libraries - suggestions?
« Reply #4 on: March 07, 2010, 05:41:03 am »
Thanks for the tip. I've decided to look into midi libraries for now.

SFMLaw

  • Newbie
  • *
  • Posts: 1
    • View Profile
Alternative audio libraries - suggestions?
« Reply #5 on: March 13, 2010, 01:08:20 pm »
I was just looking over SoundTouch myself...

http://www.surina.net/soundtouch/index.html

Could be good!

 

anything