Maker Pro
Maker Pro

Convert CSV to Wav

KeepingItReal

Mar 23, 2018
2
Joined
Mar 23, 2018
Messages
2
Greetings,

I was brought to this website by an archived thread titled "Convert CSV to WAV" from the ancient time of 2013. I was trying to do much the same thing as the Guest who started that thread. As I am unable to reply to that thread (due to its archived nature) I wanted to post something here for the next weary traveler seeking to convert csv to wav.

I have found that this can be done successfully with an open-source audio tool called "Audacity".

You'll need to normalize your csv data to within +/- 1 as Audacity treats this as full scale. You'll also need to export your csv to a tab-delimited *.txt file. Other than that, it's pretty straight forward. From the Audacity toolbar select Generate>Sample Data Import...

You'll specify the name of the txt file that you saved (make sure to save your text file at <root>/Users/[user name] as this is where Audacity looks by default as the "home" location. Click "OK".

I've only brought in Mono audio this way, but Audacity's manual indicates that with the right specification in your data file, you can import Stereo as well. Anyway, have fun.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
I've only brought in Mono audio this way, but Audacity's manual indicates that with the right specification in your data file, you can import Stereo as well.
Nice tip :)
You can also import stereo from two mono CSV files and merge them to stereo within audacity.
 

KeepingItReal

Mar 23, 2018
2
Joined
Mar 23, 2018
Messages
2
Harald, yes, you are right.

One more note: I realized after posting that I forgot an important step - which is actually exporting the file read in by Audacity to a WAV file :). This is kind of an obvious last step, but without it you haven't actually converted csv to wav.
 

FuZZ1L0G1C

Mar 25, 2014
366
Joined
Mar 25, 2014
Messages
366
Nice one.
In the past I tried creating 8-bit RAW data patterns using a hex-editor (Hexcalibur), but very time-consuming.
Several CSV attempts were done using bytes 20H to 7EH, excluding field-separator 2CH (comma) and other symbols such as + @ and / .
The RAW imported data was then normalized to create a simple (brief) waveform.
Will try your method.. Tx.
 
Top