VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Member
    Join Date
    Sep 2008
    Location
    United States
    Search Comp PM
    I recorded audio with 4 mics (coherent pair and 2 omnis). I have 4 WAV files each representing each mic.

    Now I need to mix it down to two channels to sync with my video, but I am struggling with command line options.


    Basically, I need to take Track1.WAV and Track2.WAV and put them into L and R channels respectively. But I would like to be able to play with Pan, which means I might want to have 60% of Track1 in L and 40% in R. Vice versa for Track2.

    Then, I would want to mix in the omnis at -5dB (no panning on thos). i.e. Track3 into L, and Track4 into R.

    I have used sox before, but I have never used panning.

    I think the command line should go something like

    sox -M Track1.wav Track2.wav Track3.wav Track4.wav Output.wav -pan xxx -remix xxx

    Or maybe -pan commands should precede each output file, not sure.

    Thanks!
    Quote Quote  
  2. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Ableton Live, or any other DAW.
    Quote Quote  
  3. Member
    Join Date
    Sep 2008
    Location
    United States
    Search Comp PM
    Thanks, but I would rather figure out the command line, as I could then be able to automatically apply it to any future recordings with the same mic setup.
    Quote Quote  
  4. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Mix the mics at the controller and set the recorder to stereo mix. Then use Audacity FREE, to pan and whatnot.
    Quote Quote  
  5. Member
    Join Date
    Sep 2008
    Location
    United States
    Search Comp PM
    I record my channels as raw audio data, one WAV for each mic. After that I have many uses for the raw tracks, including creating a surround mix, but in this case I am interested in creating a stereo mixdown.

    I am also interested in making it be a command line operation using sox or any other available command line audio processing package.
    In this case the post is regarding Sox, so probably the thread should stay "sox-centric", rather than going into other possibilities. I am pretty sure that what I want, sox can do, it's just the matter of finding the right arguments etc.
    Quote Quote  
  6. I'm still a novice at using sox and I have never heard of the '-pan xxx' parameter (and I can't find it over at http://sox.sourceforge.net/sox.html), so I leave it out.

    This is what I would try reading your description:
    Code:
    sox -M Track1.wav Track2.wav -v -5db Track3.wav -v -5db Track4.wav Output.wav -remix -m 1v0.5,2v0.2,3v0.5 1v0.4,2v0.6,4v0.5
    what this should do:
    -M Track1.wav Track2.wav -v -5db Track3.wav -v -5db Track4.wav
    should mix track 1 to 4 to a single file containing 4 channels (assuming each file is a mono wav) while lowering the volume of track 3 and 4 by 5dB.
    Output.wav
    should set the output file.
    -remix -m 1v0.3,2v0.2,3v0.5 1v0.2,2v0.3,4v0.5
    should remix the 4 input channels to stereo:
    • 1st channel contains 30% of track 1, 20% of track 2 and 50% of track 3
    • 2nd channel contains 30% of track 2, 20% of track 1 and 50% of track 4
    while '-m' disables all automatic volume adjustments during the remixing,...

    Not sure if this helps, but may be it's a start.

    Cu Selur
    Quote Quote  
  7. Member
    Join Date
    Sep 2008
    Location
    United States
    Search Comp PM
    Thanks. This seems to have worked perfectly.

    There were a couple of things I had to change: in the end, -remix must not have a hyphen just 'remix'.
    Also, for some reason -v -5db returned sox FAIL sox: Volume value `-5db' is not a number. So, I changed to 0.9, not sure if that's the right number.

    This is my current command
    Code:
    sox -M "Track 1.wav" "Track 2.wav" -v 0.9 "Track 3.wav" -v 0.9 "Track 4.wav" Output.wav -remix -m 1v0.6,2v0.4,3v1.0 1v0.4,2v0.6,4v1.0

    Also, I want to extract just a portion of the file (like one song) from a long recording. (say it goes from 102 seconds to 243 seconds in my Tracks).
    Might you know of what argument to give BEFORE each track to say from what point and duration of the bit I want?
    I used 'trim' at the end (like remix), but it seems to take too long, because it must be adding everything to one 4 channel file first, and I only want it to add the bit I want.
    Quote Quote  
  8. Might you know of what argument to give BEFORE each track to say from what point and duration of the bit I want?
    I don't think that is possible in a single command line. Normally you would do this in multiple calls creating temp files:
    • use multiple sox calls to create temporary files using the 'trim' command, i.e. "sox infile tempfile trim 0 10" to get the first 10 seconds of the infile
    • use your current command line to merge&filter the temporary files
    • delete the tempfiles

    Also, for some reason -v -5db returned sox FAIL so,..
    my bad, only vol supports the dB notation
    Last edited by Selur; 30th Aug 2012 at 02:44.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!