-
Java and Sound File Compression
I just wanted everyone to know that .aif (also .aiff) Audio Interchange File Format files are the currently compatible compression format for use with Java in general.
MMF2 accepts and can use .aif files as it currently has a filter for them built-in.
This format only gives fair compression depending on your usage, settings, and needs. It certainly beats using uncompressed .wav files if size is your concern.
Free free to discuss this format and share free and commercial tools that can be used for conversion.
I have one here that is rather advertising intensive, but it really does a fast and good job at converting an amazing amount of file types, (sound, graphic, video, text, etc.) right from your browser. When you convert a .wav to .aif, it gives you the bit depth and sample rate options to choose from:
http://media-convert.com/
-
Re: Java and Sound File Compression
Awesome!
I'd use Quicktime PRO (via the Quicktime Player) to export the audio .. Since it will do it the official 'Mac' way .. lol ..I assume it will work! ;)
Will test it out and report back later!
-Mel ;)
-
Re: Java and Sound File Compression
Excellent.. I'm interested in this. I tried to export to AIFF using Audacity but the size ended up the same.
-
Re: Java and Sound File Compression
Wow! The AIFF files created by quicktime (windows and mac), as well as several other audio programs don't work inside of MMF .. Is there a bug with the AIFF filter?
The first few seconds will play, but then the rest of the file hisses. It plays fine in other programs ...
-Mel ;)
-
Re: Java and Sound File Compression
Indeed,.. it happened here too.
edit: Melli, does the Quicktime PRO compress the AIFF?
-
Re: Java and Sound File Compression
Ah! The AIFF filter only works with 8bit sound files! LOL
I'm sure Clickteam will fix this when they get a spare minute..
-Mel ;)
-
Re: Java and Sound File Compression
Well .. Just tested it with Xwrap! It worked! :)
At least we have 8 bit sound! LOL ...
-Mel ;)
-
Re: Java and Sound File Compression
Melli, does the Quicktime compress the AIFF? Or do you know other program that effectively does it? As far as I could test here, AIFF audio has the same size as uncompressed WAV. Thanks
-
Re: Java and Sound File Compression
Hi Bruto_memo!
Just setting the AIFF file to 8bit will half it's size. Or more! (Doesn't mean we don't need 16bit! lol)
I used Quicktime Player PRO..
File > Export >
AIFF Export Options:
Format: Linear PCM
Channels: Stereo L & R (making this mono will half the size again BTW!)
Rate: 22050 (hopefully 44.1Khz works too! Havn't tested yet!)
Quality: Normal
Sample Size: 8 bits
There are compression formats instead of PCM such as IMA 4:1 and Qualcomm PureVoice .. I doubt MMF supports these codecs though ..
-Mel
-
Re: Java and Sound File Compression
hmmm so a regular game would be quite big, if it has soundtracks
-
Re: Java and Sound File Compression
You could use a programatic Music system with Loops .. That will help keep the size low and add dynamics to your music! ;)
-Mel
-
Re: Java and Sound File Compression
As for the compression codecs other than ADPCM, they work in MMF2, but not in your Java builds. The problem with using codecs is that they have to be installed on your target machine, so with Java, you want compatibility, anyway.
Please do keep this conversation going with reports on tools and any problems.
I thought that I had functional results with my tests using SoundForge to compress and save the .aiff files at various settings.
I'm going to have to double-check that so we can find out what's up with the way the format is saved, by what program, and how MMF2 handles it in Java.
One of the Moderators mentioned something about an Ogg Vorbis class, but I don't know if it is feasible or how that would go. One would hope that Java would expand and improve to a point, over time, that would utilize newer technology.
-
Re: Java and Sound File Compression
Sorry Novabrain, but I don't see where we're going off the track here. You said:
Quote:
Originally Posted by Novabrain
This format only gives fair compression depending on your usage, settings, and needs. It certainly beats using uncompressed .wav files if size is your concern.
Free free to discuss this format and share free and commercial tools that can be used for conversion.
And Melli and I, we're just investigating if AIFF really beats the uncompressed WAV as you stated above for usage with MMF2. You also said that we, users, should feel free to discuss this format, and that's what we're doing.. discussing the format, tools and trying to find a viable path of compatibility to MacOS in the sound area.
-
Re: Java and Sound File Compression
Hmmm. I was just interjecting some comments about my experience and POV on the subject.
You folks are doing fine and I appreciate the interest. Sorry, if somehow my post sounded like I was suggesting any problems with the nature of the discussion. That wasn't my intent.
-
Re: Java and Sound File Compression
Cooling the temperature down a bit .. ;)
Just found bugs with the audio engine in java..The audio plays (though I'm not sure if it's in the correct channel) but ...
Using the Stop ALL Sounds action doesn't stop the audio.. It just keeps playing!
Posting example in a bit ..
-Mel
-
Re: Java and Sound File Compression
THE AUDIO BUGS
If Francois can take a look at this that would be great! ;)
Problem: Sounds playing on wrong channels, and stop sound is not playing. Also will not play from external file (Though you may have fixed that now! ;) )
Download
AUDIO BUGS .
-Mel ;)
-
Re: Java and Sound File Compression
-
Re: Java and Sound File Compression
-
Re: Java and Sound File Compression
Sorry if my post looked like it was "warming up" the temperature :P
Good Job finding the bugs Melli, and thanks François for fixing them :)
-
Re: Java and Sound File Compression
All good!
Everyone has to just remember that this is a text-based forum! It's very easy to misinterpret what is actually going on and it's happened to me loads of times! lol ;)
Let's keep bug-hunting! The faster we find them, the faster Francois and Yves can fix them! ;)
And thanks Francois for doing a great job! :)
-Mel ;)
-
Re: Java and Sound File Compression
I think that is what happened there. I read my posts over and figured something came across wrong ;)
Anyway, I am really pleased that not only is this thread a resource about sound in Java, some bugs are being found and fixed. Yay!
-
Re: Java and Sound File Compression
Can only be a good thing! ;)
-Mel
-
Re: Java and Sound File Compression
Will OGG be available? It's free software, so I can't see why not.
-
Re: Java and Sound File Compression
It's interesting that there's music in my game on my PC, but it can't play the music on my Mac.
I've tried .wav and also .aif files. What's the most suitable format that can be played on both of them?
-
Re: Java and Sound File Compression
-
Re: Java and Sound File Compression
I will try it, thanks Bruto_Memo! I haven't dealt with bits, so maybe...
-
Re: Java and Sound File Compression
I've tried it... It doesn't work. :(
As I'm looking at the other sounds, it's interesting that the effects are 44khz 16 bit .wav files, and it can play them.
I should try this format?
(Sorry for double post)
-
Re: Java and Sound File Compression
I've found the solution - the 11khz 8bit .wav file can be played on my Mac!
Thanks for your help!