Jürgen Zdero | 6 Jul 16:40 2007
Picon

still the old s24 Problem :)

How can i use sox to identify the file type of an audiofile with an *.s24 
extension. I even do not know its compressed or raw or anything else.
These files are created by an dictaphone.

cheers juergen

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Tom | 11 Jul 16:48 2007

new install of sox crashes on pitch change

I am new to Sox and have a windows installation.  Any attempt to
adjust the pitch causes sox.exe to crash after it has processed 100%
of the file.  I am getting the option to send/view a Windows error
report but I have not included it in this post.

I am using: sox -V4 -S test.wav output.wav pitch 10

I am getting the following output:

sox auto: Detected file format type: wav
sox wav: WAV Chunk fmt
sox wav: WAV Chunk data
sox wav: Reading Wave file: Microsoft PCM format, 2 channels, 48000 samp/sec
sox wav:         192000 byte/sec, 4 block align, 16 bits/samp, 1870720 data byte
s
sox wav:         467680 Samps/chans

Input File     : 'test.wav'
Sample Size    : 16-bit (2 bytes)
Sample Encoding: signed (2's complement)
Channels       : 2
Sample Rate    : 48000
Duration       : 00:09.74 = 467680 samples = 795.374 CDDA sectors
Endian Type    : little
Reverse Nibbles: no
Reverse Bits   : no

sox sox: Overwriting 'output.wav'
sox wav: Writing Wave file: Microsoft PCM format, 2 channels, 48000 samp/sec
sox wav:         192000 byte/sec, 4 block align, 16 bits/samp
(Continue reading)

Giampiero Salvi | 11 Jul 17:20 2007
Picon
Picon

run sox in a pipe with header based formats

Hi all,
I'm trying to use sox as a filter to another program, i.e. I'm trying to 
run a pipe similar to the following (just to exemplify):

cat file1.wav | sox -t wav - -r 8000 -t wav - resample -ql | cat > file2.wav

Where the second cat in the example is in the place of my command. The 
problem is that sox needs to seek the output file to modify its header 
after writing all the samples, and this is not possible in a pipe. I get 
the error:

sox: Length in output .wav header will be wrong since can't seek to fix it

(Redirection on the other hand works fine, for example:
cat file1.wav | sox -t wav - -r 8000 -t wav - resample -ql > file2.wav
creates the desired file.)

One solution could be writing to a raw file instead of a wav file, but 
this creates problems in the second program I run which needs to read the 
number of samples from a header. Another solution would be creating a 
temporary file, but this is what I would like to avoid by running the 
programs in a pipe.

My question is: is there a way to solve this problem, for example by 
delaying the output to the pipe until the header is fixed?

Thank you!
Giampiero

-------------------------------------------------------------------------
(Continue reading)

robs | 11 Jul 20:56 2007
Picon

Re: new install of sox crashes on pitch change

--- Tom <sox <at> tompercival.com> wrote:

> I am new to Sox and have a windows installation. 
> Any attempt to
> adjust the pitch causes sox.exe to crash after it

Sorry, there is a bug in SoX; the very latest SoX (not
released yet) has a new key change effect which
doesn't crash.  However, in the mean time you could
try this instead:
http://www.surina.net/soundtouch/soundstretch_win32_1.3.1.zip

      ___________________________________________________________ 
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today
http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Chris Bagwell | 11 Jul 22:27 2007

Re: run sox in a pipe with header based formats

On Wed, Jul 11, 2007 at 04:20:10PM +0100, Giampiero Salvi wrote:
> Hi all,
> I'm trying to use sox as a filter to another program, i.e. I'm trying to 
> run a pipe similar to the following (just to exemplify):
> 
> cat file1.wav | sox -t wav - -r 8000 -t wav - resample -ql | cat > file2.wav
> 
> Where the second cat in the example is in the place of my command. The 
> problem is that sox needs to seek the output file to modify its header 
> after writing all the samples, and this is not possible in a pipe. I get 
> the error:
> 
> sox: Length in output .wav header will be wrong since can't seek to fix it
> 
> (Redirection on the other hand works fine, for example:
> cat file1.wav | sox -t wav - -r 8000 -t wav - resample -ql > file2.wav
> creates the desired file.)
> 
> One solution could be writing to a raw file instead of a wav file, but 
> this creates problems in the second program I run which needs to read the 
> number of samples from a header. Another solution would be creating a 
> temporary file, but this is what I would like to avoid by running the 
> programs in a pipe.
> 
> My question is: is there a way to solve this problem, for example by 
> delaying the output to the pipe until the header is fixed?
> 

Especially with the pipes on both sides of sox, there is no way
to precompute the length of the wav file and so it has to seek()
(Continue reading)

David Graff | 12 Jul 16:20 2007

Re: run sox in a pipe with header based formats


giampi <at> kth.se said:
> I'm trying to use sox as a filter to another program, i.e. I'm trying
> to  run a pipe similar to the following (just to exemplify):
>
> cat file1.wav | sox -t wav - -r 8000 -t wav - resample -ql | cat >
> file2.wav
>
> Where the second cat in the example is in the place of my command.
> ... I get  the error:
>
> sox: Length in output .wav header will be wrong since can't seek to
> fix it
> ...
> One solution could be writing to a raw file instead of a wav file, but
> this creates problems in the second program I run which needs to read
> the  number of samples from a header...
>
> My question is: is there a way to solve this problem, for example by
> delaying the output to the pipe until the header is fixed? 

As Chris B. suggested, the first solution that comes to mind is to fix
your second program (the downstream filter) so that it doesn't fail when
EOF occurs before it has read the number of data bytes specified in the
audio header.

Another solution would be to write a fairly simple third program, that
would sit between sox and your downstream filter, to buffer the full set
of data coming from sox, fix the data_byte_count field in the ms-wav
header, and then write to stdout.  Assuming the whole data stream on
(Continue reading)

Giampiero Salvi | 12 Jul 16:28 2007
Picon
Picon

Re: run sox in a pipe with header based formats

On Thu, 12 Jul 2007, David Graff wrote:

>
> giampi <at> kth.se said:
>> I'm trying to use sox as a filter to another program, i.e. I'm trying
>> to  run a pipe similar to the following (just to exemplify):
>>
>> cat file1.wav | sox -t wav - -r 8000 -t wav - resample -ql | cat >
>> file2.wav
>>
>> Where the second cat in the example is in the place of my command.
>> ... I get  the error:
>>
>> sox: Length in output .wav header will be wrong since can't seek to
>> fix it
>> ...
>> One solution could be writing to a raw file instead of a wav file, but
>> this creates problems in the second program I run which needs to read
>> the  number of samples from a header...
>>
>> My question is: is there a way to solve this problem, for example by
>> delaying the output to the pipe until the header is fixed?
>
> As Chris B. suggested, the first solution that comes to mind is to fix
> your second program (the downstream filter) so that it doesn't fail when
> EOF occurs before it has read the number of data bytes specified in the
> audio header.
>
> Another solution would be to write a fairly simple third program, that
> would sit between sox and your downstream filter, to buffer the full set
(Continue reading)

stephen | 14 Jul 19:40 2007
Picon

Getting the frequency data from a wav file

I would like to take a wav recording of a spinning disk and analyze it to
determine its speed vs. time. The main frequency component should
correspond to the RPM.

Can I use sox to extract the frequency information vs time? Thanks.

Stephen

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Kevin Cosgrove | 25 Jul 19:02 2007
X-Face

[LAU] (no subject)

Hi,

Is there a program which will convert a sound file into a text
(.txt) or comma separated value (.csv) file?  I'm thinking that
would be a good route to go in order to import the data from a
sound file into a math manipulation program, e.g. octave, maxima,
Matlab, Mathcad, Gnumeric, etc.   If not, this would seem to be
a good enhancement for SoX, or Audacity, or any sound file editor.

Thanks....

--
Kevin
David Graff | 25 Jul 19:31 2007

Re: (no subject)


kevinc <at> doink.com said:
> Is there a program which will convert a sound file into a text (.txt)
> or comma separated value (.csv) file?  I'm thinking that would be a
> good route to go in order to import the data from a sound file into a
> math manipulation program, e.g. octave, maxima, Matlab, Mathcad,
> Gnumeric, etc.

Someone else will probably know of existing tools for importing audio 
sample data into one or another math package, but if I had to convert 
from binary to ascii numerics, I'd probably use sox to convert the 
input file to a raw single-channel output of appropriate endian-ness, 
and run a perl one-liner to reformat the binary numbers into strings; 
e.g.:

 sox 1chn_pcm.wav -t raw - | 
  perl -e 'while(read(STDIN,$_,2)==2){printf("%d\n",unpack("v",$_))}' > 1ch_pcm.txt

(You probably want to elaborate the perl script to produce a different
output format, depending on what your math package wants as input.)

	Dave Graff

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

Gmane