Nilesh Deshpande | 1 Oct 2011 19:30
Picon

stat -freq

Hello,


Is it possible to get a 256 point DFT instead of the default 4096 point DFT using the stat -freq effect?

If so, kindly let me know the syntax.

Thanks in advance

Nilesh Deshpande
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
Schumacher Marlon | 3 Oct 2011 19:14
Picon
Favicon

Re: Using sox with external audio devices on OSX

Hi,

Thanks, I'm currently not compiling myself so I'll have to wait for the next release...

In the meantime (for those interested), here is a possible workaround using soundflower/soundflowerbed
(http://code.google.com/p/soundflower/); 
Setting soundflower as the system's default audio device sox can send/receive audio from this driver. Via
soundflowerbed one can tap into the audio and route it to external audio devices. Note, however, that this
is limited to max. 16Channels, introduces a buffer of latency and works only for audio output. (For the
inverse, i.e. routing audio from an external device into sox, it must first be sent into soundflower via an
external app or similar).

Marlon

On 2011-09-29, at 22:41 , Chris Bagwell wrote:

> I've fixed the bug below but can't test it very well since I only have
> 3 audio devices (why I never saw the problem before I guess).
> 
> I'm thinking a new release of SoX is probably due soon.  If your not
> able to compile custom versions yourself... then hopefully it won't be
> to long.
> 
> Chris
> 
> On Wed, Sep 28, 2011 at 2:57 PM, Chris Bagwell <chris <at> cnpbagwell.com> wrote:
>> Ouch.  I think I see a bug in SoX source code.  Look for how
>> property_size is used to see how many audio devices are in the system.
>> 
>> 
>>          devices = malloc(property_size);
>>          status = AudioHardwareGetProperty(kAudioHardwarePropertyDevices, &prop
>> erty_size, devices);
>> 
>>          if (status == noErr)
>>          {
>>              int i;
>>              for (i = 0; i < property_size/sizeof(AudioDeviceID); i++)
>>              {
>>                  char name[256];
>>                  status =
>> AudioDeviceGetProperty(devices[i],0,false,kAudioDevicePropertyDeviceName,&property_size,&name);
>> 
>> 
>> We really shouldn't be basing the loop count on a variable that is
>> re-init'ed inside the for loop.
>> 
>> I'll test it out later and commit a fix.
>> 
>> Chris
>> 
>> On Wed, Sep 28, 2011 at 2:40 PM, Schumacher Marlon
>> <marlon.schumacher <at> music.mcgill.ca> wrote:
>>> Hi,
>>> 
>>> Hmmm, unfortunately I don't know the internal workings of coreaudio that well. All I can say is that the
other audio devices show up in Audio Midi Setup and Sound preferences as in the screencap below.
>>> 
>>> 
>>> 
>>> 
>>> ...and this is what sox returns for the command "/Applications/sox-14.3.2/sox  -V6 -n -t coreaudio
unknown" :
>>> 
>>> ------------------------
>>> /Applications/sox-14.3.2/sox: SoX v14.3.2
>>> time:  Feb 27 2011 10:42:10
>>> uname: Darwin Marlon-MBPro-2.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011;
root:xnu-1504.15.3~1/RELEASE_I386 i386
>>> gcc:   4.2.1 (Apple Inc. build 5646) (dot 1)
>>> arch:  1248 48 44 L OMP
>>> /Applications/sox-14.3.2/sox INFO nulfile: sample rate not specified; using 48000
>>> 
>>> Input File     : '' (null)
>>> Channels       : 1
>>> Sample Rate    : 48000
>>> Precision      : 32-bit
>>> 
>>> /Applications/sox-14.3.2/sox INFO coreaudio: Found Audio Device "Built-in Microphone"
>>> 
>>> /Applications/sox-14.3.2/sox INFO coreaudio: Found Audio Device "Built-in Input"
>>> 
>>> /Applications/sox-14.3.2/sox INFO coreaudio: Found Audio Device "Built-in Outpu"
>>> 
>>> /Applications/sox-14.3.2/sox FAIL formats: can't open output file `unknown': can not open audio device
>>> ------------------------
>>> 
>>> -apparently sox doesn't find the other devices... or the 'query' is not correct?
>>> 
>>> Marlon
>>> 
>>> On 2011-09-28, at 15:03 , Chris Bagwell wrote:
>>> 
>>>> I'm not sure why these would not show up in list.  If they present
>>>> themselves as audio devices then as far as I know they should show up
>>>> via coreaudio queries.
>>>> 
>>>> I believe the SoX coreaudio driver is using same OS functions to get
>>>> the list that most other apps are.
>>>> 
>>>> Chris
>>>> 
>>>> On Wed, Sep 28, 2011 at 12:44 PM, Schumacher Marlon
>>>> <marlon.schumacher <at> music.mcgill.ca> wrote:
>>>>> Hi,
>>>>> 
>>>>> Sorry for the late reply. Thanks, this works.
>>>>> However, I can only see the coreaudio devices. Is there a way to 'query' other audio devices in the
system, too?
>>>>> (e.g. I can't see other drivers such as Soundflower, JackRouter or external devices).
>>>>> 
>>>>> Marlon
>>>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> All the data continuously generated in your IT infrastructure contains a
>>> definitive record of customers, application performance, security
>>> threats, fraudulent activity and more. Splunk takes this data and makes
>>> sense of it. Business sense. IT sense. Common sense.
>>> http://p.sf.net/sfu/splunk-d2dcopy1
>>> _______________________________________________
>>> Sox-users mailing list
>>> Sox-users <at> lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/sox-users
>>> 
>>> 
>> 
> 
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> Sox-users mailing list
> Sox-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
> 

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Schumacher Marlon | 4 Oct 2011 02:07
Picon
Favicon

sox-pipe on windows?

Hello,

I've been trying to get this working for a long time now, hopefully someone with windows-experience can
help; 
I'm trying to use sox14.3.2 on Windows XP with pipe-output ... 

Something like: 

sox "|sox -n -p synth 6 tri 10k:14k " -d 

seems not to work:
--
|sox -n -p synth 6 tri 10k:14k:

Encoding: 	Signed PCM
Channels: 	1 <at> 32bit
Samplerate:	48000Hz
Replaygain: 	off
Duration:		unknown

sox FAIL sox: `-' error writing output file: Broken pipe
--
I thought it might be related to the unknown Duration. So I tried:

sox -V "|sox infile.aif -p synth 6 tri 10k:14k" outfile.aif (-> to have sox determine the duration from the input-file):

sox INFO formats: detected file format type 'sox'
sox FAIL formats: can't open input pipe '|sox infile.aif -p synth 6 tri 10k:14k' : premature EOF
sox FAIL sox: error writing output file: Broken pipe

-and something as simple as:

sox -V "|sox infile.aif -p" outfile.aif 

returns:

sox INFO sox: effects chain: input		44100Hz 1 channels
sox INFO sox: effects chain: output		44100Hz 1 channels
sox FAIL sox: `-' error writing output file: Broken pipe

I don't really know how to deal with these messages. Am I doing something wrong syntax-wise or ... can
someone help, perhaps?
(Note, that the same commands work fine as 'normal' sox commands without pipe, i.e. replacing "-p" with "-d")

Best,
Marlon

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Thor Andreassen | 4 Oct 2011 15:24
Picon

Re: stat -freq

On Sat, Oct 01, 2011 at 11:00:16PM +0530, Nilesh Deshpande wrote:
> Is it possible to get a 256 point DFT instead of the default 4096
> point DFT using the stat -freq effect?

No it is hardcoded, the attached patch makes it an option. But be warned
this is fraught with border issues as the dft windows do not overlap and
are not windowed. Maybe this will be improved later.

[...]

-- 
best regards
Thor Andreassen
diff --git a/src/stat.c b/src/stat.c
index d60d887..e7f8e5c 100644
--- a/src/stat.c
+++ b/src/stat.c
 <at>  <at>  -48,6 +48,7  <at>  <at>  static int sox_stat_getopts(sox_effect_t * effp, int argc, char **argv)
   stat->volume = 0;
   stat->srms = 0;
   stat->fft = 0;
+  stat->fft_size = 0;

   --argc, ++argv;
   for (; argc > 0; argc--, argv++) {
 <at>  <at>  -67,6 +68,17  <at>  <at>  static int sox_stat_getopts(sox_effect_t * effp, int argc, char **argv)
       stat->srms = 1;
     else if (!(strcmp(*argv, "-freq")))
       stat->fft = 1;
+    else if (!(strcmp(*argv, "-fft_size"))) {
+      if (argc <= 1) {
+        lsx_fail("-fft_size option: invalid argument");
+        return SOX_EOF;
+      }
+      argc--, argv++;              /* Move to next argument. */
+      if (!sscanf(*argv, "%lu", &stat->fft_size)) {
+        lsx_fail("-fft_size option: invalid argument");
+        return SOX_EOF;
+      }
+    }
     else if (!(strcmp(*argv, "-d")))
       stat->volume = 2;
     else {
 <at>  <at>  -99,7 +111,9  <at>  <at>  static int sox_stat_start(sox_effect_t * effp)
   for (i = 0; i < 4; i++)
     stat->bin[i] = 0;

-  stat->fft_size = 4096;
+  if(stat->fft_size == 0)
+    stat->fft_size = 4096;
+
   stat->re_in = stat->re_out = NULL;

   if (stat->fft) {
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
Chris Bagwell | 4 Oct 2011 16:48

Re: sox-pipe on windows?

I believe this has been reported on Windows XP before but no one was
able to debug it.  I do not normally have a copy of XP around to
debug with myself.

I just looked a little deeper into Windows _popen() function that SoX
uses.  Unlike unix, it supports a "b" and "t" flag to indicate binary
or text file.  We are not setting it and I bet its defaults to text
file mode.

Probably something about that is causing the error.

Sorry, I do not have a work around short of recompiling SoX.  I'll try
to get a fix for this into the next release of SoX.

Chris

On Mon, Oct 3, 2011 at 7:07 PM, Schumacher Marlon
<marlon.schumacher <at> music.mcgill.ca> wrote:
> Hello,
>
> I've been trying to get this working for a long time now, hopefully someone with windows-experience can help;
> I'm trying to use sox14.3.2 on Windows XP with pipe-output ...
>
> Something like:
>
> sox "|sox -n -p synth 6 tri 10k:14k " -d
>
> seems not to work:
> --
> |sox -n -p synth 6 tri 10k:14k:
>
> Encoding:       Signed PCM
> Channels:       1 <at> 32bit
> Samplerate:     48000Hz
> Replaygain:     off
> Duration:               unknown
>
> sox FAIL sox: `-' error writing output file: Broken pipe
> --
> I thought it might be related to the unknown Duration. So I tried:
>
> sox -V "|sox infile.aif -p synth 6 tri 10k:14k" outfile.aif (-> to have sox determine the duration from the input-file):
>
> sox INFO formats: detected file format type 'sox'
> sox FAIL formats: can't open input pipe '|sox infile.aif -p synth 6 tri 10k:14k' : premature EOF
> sox FAIL sox: error writing output file: Broken pipe
>
> -and something as simple as:
>
> sox -V "|sox infile.aif -p" outfile.aif
>
> returns:
>
> sox INFO sox: effects chain: input              44100Hz 1 channels
> sox INFO sox: effects chain: output             44100Hz 1 channels
> sox FAIL sox: `-' error writing output file: Broken pipe
>
> I don't really know how to deal with these messages. Am I doing something wrong syntax-wise or ... can
someone help, perhaps?
> (Note, that the same commands work fine as 'normal' sox commands without pipe, i.e. replacing "-p" with "-d")
>
> Best,
> Marlon
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Sox-users mailing list
> Sox-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
>

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Patrick Francis | 5 Oct 2011 15:28
Picon

Re: libsox-fmt-all

On 9/26/11,  <> wrote:
>
>
> Le 2011-09-25 à 23:43, Patrick <> a écrit :
>
>>
>> On Sep 25, 2011, at 5:01 PM, Ulrich Klauer wrote:
>>
>>> Patrick <>:
>>>
>>>> I am looking for the source (not the .deb binary) for libsox-fmt-all.
>>>> I need to cross compile it myself. I have searched without success for
>>>> the source package. Can anyone provide a link.
>>>
>>> It's part of the sox source package:
>>>
>>>
>>> There is nothing to compile for libsox-fmt-all, though, it's only a
>>> "meta" package to pull in the specific libsox-fmt-* packages (also part
>>> of src:sox).
>>>
>>> Ulrich
>>
>> Is 14.3.2-2 a source version that has libsox-fmt-all baked in?
>> Which of course would be different from the 14.3.2, which is the version
>> from the main sox site.  Is this correct?
>> If so, then all I need to do is make, make install, the 14.3.2-2 version
>> to get the advantages of libsox-fmt-all. right?
>>
>> Patrick
>
> I'm currently at the airport, so not much time to answer but simply put, yes
> it's only a meta package to allow you to quickly get every format. Just
> build sox and you'll get everything.
>
> Hint: apt-get source sox
>
> -pascal
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
>
> _______________________________________________
> Sox-users mailing list
>
>
>

ok... I am almost figuring this out but still stuck and need help. I
have libsox-fmt-***.so files. Where in the sox dir should I place
these files prior to doing ./configure, make-install on sox? I am not
doing the apt-get method as I am building from source and not using a
specific deb package. Thanks.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Pascal Giard | 5 Oct 2011 15:42
Picon
Gravatar

Re: libsox-fmt-all

On Wed, Oct 5, 2011 at 9:28 AM, Patrick Francis <humer4489 <at> gmail.com> wrote:
> ok... I am almost figuring this out but still stuck and need help. I
> have libsox-fmt-***.so files. Where in the sox dir should I place
> these files prior to doing ./configure, make-install on sox? I am not
> doing the apt-get method as I am building from source and not using a
> specific deb package. Thanks.

Hello Patrick,
 I'm confused... what is actually your objective?

You should not have to move anything around.
Following the usual "./configure && make && sudo make install" should
work just fine if you want to install SoX system-wide.
(I am assuming that you are building from the source tarball
downloaded from the sourceforge project page).

Otherwise, please clearly state your goal.

Cheers,

-Pascal
--

-- 
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Patrick Francis | 5 Oct 2011 16:18
Picon

Re: libsox-fmt-all

On 10/5/11, Pascal Giard <> wrote:
> On Wed, Oct 5, 2011 at 9:28 AM, Patrick Francis <> wrote:
>> ok... I am almost figuring this out but still stuck and need help. I
>> have libsox-fmt-***.so files. Where in the sox dir should I place
>> these files prior to doing ./configure, make-install on sox? I am not
>> doing the apt-get method as I am building from source and not using a
>> specific deb package. Thanks.
>
> Hello Patrick,
>  I'm confused... what is actually your objective?
>
> You should not have to move anything around.
> Following the usual "./configure && make && sudo make install" should
> work just fine if you want to install SoX system-wide.
> (I am assuming that you are building from the source tarball
> downloaded from the sourceforge project page).
>
> Otherwise, please clearly state your goal.
>
> Cheers,
>
> -Pascal
> --
> Homepage (
> Debian GNU/Linux (
> COMunité/LACIME: École de technologie supérieure (
> Integrated Microsystems Laboratory: McGill (
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
>
> _______________________________________________
> Sox-users mailing list
>
>
>
Pascal,

I am compiling SoX from source, but I need have included in it, the
libsox-fmt-all libraries, with it's depends, e.g libsox-fmt-mp3 etc..
However, just dl'ing the sox source (which I did) does not include
these by default. So my goal is to compile from source with the
libsox-fmt-all libs included. I am cross compiling and everything
works great with the exception of sox not recognizing other formats.
This is why I need those optional addons from the libsox-fmt...
family. Thanks!

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Pascal Giard | 5 Oct 2011 16:43
Picon
Gravatar

Re: libsox-fmt-all

On Wed, Oct 5, 2011 at 10:18 AM, Patrick Francis <humer4489 <at> gmail.com> wrote:
> Pascal,
>
> I am compiling SoX from source, but I need have included in it, the
> libsox-fmt-all libraries, with it's depends, e.g libsox-fmt-mp3 etc..
> However, just dl'ing the sox source (which I did) does not include
> these by default. So my goal is to compile from source with the
> libsox-fmt-all libs included. I am cross compiling and everything
> works great with the exception of sox not recognizing other formats.
> This is why I need those optional addons from the libsox-fmt...
> family. Thanks!

Patrick,
I think you are misunderstanding how formats librairies are built in SoX.

Simply put, there are NO other source code other than what is in the tarball.
If the format libraries you need are not there it's either because:
1) they are not built as a result of missing dependencies (you should
see that at configuration time);
2) sox does not find the folder that contains the libraries for some
reason e.g. you are trying to execute sox w/o installing it.

My guess is that you are in situation one.

If you are still confuse and your native language is French, feel free
to email me personally with your remaining questions, I'll try to
clear things up with you.

Cheers,

-Pascal
--

-- 
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Rick T | 5 Oct 2011 18:47
Picon

Is there a way to limit sox recording to 1 second

Greetings All

Is there a way to limit sox recording to 1 second without editing?

thanks
--

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

Gmane