* Playing multichannel audio files @ 2018-03-06 9:08 Rodolfo Medina 2018-03-06 12:56 ` Jeremy Nicoll - ml sox users 2018-03-07 15:14 ` Jan Stary 0 siblings, 2 replies; 6+ messages in thread From: Rodolfo Medina @ 2018-03-06 9:08 UTC (permalink / raw) To: sox-users Hi all sox users. I have a multichannel audio file: suppose three channels. What I want is to listen to that file by listening to each of those channels through a different loud speaker. In order to do so, I imagine each channel being sent to a different sound card. Can sox perform that, and how? In sox manual I couldn't find an answer. Thanks for any help. Rodolfo ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Playing multichannel audio files 2018-03-06 9:08 Playing multichannel audio files Rodolfo Medina @ 2018-03-06 12:56 ` Jeremy Nicoll - ml sox users 2018-03-06 13:37 ` Rodolfo Medina 2018-03-07 15:14 ` Jan Stary 1 sibling, 1 reply; 6+ messages in thread From: Jeremy Nicoll - ml sox users @ 2018-03-06 12:56 UTC (permalink / raw) To: sox-users On 2018-03-06 09:08, Rodolfo Medina wrote: > Hi all sox users. > > I have a multichannel audio file: suppose three channels. What I want > is to > listen to that file by listening to each of those channels through a > different > loud speaker. In order to do so, I imagine each channel being sent to > a > different sound card. Can sox perform that, and how? In sox manual I > couldn't > find an answer. What sound hardware does your computer have? Do you actually have more than one soundcard? Since you posted on Debian-Users, is there a way in Debian to list what these separate sound devices' names are? Do you have a way (forgetting your audio file for a moment) of getting sound out to three separate places? Do you have any other sound-playing software? -- Jeremy Nicoll - my opinions are my own ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Playing multichannel audio files 2018-03-06 12:56 ` Jeremy Nicoll - ml sox users @ 2018-03-06 13:37 ` Rodolfo Medina 2018-03-06 14:22 ` Rodolfo Medina 2018-03-06 14:26 ` Måns Rullgård 0 siblings, 2 replies; 6+ messages in thread From: Rodolfo Medina @ 2018-03-06 13:37 UTC (permalink / raw) To: Jeremy Nicoll - ml sox users; +Cc: sox-users Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk> writes: > On 2018-03-06 09:08, Rodolfo Medina wrote: >> Hi all sox users. >> >> I have a multichannel audio file: suppose three channels. What I want is to >> listen to that file by listening to each of those channels through a >> different loud speaker. In order to do so, I imagine ...though I may be wrong... >> each channel being sent to a different sound card. Can sox perform that, >> and how? In sox manual I couldn't find an answer. > > What sound hardware does your computer have? Do you actually have more than > one soundcard? > > Since you posted on Debian-Users, is there a way in Debian to list what these > separate sound devices' names are? Two different soundcards, and three devices, seem to be detected: $ arecord -l **** List of CAPTURE Hardware Devices **** card 1: Generic [HD-Audio Generic], device 0: ALC662 rev3 Analog [ALC662 rev3 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Generic [HD-Audio Generic], device 2: ALC662 rev3 Alt Analog [ALC662 rev3 Alt Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Device [USB Audio Device], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0 > Do you have a way (forgetting your audio file for a moment) of getting sound > out to three separate places? If I could have sox (or any other software) send different channel outputs to different soundcards, I could think of plugging a loud speaker into each soundcard and so getting sound out to three separate places... > Do you have any other sound-playing software? I normally use mplayer to play sound. Thanks, Rodolfo ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Playing multichannel audio files 2018-03-06 13:37 ` Rodolfo Medina @ 2018-03-06 14:22 ` Rodolfo Medina 2018-03-06 14:26 ` Måns Rullgård 1 sibling, 0 replies; 6+ messages in thread From: Rodolfo Medina @ 2018-03-06 14:22 UTC (permalink / raw) To: Jeremy Nicoll - ml sox users; +Cc: sox-users Rodolfo Medina <rodolfo.medina@gmail.com> writes: > Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk> writes: > >> On 2018-03-06 09:08, Rodolfo Medina wrote: >>> Hi all sox users. >>> >>> I have a multichannel audio file: suppose three channels. What I want is >>> to listen to that file by listening to each of those channels through a >>> different loud speaker. In order to do so, I imagine > > ...though I may be wrong... > > >>> each channel being sent to a different sound card. Can sox perform that, >>> and how? In sox manual I couldn't find an answer. >> >> What sound hardware does your computer have? Do you actually have more than >> one soundcard? >> >> Since you posted on Debian-Users, is there a way in Debian to list what these >> separate sound devices' names are? > > Two different soundcards, and three devices, seem to be detected: > > $ arecord -l > **** List of CAPTURE Hardware Devices **** > card 1: Generic [HD-Audio Generic], device 0: ALC662 rev3 Analog [ALC662 rev3 > Analog] > Subdevices: 1/1 > Subdevice #0: subdevice #0 > card 1: Generic [HD-Audio Generic], device 2: ALC662 rev3 Alt Analog [ALC662 > rev3 Alt Analog] > Subdevices: 1/1 > Subdevice #0: subdevice #0 > card 2: Device [USB Audio Device], device 0: USB Audio [USB Audio] > Subdevices: 0/1 > Subdevice #0: subdevice #0 > > >> Do you have a way (forgetting your audio file for a moment) of getting sound >> out to three separate places? > > If I could have sox (or any other software) send different channel outputs to > different soundcards, I could think of plugging a loud speaker into each > soundcard and so getting sound out to three separate places... > > >> Do you have any other sound-playing software? > > I normally use mplayer to play sound. Since sox can split a three-channel file into three one-channel files, the problem is virtually solved once we manage to send two audio outputs into two different audio cards. This seems to be done simply with `&&', e.g: $ mplayer -ao alsa:device=hw=2.0 file1.wav && mplayer file2.wav , but unfortunately only one output is heard at a time... Rodolfo ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Playing multichannel audio files 2018-03-06 13:37 ` Rodolfo Medina 2018-03-06 14:22 ` Rodolfo Medina @ 2018-03-06 14:26 ` Måns Rullgård 1 sibling, 0 replies; 6+ messages in thread From: Måns Rullgård @ 2018-03-06 14:26 UTC (permalink / raw) To: Rodolfo Medina; +Cc: sox-users Rodolfo Medina <rodolfo.medina@gmail.com> writes: > If I could have sox (or any other software) send different channel outputs to > different soundcards, I could think of plugging a loud speaker into each > soundcard and so getting sound out to three separate places... Sox can't do that. However, you can configure ALSA to present a virtual 3-channel card with each channel routed to a different slave device. See the "multi" plugin documentation here: https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html -- Måns Rullgård ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Playing multichannel audio files 2018-03-06 9:08 Playing multichannel audio files Rodolfo Medina 2018-03-06 12:56 ` Jeremy Nicoll - ml sox users @ 2018-03-07 15:14 ` Jan Stary 1 sibling, 0 replies; 6+ messages in thread From: Jan Stary @ 2018-03-07 15:14 UTC (permalink / raw) To: sox-users On Mar 06 10:08:33, rodolfo.medina@gmail.com wrote: > I have a multichannel audio file: suppose three channels. What I want is to > listen to that file by listening to each of those channels through a different > loud speaker. Do you have three loudspeakers? > In order to do so, I imagine each channel being sent > to a different sound card. Not necessarily. A typical soundcard will have a stereo output, a fancy soundcard might have more (rear speakers, subwoofer, etc). https://en.wikipedia.org/wiki/5.1_surround_sound Also, playing to more than one audio device might not be synchronized, depending on your OS's audio subsystem. > Can sox perform that, and how? I don't think this has anythng to do with SoX. SoX will read the three channels and will send them to your audio hardware (or whatever audio subsystem you have between SoX and the hardware, such as ALSA). It's their problem then. If your actual audio HW can only play two channels simultaneously (as is usual), a cheap version would be to stereo-mix your 3 channels to one in the middle, one left, one right (in the stereo panorama). That can be one with SoX. > Two different soundcards, and three devices, seem to be detected: > > $ arecord -l Recording (capturing) devices are irrelevant to this, obviously ... > **** List of CAPTURE Hardware Devices **** > card 1: Generic [HD-Audio Generic], device 0: ALC662 rev3 Analog [ALC662 rev3 Analog] > Subdevices: 1/1 > Subdevice #0: subdevice #0 > card 1: Generic [HD-Audio Generic], device 2: ALC662 rev3 Alt Analog [ALC662 rev3 Alt Analog] > Subdevices: 1/1 > Subdevice #0: subdevice #0 > card 2: Device [USB Audio Device], device 0: USB Audio [USB Audio] > Subdevices: 0/1 > Subdevice #0: subdevice #0 ... but you probably have two soundcards (sorry, I don't do ALSA). > Since sox can split a three-channel file into three one-channel files, the > problem is virtually solved once we manage to send two audio outputs into two > different audio cards. This seems to be done simply with `&&', e.g: > $ mplayer -ao alsa:device=hw=2.0 file1.wav && mplayer file2.wav > , but unfortunately only one output is heard at a time... The way you wrote it, the second mplayer process is waiting for the forst one to finish. On Mar 06 14:26:27, mans@mansr.com wrote: > Sox can't do that. However, you can configure ALSA to present a virtual > 3-channel card with each channel routed to a different slave device. Yes; it's not a SoX problem, it's an audio system problem: what to do with the three channels that SoX (or any other audio application for that matter) is sending. (You might want to try installing OpenBSD on a spare machine and try its 'sndio' audio system, which is both fly and dope.) Jan ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-03-07 15:15 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-03-06 9:08 Playing multichannel audio files Rodolfo Medina 2018-03-06 12:56 ` Jeremy Nicoll - ml sox users 2018-03-06 13:37 ` Rodolfo Medina 2018-03-06 14:22 ` Rodolfo Medina 2018-03-06 14:26 ` Måns Rullgård 2018-03-07 15:14 ` Jan Stary
Code repositories for project(s) associated with this public inbox https://80x24.org/mirrors/sox.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).