From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
11-26-2008 01:56 PM
Hi everyone,
My problem involves just writing a simple wav file that takes in 4 waveforms and puts it into an array for the wav. I have used this: http://cnx.org/content/m14771/latest/ as a reference, but obviously I am missing something because once I finish the DAQ, my wav file has nothing inside. I was also recording binary files at the same time and their files had data in them. Attached is the part of the wav collection. I don't need the wav file to be able to play on Windows Media Player. I just need it to be readable in matlab. I tried changing the bits per sample to 16 as well, but the same results show up. (Nothing! 😞 ) dt is 1/sampling frequency. Inputs are normalized before becoming a waveform. Does anyone know what the problem is?
Thanks. I really appreciate it.
Jud~
11-26-2008 05:03 PM
11-26-2008 06:59 PM
12-10-2008 02:31 PM
Hi Dennis,
Thank you for your reply. I did just that: put indicators everywhere and compared both the waveform output and the array output. They are exactly the same through data acquisition. I did make a slight change to the sampling rate and it now writes a wav file. One step closer! I did notice that when writing the wav files, the file size kept on cycling.. from 1 to #kb and then back to 1 then repeat. The end result is a much smaller size than the binary files I am comparing the output with. Would anyone happen to know what is going on during this write??
Ideas are much appreciated! Thanks,
Jud~
12-10-2008 02:33 PM
12-10-2008 02:39 PM
12-10-2008 03:00 PM
Hi Dennis,
The attached pictures were just to show a general idea of what I did. Sorry for not being specific, but I took a snapshot of them after booting up LabVIEW prior to data acquisition, so there is nothing there. However, I have visually expected that these arrays have the data that I want in them. The wave write function now outputs something.. but as I said previously, the size is not correct for some reason. It looks like there is some sort of buffer the rewrites data if that is even possible. The only factor I can think of is the dt factor of creating a waveform, which I put 1/sampling frequency. Number of bits, be 16, 24, or 32, shouldnt matter... Is there something I am missing?
Thanks,
Jud~
12-10-2008 03:20 PM
12-12-2008 05:37 PM
Here is a .vi of an example I found online.. Only stereo (2 channels), but I still get the same output: zero.. Does it work for anybody else?
Sorry, I am reluctant to show the file for personal reasons on the web. Hope the example helps....
12-12-2008 05:38 PM