How do get the right/left channels of a sound output via Minim and Javasound

edited December 2015 in Library Questions

Hey all,

I'm working on a spatial sound installation project and have hit a wall when it comes to sending specific audio to specific speakers.

My setup:

  • Processing with Minim (playback and effects) and Javasound (targeting the different sound cards)

  • 3 stereo USB mini sound cards connected to a USB hub

  • 5.1 surround speakers with 3 stereo output jacks, 1 for front left/right, 1 for rear left/right, and 1 for center/subwoofer

The idea is that unique mp3s are played through each speaker, but I can't seem to get deeper than the stereo device level when assigning outputs in Minim, so I can only assign audio on a per-soundcard basis rather than a per left/right channel basis. After I've found the correct output mixer with the Mixer.Info class and set it with .setOutputMixer() to the AudioOutput, I'm at a loss for how to find each left/right channel within the Mixer object.

Printing the output from mixer.getTargetLineInfo() on one of the soundcard mixers I create just gives me a single result:

interface TargetDataLine supporting 8 audio formats, and buffers of at least 32 bytes

when I would expect to see something like

  • Output right channel
  • Output left channel

Has anyone figured out how to target on a per channel basis? This is way harder than I was imagining it would be.

Answers

  • HI, did you figure this out? I'm having a similar journey of discovery :/

    https://forum.processing.org/two/discussion/16611/multichannel-audio#latest

  • edited May 2016

    I ultimately gave up on a Processing library approach and opted to use Pure Data to load and play back the audio streams, though Processing is still controlling those streams in PD via MIDI. Way easier and more intuitive, ESPECIALLY the multichannel aspect. Find the GUI version of JACK for OSX, use that as your sound card in Pure Data, and off you go.

Sign In or Register to comment.