Page 1 of 1

export waveform Amp vs. time to txt file

Posted: Fri Jun 25, 2010 5:58 pm
by mulliguns
How can i any way to export the waveform amplitude vs. time data of a recording to a txt file, in two columns? Something along the lines of how we can export the freq spectrum to a txt file would be helpful. Maybe the file would be unmanageably large, though.

Am I missing something?

Thanks!!

Re: export waveform Amp vs. time to txt file

Posted: Sat Jun 26, 2010 12:12 am
by Gale Andrews
mulliguns wrote:How can i any way to export the waveform amplitude vs. time data of a recording to a txt file, in two columns? Something along the lines of how we can export the freq spectrum to a txt file would be helpful. Maybe the file would be unmanageably large, though.
Audacity doesn't have that feature yet directly.

There is an experimental Nyquist plug-in here that will produce an HTML file containing amplitude data (-1 to +1) for the first 1000 samples in a selection (the time offset isn't produced). Don't push it any farther than at most a couple of thousand samples. To install new plug-ins, place them in the Plug-Ins folder inside the Audacity installation folder. On Windows computers, this is usually under "Program Files".

The only other solution I know of using Audacity is to choose (external program) in the Export File window, which is a command line interface. Put SOX in a "Lame For Audacity" folder in the operating system's "Program Files" directory (i.e. the default location for the LAME encoder Audacity uses). File > Export, then with (external program) selected, click "Options" and enter this:

sox -t wav - "%f"

Click OK then enter the file name required with a .dat extension in the export window and Save. That gives you a text file for each sample having a) the time since the beginning of the first sample and b) the sample value between 1 and -1. See the SOX documenrtation for other command line analysis possibilities.

Otherwise Wavosaur has a simple text data export feature like you are describing.


Gale