Obtaining 24-bit Samples [Solved]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FYI: I took a careful look at the data and could see that though it was producing 32-bit signed samples  of the form 0xXXXX.XX00 and were easily converted to 24-bit signed values. If I made my webcam the default audio input then I got 32-bit samples of single channel data of the form 0xXXXX.0000.

I'm still curious about timestamps if anyone has any experience with that.

Thanks,

Kenny

On Thu, Oct 6, 2016 at 5:01 PM <sox-users-request@xxxxxxxxxxxxxxxxxxxxx> wrote:
Send Sox-users mailing list submissions to
        sox-users@xxxxxxxxxxxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/sox-users
or, via email, send a message with subject or body 'help' to
        sox-users-request@xxxxxxxxxxxxxxxxxxxxx

You can reach the person managing the list at
        sox-users-owner@xxxxxxxxxxxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Sox-users digest..."


Today's Topics:

   1. Re: volume extremely low when combining many files (Bob S)
   2. Re: volume extremely low when combining many files (Erich Eckner)
   3. Re: volume extremely low when combining many files (Bob S)
   4. Re: volume extremely low when combining many files (Bob S)
   5. Obtaining 24-bit Samples (Kenny Koller)


----------------------------------------------------------------------

Message: 1
Date: Tue, 27 Sep 2016 15:55:52 -0500
From: Bob S <bsabiston@xxxxxxxxx>
Subject: Re: volume extremely low when combining many
        files
To: sox-users@xxxxxxxxxxxxxxxxxxxxx
Message-ID: <909F9001-19FA-4156-9D99-CBEA9CE6A707@xxxxxxxxx>
Content-Type: text/plain; charset="windows-1252"

Hey Erich, I don?t know if you saw my post ? sorry to bother you but I am wondering you see anything wrong with the way I am calling sox here?

> Hey Erich,
>
>       Thanks again for the reply.  Here is the call I use to generate file 92 for example:
>
> sox -V   -t raw -r 11025 -e signed -b 8 -c 1 sound0000  -r 44100 sound92.wav vol 1 speed 0.93636363744736 pad 12.966666666667 10.966666666667 trim 0 13.033333333333
>
> Here?s the result:
> https://dl.dropboxusercontent.com/u/4215526/sound92.wav <https://dl.dropboxusercontent.com/u/4215526/sound92.wav>
>
> I don?t know if it could be part of the problem, but here is the source effect file ?sound0000?, which is not a wav but just raw samples:
> https://dl.dropboxusercontent.com/u/4215526/sound0000 <https://dl.dropboxusercontent.com/u/4215526/sound0000>

Thanks!
Bob

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Tue, 27 Sep 2016 23:30:15 +0200
From: Erich Eckner <erich@xxxxxxxxxx>
Subject: Re: volume extremely low when combining many
        files
To: sox-users@xxxxxxxxxxxxxxxxxxxxx
Message-ID: <d40d72e0-cc40-6f29-f4f4-45e9dbfe15b2@xxxxxxxxxx>
Content-Type: text/plain; charset="windows-1252"

Hi Bob,

yes, I saw your post (but had other stuff to do) - thanks for the reminder.

The problem seems to be the "speed" effect, which implies a "rate"
effect, which uses ffts and thus the zero from the pad effect may become
nonzero (but close to).

My suggestion is to either use "speed" on sound0000 and generate an
intermediate file or to explicitely use the "rate" effect _before_ "pad"
(but I'm not sure, the latter works).

cheers, Erich

On 27.09.2016 22:55, Bob S wrote:
> Hey Erich, I don?t know if you saw my post ? sorry to bother you but I am wondering you see anything wrong with the way I am calling sox here?
>
>> Hey Erich,
>>
>>      Thanks again for the reply.  Here is the call I use to generate file 92 for example:
>>
>> sox -V   -t raw -r 11025 -e signed -b 8 -c 1 sound0000  -r 44100 sound92.wav vol 1 speed 0.93636363744736 pad 12.966666666667 10.966666666667 trim 0 13.033333333333
>>
>> Here?s the result:
>> https://dl.dropboxusercontent.com/u/4215526/sound92.wav <https://dl.dropboxusercontent.com/u/4215526/sound92.wav>
>>
>> I don?t know if it could be part of the problem, but here is the source effect file ?sound0000?, which is not a wav but just raw samples:
>> https://dl.dropboxusercontent.com/u/4215526/sound0000 <https://dl.dropboxusercontent.com/u/4215526/sound0000>
>
> Thanks!
> Bob
>
>
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Sox-users mailing list
> Sox-users@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/sox-users
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature

------------------------------

Message: 3
Date: Thu, 29 Sep 2016 11:40:55 -0500
From: Bob S <bsabiston@xxxxxxxxx>
Subject: Re: volume extremely low when combining many
        files
To: sox-users@xxxxxxxxxxxxxxxxxxxxx
Message-ID: <A3B578E2-3857-4A8F-89C4-A6C18B205802@xxxxxxxxx>
Content-Type: text/plain; charset="windows-1252"


> On Sep 27, 2016, at 4:30 PM, Erich Eckner <erich@xxxxxxxxxx> wrote:
>
> Hi Bob,
>
> yes, I saw your post (but had other stuff to do) - thanks for the reminder.
>
> The problem seems to be the "speed" effect, which implies a "rate"
> effect, which uses ffts and thus the zero from the pad effect may become
> nonzero (but close to).
>
> My suggestion is to either use "speed" on sound0000 and generate an
> intermediate file or to explicitely use the "rate" effect _before_ "pad"
> (but I'm not sure, the latter works).
>
> cheers, Erich


Hey Erich,

        Thanks for the reply. However, I tried it without the ?speed? call and still got the same noise  But I think I know what the problem may be now.  I just noticed this warning:

sox WARN pad: Input audio too short; pads not applied: 1

So I guess the sound is too short for padding to work?  I?m not sure why the length of the sound would matter for padding.  And it *is* making the sound the length I specify, so ?pad? is doing something.  That is kind of weird.

Bob

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 4
Date: Thu, 29 Sep 2016 11:49:48 -0500
From: Bob S <bsabiston@xxxxxxxxx>
Subject: Re: volume extremely low when combining many
        files
To: sox-users@xxxxxxxxxxxxxxxxxxxxx
Message-ID: <42AB3815-5BC4-4B01-9E5F-80E76B0A6D59@xxxxxxxxx>
Content-Type: text/plain; charset=windows-1252


> On Sep 27, 2016, at 4:30 PM, Erich Eckner <erich@xxxxxxxxxx> wrote:
>
> Hi Bob,
>
> yes, I saw your post (but had other stuff to do) - thanks for the reminder.
>
> The problem seems to be the "speed" effect, which implies a "rate"
> effect, which uses ffts and thus the zero from the pad effect may become
> nonzero (but close to).
>
> My suggestion is to either use "speed" on sound0000 and generate an
> intermediate file or to explicitely use the "rate" effect _before_ "pad"
> (but I'm not sure, the latter works).
>
> cheers, Erich

Actually, I know earlier I said that the ?-D? option did not work for me, but I just tried it again since it seemed like dithering was suspect, and this time it worked!  I don?t know what happened before, maybe I put it in the wrong place.

It still gives me that warning about pads not being applied, but it seems like they ARE being applied, so I don?t know what is up with that.  But it is working now ? it was the -D option.

Thanks for all the help!

Bob




------------------------------

Message: 5
Date: Fri, 07 Oct 2016 00:00:55 +0000
From: Kenny Koller <kenny@xxxxxxxxxxxxxxxxxxxxx>
Subject: Obtaining 24-bit Samples
To: sox-users@xxxxxxxxxxxxxxxxxxxxx
Message-ID:
        <CAPtqgUywX3KPApjsrN4zu5Sp+v510mGLG9bHh24iBdyVc2LNCA@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"

We're about to deploy a couple of systems to record audio for an
experiment. We are using a Focusrite Scarlett 2i2 on OSX.

My first question is that when I try to create a .wav or .raw file and
request 24-bit sampling it tells me that it is 32-bit:

Squall: ./sox --rate 96k -b 24 -d sample.raw

Input File     : 'default' (coreaudio)
Channels       : 2
Sample Rate    : 96000
Precision      : 32-bit
Sample Encoding: 32-bit Signed Integer PCM

As a test I have music playing from my iPhone into two channels of the
Focusrite using a splitter. When I record to .wav I can hear the music just
fine.

I ran across a post where someone had a similar issue and it was suggested
that sox may request 24 bits but will use whatever the hardware can
actually do but that doesn't seem to be the case. I'm attaching a screen
shot of the Audio MIDI setup that shows the device configured for 96 kHz
and 24-bit samples.

[image: Screen Shot 2016-10-06 at 4.51.53 PM.png]

It's important that I get raw output from the device as we will be using
the data to develop algorithms for our embedded system (which will
eventually sample the microphone directly).

My second question: Is there a supported format that supports time stamps?
24-bit raw data with period stamps would be ideal.

Many thanks. Nice to have a command line tool to do this stuff.

Regards,

Kenny
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2016-10-06 at 4.51.53 PM.png
Type: image/png
Size: 11037 bytes
Desc: not available

------------------------------

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

------------------------------

_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users


End of Sox-users Digest, Vol 121, Issue 1
*****************************************
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users

[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux