Re: [linux-audio-user] sample rate for raw file

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-user] sample rate for raw file
From: Josh Green (jgreen_AT_users.sourceforge.net)
Date: Wed Dec 12 2001 - 05:58:53 EET


On Mon, 2001-12-10 at 17:58, author wrote:
> I know nothing about processing sound using
> a computer so I have a couple of really dumb
> questions to ask. I hope someone will have the
> patience to answer because I have not got
> the mildest idea of what to do.
> I ripped a track from a cd into a .raw file.
> I want to play it using the Linux command line program play,
> but play wants a sample rate in Hertz. Can anyone
> tell me what value that might be?
> Also, I'd like to use sox to convert the .raw file
> to a .wav, but sox also wants the sample rate,
> and something called the encoding.
> What do I enter for sample rate and encoding?

I saw many answers to your question but no specific command line to
execute, here is what I would do to convert your RAW file to WAV:

sox -t raw -r 44100 -s -w -c 2 file.raw -t wav file.wav

CD audio is:

-r 44100 : 44100 hz sampling rate (number of times the level of the
audio signal is "sampled" per second)

-s : signed data format (2's compliment signed binary data)

-w : words (16 bit, i.e. 2 byte samples)

-c 2 : stereo (2 channels)

If you haven't already checked it out "man sox" will give you some good
information.

-- 
    Josh Green
    Smurf Sound Font Editor (http://smurf.sourceforge.net)


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Dec 12 2001 - 05:55:24 EET