LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we change a 24bit time sample into 8 or 16 bit time sample

Hi

I have two questions
1. Is there a way to change the time data acquired by PXI 4472 which is 24 bit to 8 or 16 bit.
2. Is it possible to change the sampling rate of data acquired. If the data was acquired at a sampling rate of 96Khz can we change the rate of sampling rate of the data by some way.

I am trying to build a VI which while acquiring data will play sound. To play sound on a simple sound card it should be either 8 or 16 bit, mono or stereo and in specific sampling rate of 8000, 11025, 22050 and 44100. How can I make a VI which will change the sampling rate and the bit information to play sound.

Regards

Nitin
0 Kudos
Message 1 of 5
(2,563 Views)

Hi

You can easily change the bitsize,

First determine the maximum in the array (a function exists in the array palette)

the make sure that this max is divide so that the result is less thaan 6435 for 16 bit and less than 255 for 8 bit.

divide all the values by that divider and put them into an indicator array with the correct bitsize.

To get diifferent timing you have to undersample, in fact what you need is a sample each 1/44.1KHz instead of each 1/95kHZ

So less than halve of the samples are needed. try to find out a nice algoritme for that one... 

greetings from the Netherlands
Message 2 of 5
(2,546 Views)
Hello,
 
Did we already address this question in the following thread for you:
 

"how to create a wav file from 24bit 96Khz sampling rate data"

http://forums.ni.com/ni/board/message?board.id=170&message.id=173571#M173571

Just checking 🙂

Best Regards,

JLS

Best,
JLS
Sixclear
Message 3 of 5
(2,528 Views)
Hi JLS

Yes I got what I was looking for. Thank you very much to all.
My program still has to pass the test, and I am improving it everyday so in the field We would be able to test the microphones which are about 100 m away from the DAQ hardware and listen to them to check whether they are working and all the channels are lined up properly.

Thank you once again

Regards

Nitin
0 Kudos
Message 4 of 5
(2,519 Views)
No problem and happy LabVIEW programming!
 
- JLS
Best,
JLS
Sixclear
0 Kudos
Message 5 of 5
(2,504 Views)