Possible bug using Sample Data Import

OS: Windows 7 Professional (64 bit)
Audacity: 2.1.3

Hello,

I had a question regarding Audacity’s Sample Data Import feature.

When exporting the sample data for a stereo audio file:

…using Audacity’s Sample Data Export (Analyze → Sample Data Export…), with the following settings:

…results in a text file in the following format:

Importing the same text file back into Audacity using Sample Data Import (Generate → Sample Data Import…):

…results in the following error:

Question: Can I assume that the error is due to a bug on Audacity’s part (as it was Audacity that originally generated the sample data and generated a db value of [-inf])?

Note: I tried importing the text file with the Invalid data handling: drop-down set to Read as zero, but doing so resulted in the following corrupt waveform:

I also tried importing the same file via File → Import → Raw Data…

…but doing so resulted in the following corrupt audio signal:

Note: I tried all Byte order values, but none worked.

Lastly, I searched the Audacity manual:

http://manual.audacityteam.org/man/sample_data_import.html

…and forum and was only able to find the following relevant forum post:

https://forum.audacityteam.org/t/importing-data-from-file/46164/2

…but didn’t find anything that worked for me (I even tried including a ; after each and every line of my Audacity sample export data - pertaining to the header), but still nothing worked.

Any help would be greatly appreciated.

Thank you,
Nelson

1 Like

Note that your settings include the “standard header information”.


Note that your data begins with the standard header information:

Test1.txt 2 channels (stereo)
Left channel then right channel on same line.
Sample rate: 44100. Sample values on dB scale.
Length processed: 100000 samples 22.67574 seconds.

Note in particular the first word: “Test1.txt” (ok, so 2 words, but for the computer it is one ‘term’ because there are no spaces).


TEST1.TXT’ is not a numeric value.

It is complaining that the first ‘word’ (‘term’) in the file, which is the literal text “TEST1.TXT” is not a number.
To solve this, delete the non-numeric “header” text from the start of the Test1.txt file.
To prevent the issue from happening, set the “Include header information” setting in the exporter to “None”.

Hello Steve,

Unfortunately you’re mistaken (as I tried removing the header data before with no success).

Please see the following video:

Thank you,
Nelson

This is a different issue from the “‘TEST1.TXT’ is not a numeric value.” problem.

The problem now is that you are exporting “dB scale” (http://manual.audacityteam.org/man/sample_data_export.html#Measurement_scale), but Sample Data Import requires “Linear” values (http://manual.audacityteam.org/man/sample_data_import.html#Data_format)

1 Like