sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk>
To: sox-users@lists.sourceforge.net
Subject: Re: Help with --combine merge
Date: Sun, 15 Oct 2023 21:39:59 +0100	[thread overview]
Message-ID: <fcdab26452d6759bb3a916757ab8864c@wingsandbeaks.org.uk> (raw)
In-Reply-To: <510211ee-553e-9016-08af-b3e2b9f4bf7c@u-l-v.org>

On 2023-10-15 14:27, Ulf A. S. Holbrook via Sox-users wrote:
> Hello!
> 
> I'm trying to combine a large amount of files into one single file and 
> wondered if someone could lend a hand. I have individual folders of 90 
> 1-minute files in .wav and want to merge them into one 90-channel file. 
> I'm running
> 
> for file in /dir
> 
> do
> 
> sox --combine merge *.WAV >> merged.wav
> 
> done


I am guessing here ... and if that's a linux shell command I don't know 
if
it evaluates *.WAV just once or more than once.  It's also not clear to 
me
if you delete merged.wav between experiments.


I've never seen an example sox command that uses redirection to place 
output
in a result file, so wonder if what's (not) being written there is 
progress
or error messages rather than audio data?  Perhaps

    sox --combine merge *.WAV merged.wav

or

    sox --combine merge *.WAV \anotherdir\merged.wav

would work better.


It looks to me as if your code runs sox many times.  Why not run it just
once reading all the input files in one operation?

If multiple runs ARE needed, does it work when the source directory only
contains one file?  Or two files?  Can you make a copy of the generated
file each time - NOT in the same directory, so there's no risk of it 
being
matched by the "*.WAV" if that pattern is matched multiple times? - and
examine each run's output to see what it actually contains (eg with the
stats effect)?



-- 
Jeremy Nicoll - my opinions are my own


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

  reply	other threads:[~2023-10-15 21:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-15 13:27 Help with --combine merge Ulf A. S. Holbrook via Sox-users
2023-10-15 20:39 ` Jeremy Nicoll - ml sox users [this message]
2023-10-16 11:10   ` Ulf A. S. Holbrook via Sox-users
2023-10-17 12:14     ` Jan Stary
2023-10-16 10:44 ` Jan Stary
2023-10-16 11:28   ` Ulf A. S. Holbrook via Sox-users
2023-10-17 12:05     ` 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=fcdab26452d6759bb3a916757ab8864c@wingsandbeaks.org.uk \
    --to=sox-users@lists.sourceforge.net \
    /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).