How to try multi-channel audio input in Java

I realized that this might be a relatively niche, but maybe why it is so good to ask. I am looking at a hardware input panel with multiple inputs (e.g. Alesis IO 26) to receive an Adat 8-channel input signal for signal processing. Since I have yet to purchase a device and need to decide as much as possible (budget issues), I would like to ask if anyone has experience using all these 8 inputs for Java data? I saw many examples of recording sound using the Javax.sound.sampled libraries, but I could not find any information about multichannel, which is more than 2. What I’m interested in is a selection of 8 channels as a mono source, do some simple DSPs on them. Will a hardware device be considered as a single mixer? And 8 channels will be presented as 8 lines? I hope I understood my terminology correctly.

I would be grateful if someone could point me to any relevant information. Thanks!

+7
java audio-recording javasound
source share
4 answers

It is assumed that multichannel sound will be available in Java depending on the version of Java you are working on, the platform you are working on, and the type of sound card you are using. See Excellent Java Audio Faq for more information. I could never reliably use this on all platforms.

If you really care about creating robust multi-channel audio, I would recommend using a C API like PortAudio , Juce or PulseAudio .

I did a great job with PortAudio and Juce.

To use them in Java, you will need to create a JNI interface for the C APIs.

This is obviously more than just using javax.sound, but it gives you much more control over your audio equipment. In my experience working with audio devices, being too remote from the hardware (i.e. 4 levels of abstraction instead of 2), your ability to make serious multi-channel, high bit depth, high sound with a sampling frequency is often removed.

+2
source share

I implemented something similar with Terratec cards cascaded to 32 inputs, the only library at that time was Jsyn.

This is a really good library as soon as you recognize it.

http://www.softsynth.com/jsyn

I'm not sure if there is anything else that can help.

+1
source share

I just added the Java JNI shell for PortAudio. It is planned to keep this together with the PortAudio source. PortAudio supports multi-channel audio, where N> 2.

Today, 9/3/12, JPortAudio is still in alpha mode. By the time you read this, it can be stable.

http://www.portaudio.com/docs/v19-doxydocs/java_binding.html

+1
source share

I cannot give you an answer directly to whether the javax.sound API works with multiple channels (but according to the API document it should).

However, I went the other way for multi-channel audio processing using Java, which may work for you too. I used Jack (Jack Audio Connection Kit) to transfer signals from and to an audio device, and then to the JJack library for signal processing. You did not specify your target OS. I have successfully used this approach on Linux. AFAIR was the Windows port for Jack on the road.

ciao, ilma

0
source share

All Articles