sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: jungle boogie <jungleboogie0@gmail.com>
To: sox-users@lists.sourceforge.net
Subject: Combine and trim files with silence
Date: Fri, 17 Apr 2020 22:11:00 -0700	[thread overview]
Message-ID: <2abc00c8-f19a-abbd-f197-2e31b8be6cee@gmail.com> (raw)

Hi All,

I'm using SoX v14.4.2 and would like help mixing three files, with 
silence in between two of them.

Problem I want to solve:
Mix three files with, with the longest being shorten to a specific file. 
I also want a 1.5 second pad between short_track.wav and main_file.wav

What I've tried:
sox -m main_file.wav long_track.wav -p pad 1.5 0 | sox - -m 
short_track.wav -t wavpcm out.wav trim 0 0 `soxi -D main_file.wav`

Problem is that the file cuts off about 1.5 seconds too quick, which is 
how long my pad is.


I've also tried creating a blank file:
sox -n -r 16000 -b 16 -c 1 silence.wav trim 0.0 1.5

Then combining it:
sox short_track.wav silence.wav main_file.wav long_track.wav out.wav 
trim 0 `soxi -D main_file.wav`

But you seasoned sox experts already know this means log_track.wav isn't 
used at all. This also cuts off about the last 1.5 seconds of the 
out.wav file as well.

So is it possible to combine these files and trim to the main file?

Any pointers would be greatly appreciated!


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

             reply	other threads:[~2020-04-18  5:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-18  5:11 jungle boogie [this message]
2020-04-18  5:49 ` Combine and trim files with silence Mikko Olkkonen
2020-04-18  9:28 ` Jan Stary
2020-04-19  3:29   ` jungle boogie
2020-04-27 21:41     ` 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=2abc00c8-f19a-abbd-f197-2e31b8be6cee@gmail.com \
    --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).