sox-users@lists.sourceforge.net unofficial mirror
 help / color / Atom feed
From: "K. H. Hom via Sox-users" <sox-users@lists.sourceforge.net>
To: "sox-users@lists.sourceforge.net" <sox-users@lists.sourceforge.net>
Cc: "K. H. Hom" <handwash@protonmail.com>
Subject: Re: Chopping wav samples
Date: Tue, 24 Mar 2020 09:48:07 +0000
Message-ID: <EB_IEhlQciagoNzcakNr9Tkiy7Kj3kKMfk1Je6lFfhTOyvrGObhNmwyXnsN81kuzWrQY6KqL9ts8V9Sw73kJQemSHXcHPTqF5AtblK7IRZw=@protonmail.com> (raw)
In-Reply-To: <98a52aafd4c4fb1dddf2f68d613ef58f@wingsandbeaks.org.uk>

[-- Attachment #1: Type: text/plain, Size: 2430 bytes --]



Thank you for the reply.


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Am Freitag, März 20, 2020 9:41 PM schrieb Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk>:

> On 2020-03-20 09:37, K. H. Hom via Sox-users wrote:
>
> > Hi,
> > when i navigate to the folder with the source file and manually
> > execute the following command it works:
> > sox threebursts.wav temp_outfile.wav silence 1 0.1 1 : newfile :
> > restart
> > but if I craete a batch file which takes teh file as argument, it doent
> > work:
> > sox "%~1" temp_outfile.wav silence 1 0.1 1% 1 0.1 1% : newfile :
> > restart
> > it results into :
> >
> > > sox "C:\Users\hom\Downloads\Desktop\New folder (3)\threebursts.wav"
> > > temp_outfile.wav silence 1 0.1 1 : newfile : restart
> >
> > Any idea why that do not work please?
>
> A % sign has special meaning in bat files. Look - you used "%~1" - and
> expected that
> to be replaced by a parameter. Well, further along the command the
> other % chars
> caused a problem.
>
> You need to use %% where you want a single one. See: "Quoting and
> escaping" at:
>
> https://en.wikibooks.org/wiki/Windows_Batch_Scripting#How_a_command_line_is_interpreted

Yeah I know and the manual says :
"
The command-line arguments AKA command-line parameters passed to a batch script are accessible as %1, %2, ..., %9.
"
as well as "%~1" search the doc ...

When dragging a file on the the bat file , the %~1 with be replaced with the path to the file as mentioned in my first post. But that wasnt the question. It works , try it.

So "%~1" becomes  "C:\Users\hom\Downloads\Desktop\New folder (3)\threebursts.wav"

The question is now wht is this command not working:

sox "C:\Users\hom\Downloads\Desktop\New folder (3)\threebursts.wav" temp_outfile.wav silence 1 0.1 1 : newfile : restart


Cheers H

>
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Jeremy Nicoll - my opinions are my own
>
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users



[-- Attachment #2: firefox_KvOQ4GMyhG.png --]
[-- Type: image/png, Size: 15277 bytes --]

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



[-- Attachment #4: Type: text/plain, Size: 158 bytes --]

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

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20  9:37 K. H. Hom via Sox-users
2020-03-20 20:41 ` Jeremy Nicoll - ml sox users
2020-03-24  9:48   ` K. H. Hom via Sox-users [this message]
2020-03-24 14:01     ` Jeremy Nicoll - ml sox users
2020-03-29 14:27       ` K. H. Hom via Sox-users

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='EB_IEhlQciagoNzcakNr9Tkiy7Kj3kKMfk1Je6lFfhTOyvrGObhNmwyXnsN81kuzWrQY6KqL9ts8V9Sw73kJQemSHXcHPTqF5AtblK7IRZw=@protonmail.com' \
    --to=sox-users@lists.sourceforge.net \
    --cc=handwash@protonmail.com \
    /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

sox-users@lists.sourceforge.net unofficial mirror

Archives are clonable: git clone --mirror https://public-inbox.org/sox-users

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.sox
	nntp://ou63pmih66umazou.onion/inbox.comp.audio.sox
	nntp://news.gmane.io/gmane.comp.audio.sox

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git