From: Eric Wong <normalperson@yhbt.net>
To: sox-users@lists.sourceforge.net
Subject: Re: Question about syntax for --sox−pipe with output to file
Date: Fri, 5 Aug 2016 10:38:40 +0000 [thread overview]
Message-ID: <20160805103840.GA9368@starla> (raw)
In-Reply-To: <CAMALpsRQSjdKNOQo_AFkjYFmtmZXSnH7em9M1CCO5LoiDS7gxQ@mail.gmail.com>
Pierow <pierow@thepyro.com> wrote:
> I am using -p to pipe a series of three SoX commands that generate three tones:
>
> play "|sox -n -p synth .276 sine 1200 gain -1" "|sox -n -p synth .276
> sine 900 gain -1" "|sox -n -p synth .380 sine 1200 gain -1"
>
> I would like to output the resulting three tones to a WAV file. I'm
> sure that this is something that is easy to do but nothing that I have
> tried seems to work. I have read the man page and searched through
> the archives of the mailing list but I can't seem to find anything
> that works with the piped commands.
See the short SYNOPSIS at the top of the manpage,
many people probably skip over it :)
> Is there a way to tell direct this output to a file instead of playing
> to system audio?
Same as play, almost:
sox "|sox -n -p synth .276 sine 1200 gain -1" \
"|sox -n -p synth .276 sine 900 gain -1" \
"|sox -n -p synth .380 sine 1200 gain -1" \
output.wav
Basically, "play $INPUTS" is the same as "sox $INPUTS -t $FORMAT"
So if you use alsa, the following should behave just like play
did for you:
sox "|sox -n -p synth .276 sine 1200 gain -1" \
"|sox -n -p synth .276 sine 900 gain -1" \
"|sox -n -p synth .380 sine 1200 gain -1" \
-t alsa
------------------------------------------------------------------------------
next prev parent reply other threads:[~2016-08-05 10:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 0:57 Question about syntax for --sox−pipe with output to file Pierow
2016-08-05 10:00 ` Pierow
2016-08-05 10:38 ` Eric Wong [this message]
2016-08-05 12:23 ` Pierow
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=20160805103840.GA9368@starla \
--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).