• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Text data to wav file

Qacer

Platinum Member
Hi there,

I converted an oscilloscope data to a text file. The data is just a 1kHz sine wave and the text format is in CSV with time in the first column and the amplitude data in the second column.

How can I translate this data file into a 1kHz wav file?

I tried a program called csv2wav, but I only get clicking sounds. I also tried finding a Matlab solution, but I haven't found one, yet.

Any tips?

Thanks!
 
Originally posted by: Special K
Did you try using the MATLAB functions sound or wavplay?

Ditto. In Matlab, you should just be able to load up the data from the .txt file using "load" and then create a matrix of just the second column of amplitudes. You pass into Matlab's sound functions the sampling frequency so you do not need the time info. If you did not have a constant sampling frequency then I'm not sure you can play it without having to interpolate it onto a constant sampling rate.
 
Back
Top