Ideal Way to Use JavaSound for me?

Ok, I want to know the best method, or libary or something pre-build into java that will best suit my requirements.

I would like to do the following with my sound effects/music:

  1. Method to increase/decrease volume without screwing up wave volume on the computer.
  2. Method to increase/decrease bass without messing up windows mesurments, to alter sounds.
  3. Method to increase/decrease treble without messing up windows mesurments, to alter sounds.
  4. Method to increase/decrease pitch.
  5. Possibly some way to do possitioning effects, or at least play on certain speaker.

And also, what is better for the compressed audio. Mp3 or ogg or something else for java. Which can be altered the best, and also I would be willing to utilize higher quality conpressed formats. I would most likely save at 360kbps mp3 for the music and use wav for sound effects. The reason I want do adjust pitch, is to alter some effects and how they sound without making an entirely new sound file, and wasting space. I need to adjust volume so that effects and music volume sliders can be adjusted properly.

Thank you for your help!

You might want to take a look at http://java.sun.com/docs/books/tutorial/sound/controls.html

As for compressed audio, I’d suggest ogg as it’s free. What do you mean by ‘which can be altered the best’? Any compressed audio file is decompressed at some point (either real time or ahead of time), so compression method has no influence over your ability to alter the sound.

When people say ‘ogg is free’ what do they mean? Because it seems to me like converting to mp3 is free, since i can. Im not selling my game so i dont need licenses or anything. So what sounds better at the same kbps the mp3 or the ogg? i like mp3 maybe more, just because the name is cooler lol.

but i notice that the java sound api doesnt have support for mp3 or ogg, so how do i make those compressed formats work along with java sound api modifications. i was taking a look at what it can do and it seems pretty good.

ogg is an open, free standard. I think mp3 has licensing restrictions but I’m not really aware of all the legal implications tbh. I just stick with ogg to be safe, and besides, it sounds at least as good if not better than mp3.

For using ogg in your java application, take a look at http://www.jcraft.com/jorbis/. It’s what I use too, it’s easy to use and Just Works.You use the library to decompress the .ogg file, and you just stream the decompressed data using the JavaSound API.

I believe that with MP3 you can play back MP3 files for free. But you have to pay some sort of royalty if your program creates MP3 files. That’s why Audacity can load MP3s but not save them.

I could be wrong though. Support the open source community by using Ogg, which is roughly equivalent to MP3.

Ok, ill just ogg, thanks guys.

Breed (based on Unreal engine 2 i think) uses Oggs, and thats a fine game :slight_smile:

I should know, I ripped some of em L