Saving (exporting) to non-Wav is needlessly tedious

Help for Audacity 2.x.x on Windows.
Forum rules
ImageThis forum is for Audacity 2.x.x on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
tcmullet
Posts: 41
Joined: Tue Aug 28, 2018 5:02 pm
Operating System: Windows 10

Re: Saving (exporting) to non-Wav is needlessly tedious

Post by tcmullet » Sun Dec 09, 2018 10:16 pm

Actually, I just googled the issue and it says NOT to simply change that Projected Rate, which is only for playback. It said to find "Resample" under "Tracks".

steve
Site Admin
Posts: 49424
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Saving (exporting) to non-Wav is needlessly tedious

Post by steve » Sun Dec 09, 2018 11:09 pm

tcmullet wrote:
Sun Dec 09, 2018 10:16 pm
I just googled the issue and it says
I'm betting that "it" is not the documentation:
"Changing the project rate in Selection Toolbar immediately changes the sample rate at which new tracks will be recorded or generated in the current project, and at which existing tracks will be played, rendered or exported."
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

tcmullet
Posts: 41
Joined: Tue Aug 28, 2018 5:02 pm
Operating System: Windows 10

Re: Saving (exporting) to non-Wav is needlessly tedious

Post by tcmullet » Mon Dec 10, 2018 2:01 am

How would you reconcile that with what is here (esp. the parenthetical):

http://www.dynamicsoflanguage.edu.au/re ... -audacity/

"The project sampling rate is located in the lower left-hand corner (Project Rate (Hz)). To change the rate of your file, you need to select the Tracks menu and scroll down to Resample… (If you were to change the rate by altering the project sampling rate below, it would merely change the rate Audacity plays the file, not the file’s actual sample rate)."

steve
Site Admin
Posts: 49424
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Saving (exporting) to non-Wav is needlessly tedious

Post by steve » Mon Dec 10, 2018 10:46 am

tcmullet wrote:
Mon Dec 10, 2018 2:01 am
How would you reconcile that with what is here
I would say they are wrong on many counts.

1) "we request that you record your audio at the highest sampling rate and bitrate possible"
That is not good advice, and certainly not "best practice". Very high sample rates are more likely to reduce the sound quality than improve it (for normal audio). There's an excellent article for background information here: https://people.xiph.org/~xiphmont/demo/neil-young.html
The recommended "bit format" for recording with Audacity is 32-bit float (which is the default).

2) "The rate of your file is located in the grey area to the left of the waveform"
No, that is the sample rate of the "track". The track sample rate is often the same as the sample rate of the imported file, but it can be different.
A "track" is not a "file".

3) "To change the rate of your file, you need to select the Tracks menu and scroll down to Resample… "
That changes the sample rate of the track. It does not change the sample rate of any files.
A "track" is not a "file".

4) "If you were to change the rate by altering the project sampling rate below, it would merely change the rate Audacity plays the file, not the file’s actual sample rate"
Yes, it does change the rate that Audacity plays the file, but it also changes the "default" rate for the current project, which in turn affects the sample rate when recording, generating, mixing and exporting.

5) "Once your file has been down-sampled, you need to change the project’s sampling rate, otherwise you get an error message that the two rates do not match."
On most setups it is perfectly possible to have tracks that have different sample rates to the project. The "problem" referred to here is known to happen on a few machines, and is probably due to buggy sound card drivers, but this is NOT the usual case.

6) Now that you have changed the sampling rate, the next step is to change the 24 bit rate to a lower rate.
This is nonsense. "24-bit" is the "bit format" ("sample format") and is not a "rate". The "bit format" is the manner in which each sample value is represented. The "sample rate" is the number of samples per second. They are different things.

7)go to the drop down menu within the track window, go to Set Sample Format and select 16-bit float
No, don't do this. This is bad advice. There is absolutely no benefit in doing this, and it can reduce the sound quality, or even cause irreparable damage.

8)Under the File menu, select Export audio…
In the current version of Audacity, the menu for exporting a WAV file is: "File > Export > Export as WAV"
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Edgar
Forum Crew
Posts: 1521
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 7

Re: Saving (exporting) to non-Wav is needlessly tedious

Post by Edgar » Mon Dec 10, 2018 4:57 pm

Addressing the "All Files" entry in the Types drop-down is trivial. This is one of the first things I changed in my personal version of Audacity 2.0.6. I would bet that the code is available here on the forum but it is a simple matter of adding an extra entry to the drop down (I use the menu item name "All Files") and giving it the appropriate wildcard. (I've also re-spelled some of the menu item names so that they all start with a unique first letter and thus are easier to access via script or vocally.)
Attachments
all files.png
all files.png (257.81 KiB) Viewed 54 times
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

tcmullet
Posts: 41
Joined: Tue Aug 28, 2018 5:02 pm
Operating System: Windows 10

Re: Saving (exporting) to non-Wav is needlessly tedious

Post by tcmullet » Mon Dec 10, 2018 7:45 pm

Edgar,

> it is a simple matter of adding an extra entry to the drop down

Exactly where do you do this?

Edgar
Forum Crew
Posts: 1521
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 7

Re: Saving (exporting) to non-Wav is needlessly tedious

Post by Edgar » Mon Dec 10, 2018 8:22 pm

tcmullet wrote:
Mon Dec 10, 2018 7:45 pm
> it is a simple matter of adding an extra entry to the drop down
Exactly where do you do this?
It's been years since I did this, but…

Code: Select all

Find all "*.*", Subfolders, Find Results 1, Entire Solution, "*.cpp"
  D:\mine\src\LabelDialog.cpp(542):                    _("Text files (*.txt)|*.txt|All files (*.*)|*.*"),
  D:\mine\src\LabelDialog.cpp(602):                    _("Text files (*.txt)|*.txt|All files (*.*)|*.*"),
  D:\mine\src\Menus.cpp(4764):                    _("Text files (*.txt)|*.txt|All files (*.*)|*.*"),
  D:\mine\src\Menus.cpp(4805):                                    _("MIDI and Allegro files (*.mid;*.midi;*.gro)|*.mid;*.midi;*.gro|MIDI files (*.mid;*.midi)|*.mid;*.midi|Allegro files (*.gro)|*.gro|All files (*.*)|*.*"),
  D:\mine\src\UploadDialog.cpp(340):                    wxT("All files (*.*)|*.*"),
  D:\mine\src\UploadDialog.cpp(1196):                      wxT("All files (*.*)|*.*"), wxFD_SAVE | wxRESIZE_BORDER);
  D:\mine\src\UploadDialog.cpp(1223):        FileDialog saveFile(this, wxT("Download File"), wxT(""), src, wxT("All files (*.*)|*.*"), wxFD_SAVE | wxRESIZE_BORDER);
  D:\mine\src\export\ExportFFmpegDialogs.cpp(1720):                  wxString(_("XML files (*.xml)|*.xml|All files (*.*)|*.*")),
  D:\mine\src\export\ExportFFmpegDialogs.cpp(1740):                  wxString(_("XML files (*.xml)|*.xml|All files (*.*)|*.*")),
  D:\mine\src\export\ExportMP3.cpp(1231):   return _("Only lame_enc.dll|lame_enc.dll|Dynamically Linked Libraries (*.dll)|*.dll|All Files (*.*)|*");
  D:\mine\src\prefs\KeyConfigPrefs.cpp(332):                       _("XML files (*.xml)|*.xml|All files (*.*)|*.*"),
  D:\mine\src\prefs\KeyConfigPrefs.cpp(363):                       _("XML files (*.xml)|*.xml|All files (*.*)|*.*"),
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(730):      filterBuffer += (gs_customFilter ? wxT("*.*") : m_FilterGroups[i]);
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1109):      pExtensions.Add(wxT("*.*"));
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1148):      pExtensions.Add(wxT("*.*"));
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1175):      pExtensions.Add(wxT("*.*"));
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1211):      pExtensions.Add(wxT("*.*"));
  Matching lines: 17    Matching files: 7    Total files searched: 340

Code: Select all

Find all "All Files", Whole word, Subfolders, Find Results 1, Entire Solution, "*.cpp"
  D:\mine\src\BatchProcessDialog.cpp(234):   wxString mask = _("All files|*|All supported files|") +
  D:\mine\src\Dependencies.cpp(293):   EVT_BUTTON(wxID_YES, DependencyDialog::OnYes) // "Copy All Files (Safer)"
  D:\mine\src\Dependencies.cpp(368):            S.Id(wxID_YES).AddButton(_("Copy All Files (Safer)"));
  D:\mine\src\Dependencies.cpp(382):            choices.Add(_("Always copy all files (safest)"));
  D:\mine\src\DirManager.cpp(148):                                  wxArrayString& filePathArray,  // output: all files in dirPath tree
  D:\mine\src\DirManager.cpp(200):                                             wxArrayString& filePathArray, // output: all files in dirPath tree
  D:\mine\src\DirManager.cpp(439):   /* Move all files into this new directory.  Files which are
  D:\mine\src\DirManager.cpp(1387):      filePathArray,          // output: all files in project directory tree
  D:\mine\src\DirManager.cpp(1748):      const wxArrayString& filePathArray,       // input: all files in project directory
  D:\mine\src\DirManager.cpp(1790):      filePathArray,          // output: all files in project directory tree
  D:\mine\src\DirManager.cpp(1798):            filePathArray,          // input: all files in project directory tree
  D:\mine\src\LabelDialog.cpp(542):                    _("Text files (*.txt)|*.txt|All files (*.*)|*.*"),
  D:\mine\src\LabelDialog.cpp(602):                    _("Text files (*.txt)|*.txt|All files (*.*)|*.*"),
  D:\mine\src\Menus.cpp(4764):                    _("Text files (*.txt)|*.txt|All files (*.*)|*.*"),
  D:\mine\src\Menus.cpp(4805):                                    _("MIDI and Allegro files (*.mid;*.midi;*.gro)|*.mid;*.midi;*.gro|MIDI files (*.mid;*.midi)|*.mid;*.midi|Allegro files (*.gro)|*.gro|All files (*.*)|*.*"),
  D:\mine\src\Menus.cpp(4840):                    _("All files (*)|*"),
  D:\mine\src\Project.cpp(2214):   wxString mask = _("All files|*|All supported files|") +
  D:\mine\src\UploadDialog.cpp(340):                    wxT("All files (*.*)|*.*"),
  D:\mine\src\UploadDialog.cpp(1196):                      wxT("All files (*.*)|*.*"), wxFD_SAVE | wxRESIZE_BORDER);
  D:\mine\src\UploadDialog.cpp(1223):        FileDialog saveFile(this, wxT("Download File"), wxT(""), src, wxT("All files (*.*)|*.*"), wxFD_SAVE | wxRESIZE_BORDER);
  D:\mine\src\export\ExportFFmpegDialogs.cpp(1720):                  wxString(_("XML files (*.xml)|*.xml|All files (*.*)|*.*")),
  D:\mine\src\export\ExportFFmpegDialogs.cpp(1740):                  wxString(_("XML files (*.xml)|*.xml|All files (*.*)|*.*")),
  D:\mine\src\export\ExportMP3.cpp(1231):   return _("Only lame_enc.dll|lame_enc.dll|Dynamically Linked Libraries (*.dll)|*.dll|All Files (*.*)|*");
  D:\mine\src\export\ExportMP3.cpp(1249):   return wxString(_("Only libmp3lame.dylib|libmp3lame.dylib|Dynamic Libraries (*.dylib)|*.dylib|All Files (*)|*"));
  D:\mine\src\export\ExportMP3.cpp(1267):   return wxString(_("Only libmp3lame.so.0|libmp3lame.so.0|Primary Shared Object files (*.so)|*.so|Extended Libraries (*.so*)|*.so*|All Files (*)|*"));
  D:\mine\src\import\ImportLOF.cpp(255):   // set any duration/offset factors for last window, as all files were called
  D:\mine\src\import\ImportLOF.cpp(300):      // set any duration/offset factors for last window, as all files were called
  D:\mine\src\prefs\KeyConfigPrefs.cpp(332):                       _("XML files (*.xml)|*.xml|All files (*.*)|*.*"),
  D:\mine\src\prefs\KeyConfigPrefs.cpp(363):                       _("XML files (*.xml)|*.xml|All files (*.*)|*.*"),
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1108):      pDescriptions.Add(_("All files"));
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1123):      wxString temp(_("All files"));
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1147):      pDescriptions.Add(_("All files"));
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1174):      pDescriptions.Add(_("All files"));
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1210):      pDescriptions.Add(_("All files"));
  D:\mine\lib-src\FileDialog\FileDialog.cpp(99):   // if filter is of form "All files (*)|*|..." set correct filter index
  Matching lines: 35    Matching files: 13    Total files searched: 340
Remember, I'm using Audacity 2.0.6 which is years out of date. The code-base has changed but the general are of interest is probably around:

Code: Select all

  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1108):      pDescriptions.Add(_("All files"));
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1123):      wxString temp(_("All files"));
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1147):      pDescriptions.Add(_("All files"));
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1174):      pDescriptions.Add(_("All files"));
  D:\mine\lib-src\FileDialog\win\FileDialogPrivate.cpp(1210):      pDescriptions.Add(_("All files"));
  D:\mine\lib-src\FileDialog\FileDialog.cpp(99):   // if filter is of form "All files (*)|*|..." set correct filter index
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

tcmullet
Posts: 41
Joined: Tue Aug 28, 2018 5:02 pm
Operating System: Windows 10

Re: Saving (exporting) to non-Wav is needlessly tedious

Post by tcmullet » Fri Dec 14, 2018 2:27 pm

Well, thank you, Edgar. You gave a bigger answer than I needed. From the "ccp" reference I see that the real answer is "You can't change it in Audacity preferences. You have to create a PROGRAMMING environment, get the C source code for Audacity, make custom changes and RECOMPILE your own custom version."

And so the answer to my question is, "short of that, you cannot add an entry to the dropdown". Thanks for the explanation, though.

tcmullet
Posts: 41
Joined: Tue Aug 28, 2018 5:02 pm
Operating System: Windows 10

Re: Saving (exporting) to non-Wav is needlessly tedious

Post by tcmullet » Fri Dec 14, 2018 2:30 pm

Steve, thanks for setting me straight. I've looked further into resampling options (outside Audacity). It appears that Audacity is my best option for getting the best possible resampling quality. As I study the docs more, I think I am concluding that I don't have to consider Dithering options because it appears that dithering is only used with converting from one bit-depth to another, NOT when changing sample rate within the same bit-depth. Am I right??

steve
Site Admin
Posts: 49424
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Saving (exporting) to non-Wav is needlessly tedious

Post by steve » Fri Dec 14, 2018 2:49 pm

tcmullet wrote:
Fri Dec 14, 2018 2:30 pm
it appears that dithering is only used with converting from one bit-depth to another, NOT when changing sample rate within the same bit-depth. Am I right??
Not quite. (This is something that I'd like to improve in Audacity, but to do it right is a very big job.)

Dither is only "required" when changing from a higher bit-depth to a lower bit-depth (bit format), but exporting the final "render to file" is always handled with 32-bit float precision. This is perfect if applying envelopes / gain / pan / normalization / or any effects, or mixing more than one track, as it provides the highest quality (with dither).

However, when exporting only one track, AND no effects have been applied, AND the original bit format was 16-bit, AND no envelopes, pan or gain changes have been applied, then it is (very slightly) better to turn off dither (even if changing the sample rate). If you leave dither enabled or not, you will probably not hear the difference, but "ideally" dither should be off in this "special" case, and enabled ("shaped") for all other cases.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply