From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6130 216.105.38.0/24 X-Spam-Status: No, score=-3.4 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 010561F45A for ; Sun, 19 Apr 2020 03:29:59 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jQ0eU-0001aD-Jm; Sun, 19 Apr 2020 03:29:50 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jQ0eT-0001a0-Jj for sox-users@lists.sourceforge.net; Sun, 19 Apr 2020 03:29:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZV6d26j9XNXGYxPZhg9GFwk+aYC7EDzCAPJBy0hfgn0=; b=QgenzVyvQb2Cu4MvMsNYsPrt0E IjHipkdsr44dTiLcCO2v6ynNpz8XHxmh7fz5EksI9rK0XrOb8e3ixFQ20nuJ2tNqC6QdV1UGGSDlv jC09dZHeFXcFw+AxOZ+BhXoLSCJ0pVvQyiT6/6aECAIiMoOQGCdk2NxKkMJN2ZMDuTHQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ZV6d26j9XNXGYxPZhg9GFwk+aYC7EDzCAPJBy0hfgn0=; b=iN4xR664qZvSSSNCes/oqKRJEl oIuUDbNhrKzfXEylOuj+u29tHwTvST4ypSnsvO+kkq6fzfjY1DS9zhGXQvNsogp8fiKTrnLAfHe7X W2Q3/+OdeWGSFHUFEn9FBvSDj63m0e2VIZ6faF2G7NZQY8atGIXkGLihgX54TyNN0+8o=; Received: from mail-pj1-f43.google.com ([209.85.216.43]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1jQ0eQ-006vl9-W2 for sox-users@lists.sourceforge.net; Sun, 19 Apr 2020 03:29:49 +0000 Received: by mail-pj1-f43.google.com with SMTP id a22so2916544pjk.5 for ; Sat, 18 Apr 2020 20:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=ZV6d26j9XNXGYxPZhg9GFwk+aYC7EDzCAPJBy0hfgn0=; b=Dx3lqW5aVAqAcBkCmj4AKMNyH9UQRw5a3fZZ8NvTzDfJ5bW2fETZpmQB54R+A1G3en Qw55y2fblakSFJAU5Et4J4c9nQuPIBZY9eAtIL+D0ePv0aRtTeyDo5mNV52vGJFKW/Ry qI+3xgU+FxmsT5u6lfur8Drp6tgmKBJbsEPA05UNOzJB0YPCrgxz5ys3rRwmwanIl8FC gCLlvH3FAUgAaOtNqIOJicVveoWWWGHJ2g/GhW1nQnclQ37CPkUWrglsHJhcVwaUQ/9Q XnuvGuzWOVuVQnBHE7Wur4Czp3+nHQnVgloI03CNd6oIcVGnsSweSWDvWYOdlLRkx3ru +CbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZV6d26j9XNXGYxPZhg9GFwk+aYC7EDzCAPJBy0hfgn0=; b=eOFle3b69aD7krVMxUnUs3FAEB+DdHposYvbrFDIT6VRcvFVyNJQhzgxv8UPkE9auD +JlVyiYfb+atDWrJemUH52DZc+dcBHdCIKebepUxy+xYmOyJ9OL8vLCscLg11CUo3q9B JV0NFsgA/iMLlunhyeEAvBBkvtm3+Ki8VxhfQFtT9gyRMKlv7wHnSvIJzvKDHGuXvO3P cJsvUPKTOh+iNXD6hzif1BpNefqAO7a3c5jkLkpLTqucPCYvlIGYA4QMvk/vWRpLxSFV Kg895qmGITWERLjpGg54WYFRKSi/CGXgm8ycvIps2oe8rJJMRFLfbtKlxlLVXt8aTaJx hKaA== X-Gm-Message-State: AGi0PuZBBNxYZHycjlxuMtQoDIcv9oadFtrWb1JVrmfCBRN3Qka85kO/ ZlQDINh/+O6sPt27EAuTpAmdepV8 X-Google-Smtp-Source: APiQypLuSAd6PcdMo5EoOgxHUO3Pm0eH326x+qReDNrNh8PR8Rdd0dEmyJMChVN6KDhiNmdopRQJbQ== X-Received: by 2002:a17:90a:8d02:: with SMTP id c2mr10863528pjo.113.1587266980834; Sat, 18 Apr 2020 20:29:40 -0700 (PDT) Received: from ?IPv6:2600:8801:980:2c:3f4e:d33d:7263:f970? ([2600:8801:980:2c:3f4e:d33d:7263:f970]) by smtp.gmail.com with ESMTPSA id i6sm17400548pfg.138.2020.04.18.20.29.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Apr 2020 20:29:40 -0700 (PDT) To: sox-users@lists.sourceforge.net References: <2abc00c8-f19a-abbd-f197-2e31b8be6cee@gmail.com> <20200418092812.GA2613@www.stare.cz> From: jungle boogie Message-ID: Date: Sat, 18 Apr 2020 20:29:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200418092812.GA2613@www.stare.cz> Content-Language: en-US X-Headers-End: 1jQ0eQ-006vl9-W2 Subject: Re: Combine and trim files with silence X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: sox-users-bounces@lists.sourceforge.net Hi Jan, Thus said Jan Stary on Sat, 18 Apr 2020 11:28:12 +0200 > On Apr 17 22:11:00, jungleboogie0@gmail.com wrote: >> I'm using SoX v14.4.2 and would like help mixing three files, with silence >> in between two of them. > > With silence in between, you probably mean to concatenate them, > not to "mix" them. Yes, that's probably the correct term. > > Ah, so the three files are > > 1. short_track > 2. main_file > 3. long track > > in that order? Yes, in that order. short_track will have the 1/2 second silence after the audible part plays. > > In short, you mail is a mess. Tell us what you you need to do _and_why_. > Be as specific as possible. Don't talk about "the longest file" without > showing the lengths, or "a specific file" without naming it, etc. > short_track plays the audible part, then plays 1.5 seconds of silence. main_file plays simultaneously while long_track plays; long_track is several decidable quieter (that's adjusted outside of this sox command I want to solve) and trimmed to the length of mainfile. short track -> silence -> mainfile & long track (which is trimmed to length of long track). Long track should be trimmed to the length of mainfile, which my trim 0 `soxi -D mainfile` did. > > Trimming a file to another file's length is easy: > sox third.wav trimmed.wav trim 0 `soxi -D prototype.wav` > soxi -D prototype.wav third.wav trimmed.wav > > > To concatenating three files, with silence between (say) first and second, > just pad the first with silence first: > > sox first.wav padded.wav pad 0 1.5 > soxi -D first.wav padded.wav > But this means I need to trim longfile separately, right? > Then just contatenate them: > > sox padded.wav second.wav trimmed.wav out.wav > soxi -D padded.wav second.wav trimmed.wav out.wav > rm -rf padded.wav trimmed.wav > > I hope I haven't made things more muddy. In summary... first plays 1/2 seconds of silence mainfile & longfile play, long file trimmed to length of mainfile. Mikko had an idea of adding 1/2 of silence to mainfile before the mix and trim thing. sox mainfile mainfile_padded.wav pad 1.5 0 sox -m shortfile mainfile_padded.wav long_file out.wav trim 0 `soxi -D mainfile_padded.wav` It would be great if I didn't have to the extra step of adding silence to the main_file first, though. _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users