Obtaining 24-bit Samples

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Obtaining 24-bit Samples

Kenny Koller
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.

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

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Obtaining 24-bit Samples

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

I take it using the filename won't work.  Or the filesystem
modify/create time.

Any format that supports tags should be able to have timestamp in a
tag.

I generally store all my files as flac, but that is a lossless
compressed - not "raw" format.

I guess I'm not sure what you mean by "raw".  .au, .wav, .aiff are
all uncompressed, but they have limited tagging support.

SoX can export raw PCM with no headers - which is what I think of
when the term "raw data" is used.  With no headers, there is no
place for tags, so the filename is the only option for timestamp.

But maybe I'm not understanding your question.

--  f

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Obtaining 24-bit Samples

Fmiser
In reply to this post by Kenny Koller
> Kenny wrote:
>
> My second question: Is there a supported format that supports
> time stamps? 24-bit raw data with period stamps would be ideal.

I take it using the filename won't work.  Or the filesystem
modify/create time.

Any format that supports tags should be able to have timestamp in a
tag.

I generally store all my files as flac, but that is a lossless
compressed - not "raw" format.

I guess I'm not sure what you mean by "raw".  .au, .wav, .aiff are
all uncompressed, but they have limited tagging support.

SoX can export raw PCM with no headers - which is what I think of
when the term "raw data" is used.  With no headers, there is no
place for tags, so the filename is the only option for timestamp.

But maybe I'm not understanding your question.

--  f

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users