Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Sound manipulation with Java
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sound manipulation with Java



On Mar 9, 2004, at 11:16 PM, Chad Armstrong wrote:

Hello:

I'm considering writing a program which needs to work with sound files (aiff and mp3). I am examining my options to determine what would work best for me. The three options I'm looking at are Java, CoreAudio, and OpenAL.

Here are the operations I want to be able to perform:
- play
- pause/stop
- jump to a particular location in the song
- loop a section of the song
- be able to slow down the play back of the song without changing the pitch. This is the most important part. I read something about the reverse operation being quite complicated to perform, but I didn't read anything about what I was trying to do.

The reverse operation is, well, the same operation...in reverse; if one is complicated, the other is too. What you're talking about is decomposing audio data into small wads of samples (the size of the wad is part of the complexity), figuring out what frequencies are represented in it (too small a wad and you lose low frequencies, too large a wad and you lose transient high frequencies, there's no one-size-fits-all), and generate a corresponding larger wad of samples that subjectively sounds enough like the smaller one that the listener thinks it's the same thing but slower. It's categorically a complex operation with different trade-offs to emphasize different things.

I haven't used JavaSound heavily, but I don't know of any Java API there that does this. What you probably want if you don't want to deal with the complexity of resampling yourself, is some portable digital signal processing library - there are quite a few out there. I'd strongly recommend learning the ins and outs of what you're trying to do - it's not a simple operation, and to really get the results you're looking for, it helps to know what the inputs to any algorithm you're using really do.

- work with mp3 and aiff files. If only one of those options is available, then I would prefer mp3.

Once it's PCM audio data, it probably doesn't matter the format it came from - but bear in mind that digital signal processing over lossy compressed formats like mp3 can magnify compression artifacts you wouldn't hear normally. If you can, you're better off working with straight uncompressed audio data.

-Tim
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Sound manipulation with Java (From: Chad Armstrong <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.