Importing raw float waveforms

Hello people!

I am working on a heavy DSP project. Hundreds of times a day my code spits out a dump of raw 64-bit floats, and I move over to audacity and import this dump to view the waveform.

Problem is every time I do it audacity seems to guess at the format and get it wrong. So I have to fiddle the settings ( 64-bit, little endian, 1 channel ) each time I do the import. Selecting three items from pulldown menus doesn’t seem like a big deal, but I am doing this so often that it would be well worth my while automating this.

Is there some way I can prepare the raw file so that audacity correctly identifies the settings?

Also I frequently want to import several files at once. It seems I cannot simultaneously import more than one file from audacity’s UI. Is there anyway I can automate this from the command line?


I figured out a pretty elegant solution which is to encode my own WAV files

This code gave me everything I needed – although for iOS the actual encoding is plain C so it was pretty easy to lift

This may be superfluous as you have found a solution, but a couple of other options:

You could add a RIFF Header to the data:

Alternatively you could use SoX which is a command line audio tool. With SoX you can include the bit format as an argument. You can also use it to concatenate audio files.