Automate Sample Data Export

Is it possible to automate the “Sample Data Export” feature of audacity (Steve Daulton) ?

I would like to automate the creation of an output file in a script.

I’ve searched the forum and do not see where this has been asked before.


Sample Data Export can be modified so that it is an “Effect” plug-in rather than an “Analyze” plug-in.
Nyquist “Effect” plug-ins can be used in “Chains”.

Edit Chains:
Apply Chain:

To convert Sample Data Export into an “Effect”, first you need to find the file “sample-data-export.ny” in the Audacity plug-ins folder (On Windows computers, the Audacity installation folder is usually under “Program Files” and the plug-ins folder is inside the Audacity installation folder).

Open sample-data-export.ny in a plain text editor (such as NotePad) - don’t use a word processor.
The first few lines are:

;nyquist plug-in
;version 3
;type analyze
;name "Sample Data Export..."

You need to change the line that says “;type analyze” to “;type process”

;nyquist plug-in
;version 3
;type process
;name "Sample Data Export..."

Then save the file and restart Audacity.

If you have done that correctly, Sample Data Export will now be in the Effect menu (below the divider) and will be available for use in Chains.

Thanks Steve. I will give this a shot.

Thanks again, this worked well ! I have two questions.

After each file in the folder is exported, i must click the [OK] button to proceed to the next file. Any way to automate or skip that?

Also, the value “-90.30900” occurs at least once in each second of audio in the data export. That measure appears to be erroneous. Just wondering if it is an error of some type.

I plan to ignore that value in the analysis.

Thanks again for such a great tool.


Have you tried the option “Show messages: None” ?

What makes you think that value is erroneous?

I will try that setting, thanks.

As for the -90~, it may be that I’m missing something. Mainly, it is this:

That exact number exists in every second of the sound file
It is surrounded by hundreds of average readings for the sound file (-40’s)
I cannot visualize the spike in the zoom feature of audacity
I cannot hear the spike (though, I suppose I don’t expect to at 8000 data points per second)

Thanks for your continued help and education.


-90.30900 dB is not a “spike”, it is a very low value, in fact it is (exactly) the lowest possible value for positive signed 16 bit data.

If you imagine the positive 16 bit values, counting from zero, decimal values are in round brackets “(” “)” and dB values are in square brackets “[” “]”

0000 0000 0000 0000 : (0) : [-infinity dB]
0000 0000 0000 0001 : (1) : [-90.30900 dB] this value
0000 0000 0000 0010 : (2) : [-84.2881 dB]
0000 0000 0000 0011 : (3) : [-80.7663 dB]
0000 0000 0000 0100 : (4) : [-78.2675 dB]

all the way up to
0111 1111 1111 1101 : (32765) : [-0.000530 dB]
0111 1111 1111 1110 : (32766) : [-0.000265 dB]
0111 1111 1111 1111 : (32767) : [0.000000 dB]

that is very helpful. Thanks so much.