Picon

DTMF Eraser

Hi

I'm new in SOX, its a great project. I have a question,

How can I delete the DTMF from a audiofile with SOX. I didn't found a filter as silence, but I think that I can use BandReject effect however I don't understand how use it. can anyone help me!!

Thanks

Wiiego

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
Daniel Taylor | 7 Dec 2010 21:28
Favicon

Re: DTMF Eraser

 I don't have time to look up the exact command line, but I have done
this before, that is the correct effect IIRC, and you need to specify
each tone in the DTMF spec and the window width for exclusion (so 7
tones or 8 if you need to include the full keypad).

On 12/07/2010 01:01 PM, Diego Fernando Nieto Moreno wrote:
> Hi
>
> I'm new in SOX, its a great project. I have a question,
>
> How can I delete the DTMF from a audiofile with SOX. I didn't found a
> filter as silence, but I think that I can use BandReject effect
> however I don't understand how use it. can anyone help me!!
>
> Thanks
>
> Wiiego
>
>
> ------------------------------------------------------------------------------
> What happens now with your Lotus Notes apps - do you make another costly 
> upgrade, or settle for being marooned without product support? Time to move
> off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
> use, and manage than apps on traditional platforms. Sign up for the Lotus 
> Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
>
>
> _______________________________________________
> Sox-users mailing list
> Sox-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users

--

-- 
Daniel Taylor             VP Operations       Vocal Laboratories, Inc
dtaylor <at> vocalabs.com                                 952-941-6580x203

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
Picon

Re: DTMF Eraser

Thanks Daniel

Are you talking about IIR Filter with biquad option?


2010/12/7 Daniel Taylor <dtaylor <at> vocalabs.com>
 I don't have time to look up the exact command line, but I have done
this before, that is the correct effect IIRC, and you need to specify
each tone in the DTMF spec and the window width for exclusion (so 7
tones or 8 if you need to include the full keypad).

On 12/07/2010 01:01 PM, Diego Fernando Nieto Moreno wrote:
> Hi
>
> I'm new in SOX, its a great project. I have a question,
>
> How can I delete the DTMF from a audiofile with SOX. I didn't found a
> filter as silence, but I think that I can use BandReject effect
> however I don't understand how use it. can anyone help me!!
>
> Thanks
>
> Wiiego
>
>
> ------------------------------------------------------------------------------
> What happens now with your Lotus Notes apps - do you make another costly
> upgrade, or settle for being marooned without product support? Time to move
> off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
> use, and manage than apps on traditional platforms. Sign up for the Lotus
> Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
>
>
> _______________________________________________
> Sox-users mailing list
> Sox-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users

--
Daniel Taylor             VP Operations       Vocal Laboratories, Inc
dtaylor <at> vocalabs.com                                 952-941-6580x203


------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
Daniel Taylor | 9 Dec 2010 14:45
Favicon

Re: DTMF Eraser

 Not quite verbatim:
bandreject {DTMFTone1} 50 bandreject {DTMFTone2} 50 ...

You might be able to feed bandreject a list, but the documentation
doesn't support that hypothesis.

IIRC: If I Recall Correctly.

On 12/08/2010 04:37 PM, Diego Fernando Nieto Moreno wrote:
> Thanks Daniel
>
> Are you talking about IIR Filter with biquad option?
>
>
> 2010/12/7 Daniel Taylor <dtaylor <at> vocalabs.com
> <mailto:dtaylor <at> vocalabs.com>>
>
>      I don't have time to look up the exact command line, but I have done
>     this before, that is the correct effect IIRC, and you need to specify
>     each tone in the DTMF spec and the window width for exclusion (so 7
>     tones or 8 if you need to include the full keypad).
>
>     On 12/07/2010 01:01 PM, Diego Fernando Nieto Moreno wrote:
>     > Hi
>     >
>     > I'm new in SOX, its a great project. I have a question,
>     >
>     > How can I delete the DTMF from a audiofile with SOX. I didn't
>     found a
>     > filter as silence, but I think that I can use BandReject effect
>     > however I don't understand how use it. can anyone help me!!
>     >
>     > Thanks
>     >
>     > Wiiego
>     >
>     >
>     >
>     ------------------------------------------------------------------------------
>     > What happens now with your Lotus Notes apps - do you make
>     another costly
>     > upgrade, or settle for being marooned without product support?
>     Time to move
>     > off Lotus Notes and onto the cloud with Force.com, apps are
>     easier to build,
>     > use, and manage than apps on traditional platforms. Sign up for
>     the Lotus
>     > Notes Migration Kit to learn more.
>     http://p.sf.net/sfu/salesforce-d2d
>     >
>     >
>     > _______________________________________________
>     > Sox-users mailing list
>     > Sox-users <at> lists.sourceforge.net
>     <mailto:Sox-users <at> lists.sourceforge.net>
>     > https://lists.sourceforge.net/lists/listinfo/sox-users
>
>     --
>     Daniel Taylor             VP Operations       Vocal Laboratories, Inc
>     dtaylor <at> vocalabs.com <mailto:dtaylor <at> vocalabs.com>                
>                     952-941-6580x203
>
>
>     ------------------------------------------------------------------------------
>     What happens now with your Lotus Notes apps - do you make another
>     costly
>     upgrade, or settle for being marooned without product support?
>     Time to move
>     off Lotus Notes and onto the cloud with Force.com, apps are easier
>     to build,
>     use, and manage than apps on traditional platforms. Sign up for
>     the Lotus
>     Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
>     _______________________________________________
>     Sox-users mailing list
>     Sox-users <at> lists.sourceforge.net
>     <mailto:Sox-users <at> lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/sox-users
>
>
>
> ------------------------------------------------------------------------------
> This SF Dev2Dev email is sponsored by:
>
> WikiLeaks The End of the Free Internet
> http://p.sf.net/sfu/therealnews-com
>
>
> _______________________________________________
> Sox-users mailing list
> Sox-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users

--

-- 
Daniel Taylor             VP Operations       Vocal Laboratories, Inc
dtaylor <at> vocalabs.com                                 952-941-6580x203

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
Doug Lee | 9 Dec 2010 15:20

Re: DTMF Eraser

My experience indicates that using very narrow-band equalizer effects
is sometimes better than using bandreject, because bandreject seems to
cause humps around the rejected area and also causes reverb-like side
effects, whereas equalizer seems not to do this.  With a precise
frequency as for DTMF removal, a very narrow band (2h perhaps) should
work nicely.  Your mileage may vary of course.

On Thu, Dec 09, 2010 at 07:45:05AM -0600, Daniel Taylor wrote:
 Not quite verbatim:
bandreject {DTMFTone1} 50 bandreject {DTMFTone2} 50 ...

You might be able to feed bandreject a list, but the documentation
doesn't support that hypothesis.

IIRC: If I Recall Correctly.

On 12/08/2010 04:37 PM, Diego Fernando Nieto Moreno wrote:
> Thanks Daniel
>
> Are you talking about IIR Filter with biquad option?
>
>
> 2010/12/7 Daniel Taylor <dtaylor <at> vocalabs.com
> <mailto:dtaylor <at> vocalabs.com>>
>
>      I don't have time to look up the exact command line, but I have done
>     this before, that is the correct effect IIRC, and you need to specify
>     each tone in the DTMF spec and the window width for exclusion (so 7
>     tones or 8 if you need to include the full keypad).
>
>     On 12/07/2010 01:01 PM, Diego Fernando Nieto Moreno wrote:
>     > Hi
>     >
>     > I'm new in SOX, its a great project. I have a question,
>     >
>     > How can I delete the DTMF from a audiofile with SOX. I didn't
>     found a
>     > filter as silence, but I think that I can use BandReject effect
>     > however I don't understand how use it. can anyone help me!!
>     >
>     > Thanks
>     >
>     > Wiiego
>     >
>     >
>     >
>     ------------------------------------------------------------------------------
>     > What happens now with your Lotus Notes apps - do you make
>     another costly
>     > upgrade, or settle for being marooned without product support?
>     Time to move
>     > off Lotus Notes and onto the cloud with Force.com, apps are
>     easier to build,
>     > use, and manage than apps on traditional platforms. Sign up for
>     the Lotus
>     > Notes Migration Kit to learn more.
>     http://p.sf.net/sfu/salesforce-d2d
>     >
>     >
>     > _______________________________________________
>     > Sox-users mailing list
>     > Sox-users <at> lists.sourceforge.net
>     <mailto:Sox-users <at> lists.sourceforge.net>
>     > https://lists.sourceforge.net/lists/listinfo/sox-users
>
>     --
>     Daniel Taylor             VP Operations       Vocal Laboratories, Inc
>     dtaylor <at> vocalabs.com <mailto:dtaylor <at> vocalabs.com>                
>                     952-941-6580x203
>
>
>     ------------------------------------------------------------------------------
>     What happens now with your Lotus Notes apps - do you make another
>     costly
>     upgrade, or settle for being marooned without product support?
>     Time to move
>     off Lotus Notes and onto the cloud with Force.com, apps are easier
>     to build,
>     use, and manage than apps on traditional platforms. Sign up for
>     the Lotus
>     Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
>     _______________________________________________
>     Sox-users mailing list
>     Sox-users <at> lists.sourceforge.net
>     <mailto:Sox-users <at> lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/sox-users
>
>
>
> ------------------------------------------------------------------------------
> This SF Dev2Dev email is sponsored by:
>
> WikiLeaks The End of the Free Internet
> http://p.sf.net/sfu/therealnews-com
>
>
> _______________________________________________
> Sox-users mailing list
> Sox-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users

-- 
Daniel Taylor             VP Operations       Vocal Laboratories, Inc
dtaylor <at> vocalabs.com                                 952-941-6580x203

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

--

-- 
Doug Lee                 dgl <at> dlee.org                http://www.dlee.org
SSB BART Group           doug.lee <at> ssbbartgroup.com   http://www.ssbbartgroup.com
"When your best-laid plans have turned to dust, vacuum!"
- Whoopi Goldberg 

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
ciclo esano | 11 Dec 2010 17:43
Picon

convertiing raw data to wav from analytic instrument ??

Dear soxer

I have a set of digital data acquired in the time domain by an analytical instrument, stored as 32-bit long integer (little-endian). Each sample contains mixed audio signals (10Hz - 20kHz) which decay exponentially in a couple of seconds.

I need to convert that data in an audio format (PCM ob better WAV) which can be easily played by any multimedia player.

Unfortunately I have no idea on how to start with this project.

I thought the command line sox should be able to handle that, if I use its
command line switches to force it to treat your data as 32-bit samples at a
particular rate.  

Something  like this maybe should work:

sox -e raw -b 32 -c 1 -r SAMPLERATE --endian little data.raw -b 16 -c 1 -r 44100 sound.wav


Moreover the information about bit rate, channel and everything concerning audio file is very difficult to apply here, since the raw data are coming from a digitizer after several downsampling processes to have all the signals in the audio range (in fact they arise from the high frequency of nuclear spins, hundreds of MHz)

Can you give to me some help?

Thanks 
Max
------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
Doug Lee | 11 Dec 2010 18:14

Re: convertiing raw data to wav from analytic instrument ??

On Sat, Dec 11, 2010 at 05:43:01PM +0100, ciclo esano wrote:
>    Dear soxer
>    I have a set of digital data acquired in the time domain by an
>    analytical instrument, stored as 32-bit long integer (little-endian).
>    Each sample contains mixed audio signals (10Hz - 20kHz) which decay
>    exponentially in a couple of seconds.
>    I need to convert that data in an audio format (PCM ob better WAV)
>    which can be easily played by any multimedia player.
>    Unfortunately I have no idea on how to start with this project.
>    I thought the command line sox should be able to handle that, if I use
>    its
>    command line switches to force it to treat your data as 32-bit samples
>    at a
>    particular rate.
>    Something  like this maybe should work:
>    sox -e raw -b 32 -c 1 -r SAMPLERATE --endian little data.raw -b 16 -c 1
>    -r 44100 sound.wav
> 
>    Moreover the information about bit rate, channel and everything
>    concerning audio file is very difficult to apply here, since the raw
>    data are coming from a digitizer after several downsampling processes
>    to have all the signals in the audio range (in fact they arise from the
>    high frequency of nuclear spins, hundreds of MHz)

Sounds like a fascinating and useful application of SoX actually!

Other pros may have more to say here, but here's my spin (pardon the
pun) on this.  I'm saying more than necessary so that the message will
stand on its own as possible tutorial material in the archives:

I think you're trying to convert one format to another.  If you're
trying to do more than that, my directions below may be incomplete.

I first advise using `play' if you can, to test your input data
interpretation on the fly, before making an output file of the
results.  Here's what you need for that:

I think you have the exact sampling rate for the input file.  If not,
you'll either need it or need to put up with funny results due to its
absence.  If the sampling rate for the input data file is not
constant, we have more problems I think.

Next you need the exact format of the data - number of bits, encoding,
and such.  You seem to have that..

Then the syntax to specify all this for the input file.  Starting with
your example, try

   play -e raw -b 32 -c 1 -r SAMPLERATE --endian little data.raw

   If you don't get the sort of sound you want from that, the intended
   resulting wav file wouldn't sound right either.

   Once you get acceptable results live, you can start trying to
   convert to another output format from there.  Your example should
   try to make a monaural, 16-bit, 44.1 kHz result using all other
   format specifications as found in the original file.

   Unless I missed something, your approach should work, perhaps with
   a little tweaking if the source file interpretation isn't right
   already.  If not, let us know what's going wrong, and we can go
   from there.

   And if it's no violation of contract or any similar regulation, I'd
   enjoy hearing a resulting file, preferably wav, flac, or other
   lossless version. :)

--

-- 
Doug Lee                 dgl <at> dlee.org                http://www.dlee.org
SSB BART Group           doug.lee <at> ssbbartgroup.com   http://www.ssbbartgroup.com
"The nice thing about standards is that there are so many of them
to choose from." -- Andrew Tanenbaum

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
ciclo esano | 11 Dec 2010 18:33
Picon

Re: convertiing raw data to wav from analytic instrument ??

Great answer!

yes you hit the nail!

Using play -e raw -b 32 -c 1 -r 441000 --endian little dat.raw
I am facing with the following error:

play FAIL sox: --encoding: `raw' is not one of: signed-integer, unsigned-integer, floating-point, ms-adpcm, ima-adpcm, oki-adpcm, gsm-full-rate, u-law, mu-law, a-law.


That's strange. I am sure the data are in little-endian format (since the storage CPU is Intel), each sample is 32-bit long integer, I have 32768 samples but have no idea about the real sampling rate. This I can try with several speeds, but the question about the "encoding" still unclear for me.

So, I am stuck here

2010/12/11 Doug Lee <dgl <at> dlee.org>
On Sat, Dec 11, 2010 at 05:43:01PM +0100, ciclo esano wrote:
>    Dear soxer
>    I have a set of digital data acquired in the time domain by an
>    analytical instrument, stored as 32-bit long integer (little-endian).
>    Each sample contains mixed audio signals (10Hz - 20kHz) which decay
>    exponentially in a couple of seconds.
>    I need to convert that data in an audio format (PCM ob better WAV)
>    which can be easily played by any multimedia player.
>    Unfortunately I have no idea on how to start with this project.
>    I thought the command line sox should be able to handle that, if I use
>    its
>    command line switches to force it to treat your data as 32-bit samples
>    at a
>    particular rate.
>    Something  like this maybe should work:
>    sox -e raw -b 32 -c 1 -r SAMPLERATE --endian little data.raw -b 16 -c 1
>    -r 44100 sound.wav
>
>    Moreover the information about bit rate, channel and everything
>    concerning audio file is very difficult to apply here, since the raw
>    data are coming from a digitizer after several downsampling processes
>    to have all the signals in the audio range (in fact they arise from the
>    high frequency of nuclear spins, hundreds of MHz)

Sounds like a fascinating and useful application of SoX actually!

Other pros may have more to say here, but here's my spin (pardon the
pun) on this.  I'm saying more than necessary so that the message will
stand on its own as possible tutorial material in the archives:

I think you're trying to convert one format to another.  If you're
trying to do more than that, my directions below may be incomplete.

I first advise using `play' if you can, to test your input data
interpretation on the fly, before making an output file of the
results.  Here's what you need for that:

I think you have the exact sampling rate for the input file.  If not,
you'll either need it or need to put up with funny results due to its
absence.  If the sampling rate for the input data file is not
constant, we have more problems I think.

Next you need the exact format of the data - number of bits, encoding,
and such.  You seem to have that..

Then the syntax to specify all this for the input file.  Starting with
your example, try

  play -e raw -b 32 -c 1 -r SAMPLERATE --endian little data.raw

  If you don't get the sort of sound you want from that, the intended
  resulting wav file wouldn't sound right either.

  Once you get acceptable results live, you can start trying to
  convert to another output format from there.  Your example should
  try to make a monaural, 16-bit, 44.1 kHz result using all other
  format specifications as found in the original file.

  Unless I missed something, your approach should work, perhaps with
  a little tweaking if the source file interpretation isn't right
  already.  If not, let us know what's going wrong, and we can go
  from there.

  And if it's no violation of contract or any similar regulation, I'd
  enjoy hearing a resulting file, preferably wav, flac, or other
  lossless version. :)

--
Doug Lee                 dgl <at> dlee.org                http://www.dlee.org
SSB BART Group           doug.lee <at> ssbbartgroup.com   http://www.ssbbartgroup.com
"The nice thing about standards is that there are so many of them
to choose from." -- Andrew Tanenbaum

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages,
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
Igor Kaplan | 11 Dec 2010 18:51
Picon
Favicon

mp3 (lame and mod) libraries for sox.

Dear sox users. Would like to ask a big favor. Could someone please point me to the working lame and mod libraries for sox. I understand, it is not distributed with sox, I have also failed to find it on the internet. I have searched everywhere, found many links, however was not able to find a good, working binary anywhere. I got some libraries, however looks like they were older versions anddid not work. Finally I found, I am going in circles, one page referred to another, then I went to another one and finally came back to my start point. I even was trying to build libraries myself, with cygwin or VC++, got some compilation errors and no result.

  I have searched archives of this mailing list, it looks like noone else has such problem, nobody asks questions regarding mp3 libraries, so probably everyone else know, where and how to download those libraries, or don’t care.

  Please, please, send me the direct links to binaries, which work. If someone could please send those libraries directly to my email address, would appreciate even more!

 

  Many, many thanks.

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
Doug Lee | 11 Dec 2010 20:17

Re: convertiing raw data to wav from analytic instrument ??

Try each of the suggested encodings to see if any give you good
results, if you don't know the encoding used to create the original
file.  Chances are it's either signed, unsigned, or float, since it
sounds like raw data not encoded with any compression algorithm
intended for sound.

On Sat, Dec 11, 2010 at 06:33:47PM +0100, ciclo esano wrote:
   Great answer!

   yes you hit the nail!

   Using play -e raw -b 32 -c 1 -r 441000 --endian little dat.raw

   I am facing with the following error:

   play FAIL sox: --encoding: `raw' is not one of: signed-integer,
   unsigned-integer, floating-point, ms-adpcm, ima-adpcm, oki-adpcm,
   gsm-full-rate, u-law, mu-law, a-law.

   That's strange. I am sure the data are in little-endian format (since
   the storage CPU is Intel), each sample is 32-bit long integer, I have
   32768 samples but have no idea about the real sampling rate. This I can
   try with several speeds, but the question about the "encoding" still
   unclear for me.

   So, I am stuck here

   2010/12/11 Doug Lee <[1]dgl <at> dlee.org>

   On Sat, Dec 11, 2010 at 05:43:01PM +0100, ciclo esano wrote:
   >    Dear soxer
   >    I have a set of digital data acquired in the time domain by an
   >    analytical instrument, stored as 32-bit long integer
   (little-endian).
   >    Each sample contains mixed audio signals (10Hz - 20kHz) which
   decay
   >    exponentially in a couple of seconds.
   >    I need to convert that data in an audio format (PCM ob better WAV)
   >    which can be easily played by any multimedia player.
   >    Unfortunately I have no idea on how to start with this project.
   >    I thought the command line sox should be able to handle that, if I
   use
   >    its
   >    command line switches to force it to treat your data as 32-bit
   samples
   >    at a
   >    particular rate.
   >    Something  like this maybe should work:
   >    sox -e raw -b 32 -c 1 -r SAMPLERATE --endian little data.raw -b 16
   -c 1
   >    -r 44100 sound.wav
   >
   >    Moreover the information about bit rate, channel and everything
   >    concerning audio file is very difficult to apply here, since the
   raw
   >    data are coming from a digitizer after several downsampling
   processes
   >    to have all the signals in the audio range (in fact they arise
   from the
   >    high frequency of nuclear spins, hundreds of MHz)

     Sounds like a fascinating and useful application of SoX actually!
     Other pros may have more to say here, but here's my spin (pardon the
     pun) on this.  I'm saying more than necessary so that the message
     will
     stand on its own as possible tutorial material in the archives:
     I think you're trying to convert one format to another.  If you're
     trying to do more than that, my directions below may be incomplete.
     I first advise using `play' if you can, to test your input data
     interpretation on the fly, before making an output file of the
     results.  Here's what you need for that:
     I think you have the exact sampling rate for the input file.  If
     not,
     you'll either need it or need to put up with funny results due to
     its
     absence.  If the sampling rate for the input data file is not
     constant, we have more problems I think.
     Next you need the exact format of the data - number of bits,
     encoding,
     and such.  You seem to have that..
     Then the syntax to specify all this for the input file.  Starting
     with
     your example, try
       play -e raw -b 32 -c 1 -r SAMPLERATE --endian little data.raw
       If you don't get the sort of sound you want from that, the
     intended
       resulting wav file wouldn't sound right either.
       Once you get acceptable results live, you can start trying to
       convert to another output format from there.  Your example should
       try to make a monaural, 16-bit, 44.1 kHz result using all other
       format specifications as found in the original file.
       Unless I missed something, your approach should work, perhaps with
       a little tweaking if the source file interpretation isn't right
       already.  If not, let us know what's going wrong, and we can go
       from there.
       And if it's no violation of contract or any similar regulation,
     I'd
       enjoy hearing a resulting file, preferably wav, flac, or other
       lossless version. :)
     --
     Doug Lee                 [2]dgl <at> dlee.org
     [3]http://www.dlee.org
     SSB BART Group           [4]doug.lee <at> ssbbartgroup.com
     [5]http://www.ssbbartgroup.com
     "The nice thing about standards is that there are so many of them
     to choose from." -- Andrew Tanenbaum
     --------------------------------------------------------------------
     ----------
     Oracle to DB2 Conversion Guide: Learn learn about native support for
     PL/SQL,
     new data types, scalar functions, improved concurrency, built-in
     packages,
     OCI, SQL*Plus, data movement tools, best practices and more.
     [6]http://p.sf.net/sfu/oracle-sfdev2dev
     _______________________________________________
     Sox-users mailing list
     [7]Sox-users <at> lists.sourceforge.net
     [8]https://lists.sourceforge.net/lists/listinfo/sox-users

References

   1. mailto:dgl <at> dlee.org
   2. mailto:dgl <at> dlee.org
   3. http://www.dlee.org/
   4. mailto:doug.lee <at> ssbbartgroup.com
   5. http://www.ssbbartgroup.com/
   6. http://p.sf.net/sfu/oracle-sfdev2dev
   7. mailto:Sox-users <at> lists.sourceforge.net
   8. https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 

_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

--

-- 
Doug Lee                 dgl <at> dlee.org                http://www.dlee.org
SSB BART Group           doug.lee <at> ssbbartgroup.com   http://www.ssbbartgroup.com
"It's not easy to be crafty and winsome at the same time, and few accomplish
it after the age of six." --John W. Gardner and Francesca Gardner Reese

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 

Gmane