anyways, I'm currently working on a class to decode WAVs (MIDIs will probably be next) and play them in Lejos in the least amount of computing power and memory. I've found a number of sites with great info on them and am making great progress. I'll hook you all up with a test file (i don't have a nxt lol) once I've got something to test!

Ok so I ran into one "small" problem... My ReadInt() methods were returning wildly strange numbers. After some detective work I discovered that .WAVs are big-endian. Java reads in little-endian. Is there already a class in Lejos that deals with this, or should I write my own?

I am very close to release... Right now it can load the sound file, read it, etc. I'm currently figuring out the most efficient way of reading/playing. Since we only have one channel to play on, and a measly centisecond minimum playtime, either we skip 99% (literally) of the sound file, or we play it reaaaaaaaaaaaaaaaaally slow. I'm thinking about writing both options and then making it a boolean input.

Is there any way to perhaps improve on the current Sound class? (most preferably with quicker tones)

public static void main(String[] args){ //"bob3.wav" is the file name, 1f is how fast to play it. //thus 2f would be double speed, .5f would be half as fast. //-1f means to play the whole file (reeeeeally slow) //0 will cause it to exit, so don't do that SoundDecode.Play("bob3.wav",1f);}

I also don't know the proper way to tell the user that there was a problem, so it just puts it on the LCD.

Get this: The total memory use by variables declared in the program is 14 bytes!!!

You're also going to need some try-catch blocks around some of the IO code for it to compile properly.

That's a great job you've done there! I'm glad you decided to take up this project as it adds so much to leJOS NXJ. We'll probably integrate it into the Sound class, perhaps as Sound.playFile(String file) and .playFile(String file, int speed), etc...

Yea i actually looked at the source of the official java method. It was helluva complex... it took me days to find the method where it reads files!! By that time i had already managed to read the files up to the actual data. I was able to make my code a little more efficient by using some of the tricks they used though.