Message Boards Message Boards

WE/WD not recognizing multiple speaker outputs from MOTU Audio Interface

I have an audio interface (Motu 8a) that has 8 analog audio out ports that are each connected to a unique speaker. I want to a Wolfram Language expression to play audio from one speaker and not the rest. As far as I can tell Mathematica only recognizes my Audio Interface as having Left+Right input channels. Assume I have a four-channel audio object and I want each channel to get mapped to a unique speakerm then I think I should be able to do with using the following.

Audio[a, AudioChannelAssignment -> {1,2,3,4}]

But after a lot of testing and confusion I think I see that Mathematica only outputs two digital signals corresponding to Left+Right. Since my audio interface only receives two signals I cannot split them onto different output speakers.

I am stumped and Ableton Live accomplishes everything I need it to, but I would rather script some things.

POSTED BY: Kyle Keane
3 Replies

On my quest for Computational Spatial Audio I am starting to understand the complexities of this whole maddening field.

I am trying to find a workaround since AudioChannelAssignments only seems to support left and right output {{1,2},{2,1}} for instance means "route the audio in channel 1 to the left and right speaker {1,2} and route the audio in channel 2 to the right and left speaker {2,1}" (reversed ordering for unambiguity). My life would be complete if I could just play audio from Mathematica with an eight channel Audio object using AudioChannelAssignments->{{1},{2},{3},{4},{5},{6},{7},{8}}. That does not seem to be possible (I would love to be wrong wri?).

So now I have a new question about exporting a multichannel audio file that media players could play... I can create a multichannel Audio[] object using AudioChannelCombine[] and I can export said file to .wav (easy peasy), but then no media players know what to do with that file since it is not following any known spec (7.1 Surround Sound for instance). I suspect maybe a multichannel .wav file is useful for transporting data, but there is no software that can play it by routing channels to speakers. Is there an audio format I can have Mathematica export a multichannel audio object to that could be played by VLC or Windows Media Player or even some obscure media player that would route each channel of the audio file to a separate input of the audio device? I try to describe how I know Ableton does this below.

As mentioned above, I have an audio interface with eight speakers coming out. My OS recognizes this thing as an audio device and sends two-channels that I can then route to speakers using their firmware. I can open Ableton Live and select my audio interface as an audio device at which point Ableton understands that my device can accept 8 input channels. I then select which channel to send a given track of audio and it is routed by the audio interface firmware to play on a single speaker. Here is an image of Ableton Live allowing me to select input channels for the audio interface.

enter image description here

Somehow Mathematica does not recognize that my audio device can accept more inputs and so it only sends two channels. I honestly do not understand the magic that goes into sending data to audio devices and why Ableton can send multiple channels while Wolfram can only send two. Ableton also has a fairly cool audio device preferences menu where I can enable/disable things and tweaks other settings as shown below, on the left is the audio config and on the right is the menu to enable/disable connections from Live to the output channels...

enter image description here

I would be super genuinely curious to know if my hours and hours of research is yielding a meaningful explanation in this question. And yes of course I am a crazy person who wants Mathematica to be a DAW, but I am sure I am not the only person who would love to have end to end music production from Mathematica, it already super close for most mono or stereo audio applications.

POSTED BY: Kyle Keane

OK, for you crazy people like me I found a workaround by exporting 8-channel .wav from Mathematica and then playing it in the JRiver Media Center software with some settings tweaked to send 7.1 Surround Sound with no subwoofer frequency filtering. This means I run code which exports a file I then use some keyboard shortcuts to switch apps and play the file which actually hotswaps as soon as you hit play with whatever the current audio file is. This is almost painless, would be ideal if I could just issue a command line command using Run[] but I haven't figured out how to do that. I suspect there is someone who could tell me how to do this all using some VLC command, but until they come a few keyboard shortcuts will suffice. Attaching my multiple track audio file along with my testing notebook that generates the file for others to play with, it includes screenshots of the settings I tweaked in JRiver Media Center.

POSTED BY: Kyle Keane

Wolfram is not correctly routing audio to MOTU inputs via USB (all other DAWs and audio editing programs are able to do it correctly.

Below is a screenshot of my MOTU routing config and the nonsensical behavior of AudioChannelAssignment.

enter image description here

AudioChannelAssignment does the following nonsense

AudioChannelAssignment -> {1} (*plays audio out of outputs 1 and 2*)
AudioChannelAssignment -> {2} (*plays audio out of outputs 2*)
AudioChannelAssignment -> {3} (*plays no audio, same for 4, 5, 6, 7, 8*)
POSTED BY: Kyle Keane
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract