sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: Doug Lee <dgl@dlee.org>
Cc: sox-users@lists.sourceforge.net
Subject: Re: Recording Stereo Mix and Microphone at the same time
Date: Tue, 25 Apr 2017 10:43:20 +0100	[thread overview]
Message-ID: <yw1xinls4ybr.fsf@unicorn.mansr.com> (raw)
In-Reply-To: <20170424160222.GW221@mini.home> (Doug Lee's message of "Mon, 24 Apr 2017 12:02:22 -0400")

Doug Lee <dgl@dlee.org> writes:

> On Mon, Apr 24, 2017 at 02:15:55PM +0200, Dino Vidakovic wrote:
>>    I'm trying to record both sources at the same time into a single file.
>>    Is this possible with Sox? If not, does anyone have any ideas or best
>>    practices to achieve this?
>
> If you just mean two devices into one file, I would think something
> like this would work, where your device names may vary:
>
> sox -m -t waveaudio "Microphone (Logitech Wireless H" -t waveaudio "Microphone (Andrea PureAudio US" outfile.wav
>
> Timings may vary slightly among devices though; so if you're trying to
> get real-time, more-than-two-channel data mixed down to two channels,
> your results may and may not be pleasing.

There are two time-related issues with this.  Firstly, the two devices
may not start recording at exactly the same time.  The tracks will then
have to be realigned after recording, which is easy enough if they all
start with an externally generated sync signal.  Secondly, the ADC
clocks of the devices can (will) drift relative to each other eventually
leading to a buffer overflow or underflow since Sox assumes all inputs
have synchronised samples.  There is no easy fix for this.

-- 
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

  reply	other threads:[~2017-04-25  9:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24 12:15 Recording Stereo Mix and Microphone at the same time Dino Vidakovic
2017-04-24 15:36 ` fmiser
2017-04-24 16:02 ` Doug Lee
2017-04-25  9:43   ` Måns Rullgård [this message]
2017-06-29 11:32 ` Jan Stary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-users

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yw1xinls4ybr.fsf@unicorn.mansr.com \
    --to=sox-users@lists.sourceforge.net \
    --cc=dgl@dlee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).