Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 554 - sample-data-export bug fixes and enhancements
sample-data-export bug fixes and enhancements
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Nyquist
2.0.2
PC All
: P4 Enhancement
Assigned To: Default Assignee for New Bugs
: nyquist, patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-16 14:57 UTC by Steve Daulton
Modified: 2018-08-20 11:45 UTC (History)
5 users (show)

See Also:
Steps To Reproduce:
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00


Attachments
bug fixes and enhancements as per description (27.00 KB, patch)
2012-07-16 14:57 UTC, Steve Daulton
Details | Diff
replacement sample-data-export.ny (17.68 KB, application/octet-stream)
2012-07-16 14:58 UTC, Steve Daulton
Details
User friendly output for minus infinity values on Windows (5.37 KB, patch)
2012-07-16 23:49 UTC, Steve Daulton
Details | Diff
Alternative patch against revision 11849 (5.38 KB, patch)
2012-07-17 13:00 UTC, Steve Daulton
Details | Diff
-infinity dB printed as [-inf] in all formats and platforms (11.28 KB, patch)
2012-07-18 17:53 UTC, Steve Daulton
Details | Diff
replacement sample-data-export.ny (18.51 KB, application/octet-stream)
2012-07-18 17:54 UTC, Steve Daulton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2012-07-16 14:57:13 UTC
Created attachment 292 [details]
bug fixes and enhancements as per description

Bug Fixes:

* Error messages now correctly suppressed when selected as such.

* Outputting html with a stereo file, the table headings are now in
the correct order.

* Channel layout information given after outputting an HTML file
corrected (removed).



New Feature (requested by Martyn Shaw)

* Option to output text data as:
1st left sample    1st right sample
2nd left sample   2nd right sample
3rd left sample   3rd right sample
....

This option is listed as "L-R on Same Line" in the "Channel layout for
stereo" options.



Other changes (requested by Martyn Shaw):

* .CSV layouts updated for improved functionality in spreadsheets
(should now work well in Open Office Calc, Gnumeric, MS Excell and
others).

* Minor improvements to code formatting.



Feature Removed:

* The Help files have now been removed.
Comment 1 Steve Daulton 2012-07-16 14:58:28 UTC
Created attachment 293 [details]
replacement sample-data-export.ny
Comment 2 Vaughan Johnson 2012-07-16 20:18:02 UTC
(In reply to comment #1)

Patch reviewed and committed (11849).
Comment 3 Gale Andrews 2012-07-16 21:06:24 UTC
Moved to DEVEL - FIX MADE, P4 Enhancement, patch_closed.
Comment 4 Vaughan Johnson 2012-07-16 21:58:49 UTC
(In reply to comment #3)

As the first sample, I can consistently get "-1.#INFO" if the whole track is selected. Is that valid?
Comment 5 Steve Daulton 2012-07-16 23:04:35 UTC
(In reply to comment #4)
I've checked on Windows: The number -INF is displayed as "-1.#INFO"

So if:
1) your selection starts at a zero crossing point
2) You are running on Windows
3) The sample values are being displayed in dB

Then yes, that is correct, or at least "normal for Windows".

I agree it looks weird so I'll make a patch to give a more user friendly display.

Could someone check to see if Mac OS X displays -INF dB in a reasonable way.
Comment 6 Steve Daulton 2012-07-16 23:49:51 UTC
Created attachment 294 [details]
User friendly output for minus infinity values on Windows

(In reply to comment #5)
Patch against revision 11849

Prints "-inf" for negative infinity on Windows.
Removes superfluous confirmation text when outputting HTML file.
Comment 7 Gale Andrews 2012-07-17 05:16:05 UTC
(In reply to comment #5)
> Could someone check to see if Mac OS X displays -INF dB in a reasonable way.
-inf (lower case) pre-patch on Mac. 

Post-patch I see -inf on Windows in TXT and HTML files, but in CSV (opened in MS Excel) I see "#NAME?" for infinity values (it was "-1.#INF0" pre-patch). So not marked "patch_ready".

Other points I happened to note:

* In indexed list txt files (in Notepad++) the first tab is only three characters so at sample #1000 and after, all the subsequent columns are out of line to right. I only tested that with L - R Same Line.

* With larger selections e.g 44100 samples stereo, the progress dialogue "appears" to be halted about 1/10th way through by the confirmation message, so some users may sit there thinking the progress is going to go further but in fact you have to OK the confirmation to proceed.
Comment 8 Steve Daulton 2012-07-17 13:00:37 UTC
Created attachment 295 [details]
Alternative patch against revision 11849

This patch shows the value negative infinity as "-inf" for .TXT or HTML format, and on Windows, leaves the value as "-1.#INF0" (Microsoft representation) for .CSV format.

Plain text does not support column layout. If pretty tabular layout is required, please use the HTML 5 format (does this need documenting in the manual?)


> * With larger selections e.g 44100 samples stereo, the progress dialogue
> "appears" to be halted about 1/10th way through by the confirmation message, so
> some users may sit there thinking the progress is going to go further but in
> fact you have to OK the confirmation to proceed.

Logged as bug 558
Comment 9 Gale Andrews 2012-07-17 15:36:25 UTC
(In reply to comment #8)
> This patch shows the value negative infinity as "-inf" for .TXT or HTML 
> format, and on Windows, leaves the value as "-1.#INF0" (Microsoft 
> representation) for .CSV format.
> Is that the solution that you want? If not, please define what behaviour 
> you would prefer.
As a non-user of spreadsheets and a hater of suites like OpenOffice org, I merely use Excel when I have to. Clearly "#NAME?" is unacceptable in a mainstream spreadsheet app. Maybe it requires specifying some text that "suggests" infinity, like "-infin" (or U+221E if Unicode works)? If you point me to the code to fiddle with I can try some things out. 


> Plain text does not support column layout. If pretty tabular layout is 
> required please use the HTML 5 format (does this need documenting in the 
> manual?)
I didn't know if there was some way to force a minimum number of characters per tab. It is perhaps not unreasonable for a text editor to allow less characters before the first tab, so yes I think you might mention in the Manual that text output may display arbitrarily.  


> Are you saying that you want .RTF format or some other format that supports
> formatting? 
Personally RTF would be my format of choice by a wide margin. Flexible and nice to look at, don't need to open the web browser, and it would cope better than HTML or text for large numbers of samples (if Firefox is anything to go by).
Comment 10 Vaughan Johnson 2012-07-17 22:31:24 UTC
(In reply to comment #9)

> --- Comment #9 from Gale Andrews <gale@audacityteam.org> 2012-07-17 20:36:25 BST ---
>[...] 
>> Are you saying that you want .RTF format or some other format that supports
>> formatting? 
> Personally RTF would be my format of choice by a wide margin. Flexible and nice
> to look at, don't need to open the web browser, and it would cope better than
> HTML or text for large numbers of samples (if Firefox is anything to go by).
> 

This is about data, not presenting for human readability. Right? Keep It Simple. Text is plenty, HTML is a feature, XML would be icing on the cake. RTF is pointless -- .txt is very readable in the few cases it matters, with about 3 key strokes.

Let's work on closing this bug, not adding enhancements to it, please.
Comment 11 Steve Daulton 2012-07-18 11:22:42 UTC
Comment on attachment 294 [details]
User friendly output for minus infinity values on Windows

Excel does not display the text "-inf" correctly, so sample-data-export-inf.patch marked obsolete in favour of sample-data-export-inf2.patch
Comment 12 Gale Andrews 2012-07-18 13:54:12 UTC
(In reply to comment #10)
> RTF is pointless
RTF has already been ruled out for practical reasons, but yes this is partly about readability and presentability (or we would not have HTML output) and partly about actually opening the largest files that Sample Data Export writes. Text and HTML files of maximum size produced simply won't open in many native applications for those formats. The point about large RTF files was that they would open in native applications.
Comment 13 Steve Daulton 2012-07-18 17:53:49 UTC
Created attachment 298 [details]
-infinity dB printed as [-inf] in all formats and platforms

Display of negative infinity (dB level of silence) is consistently printed as [-inf]

.CSV format successfully tested on Gnumeric, Oo Calc and MS Excel.
Comment 14 Steve Daulton 2012-07-18 17:54:38 UTC
Created attachment 299 [details]
replacement sample-data-export.ny
Comment 15 Vaughan Johnson 2012-07-18 19:14:22 UTC
(In reply to comment #14)

Committed new version. Revision: 11853
Comment 16 Gale Andrews 2012-07-19 02:17:10 UTC
Thanks, Steve. Tested [-inf] OK for all formats on Windows, Mac (CSV in "Apache Open Office incubated" and XCode) and Linux (HTML in Rekonq and Midori).

So RESOLVED - FIXED.