Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use highest sample rate in a track to determine export default #5032

Closed
SteveDaulton opened this issue Aug 14, 2023 · 6 comments · Fixed by #5616
Closed

Use highest sample rate in a track to determine export default #5032

SteveDaulton opened this issue Aug 14, 2023 · 6 comments · Fixed by #5616
Assignees
Labels
Enhancement Request Or feature requests. Open-ended requests are better suited for discussions. feature tweak small changes in functionality import-export

Comments

@SteveDaulton
Copy link
Member

SteveDaulton commented Aug 14, 2023

The default export rate offered in the export dialog should have the following properties:

  1. When the export dialog is summoned for the first time in a project, the sample rate of the highest sample rate track in the project is chosen (or the next best)
  2. After an export is made, the selected sample rate setting is remembered for this project's future export
original report

Your idea

To make it less cumbersome to choose an appropriate sample rate when exporting.

Problem to be solved

  1. Open an old Audacity project that has a lot of tracks.
  2. "File menu > Export Audio".
  3. Notice that a sample rate for the exported audio is set to whatever sample rate was used last.
  • If the selected sample rate is too low, then high frequency content will be lost.
  • If the selected sample rate is too high, then the exported file will be unnecessarily bloated.
  • For the exported file to sound the same as the project, the sample rate of the exported file must be the same or higher than the Project rate.
  • To avoid data loss, the exported sample rate must be at least as high as the highest track sample rate.
  1. Notice that although you can see the sample rate that will be used for the exported file, you can't see what the Project rate is, and you can only see the track sample rates for tracks that fit into the tracks window, and only if the tracks are sufficiently expanded (vertically) to see their sample rates.
  2. Close the Audio Export window.
  3. Check the Project rate and/or track sample rates as necessary.
  4. Reopen the Audio Export dialog and set the sample rate as required.

Even when you know that the sample rate in the export dialog may not be appropriate, it is still cumbersome to have to manually check the Project rate from "Audio Setup > Audio Settings" before exporting, just to be sure that the exported file will sound the same as the project.

Prior art

In older versions of Audacity, the Project Rate was visible in the main screen, and the exported file sample rate was automatically selected to have the same audio bandwidth as the project.

Additional context

Using the "last used" sample rate is not very useful. Maybe better to default to the Project rate, or to the highest track sample rate, or the higher of these two sample rates. This feature request is not intended to prescribe an optimal solution, but rather to raise the issue as something that would benefit from improvement.

@SteveDaulton SteveDaulton added the Enhancement Request Or feature requests. Open-ended requests are better suited for discussions. label Aug 14, 2023
@petersampsonaudacity
Copy link

petersampsonaudacity commented Aug 14, 2023

Even when you know that the sample rate in the export dialog may not be appropriate, it is still cumbersome to have to manually check the Project rate from "Audio Setup > Audio Settings" before exporting, just to be sure that the exported file will sound the same as the project.

But in 3.4.0 alpha the rate is now readily and easily set in the Export dialog, giving the user full control:
image

@LWinterberg
Copy link
Member

Checking the project rate prior to exporting is probably unhelpful, eg. if you previously had exported 8k and changed the project rate for it.

Defaulting to the highest track sample rate sounds very sensible though.

@petersampsonaudacity
Copy link

Defaulting to the highest track sample rate sounds very sensible though.

Yes, but that conflicts with "last-used" which a lot of folk seem to want - for example, this Forum poster from yesterday:
https://forum.audacityteam.org/t/permanent-settings-for-format-options/82046

@LWinterberg LWinterberg added the feature tweak small changes in functionality label Aug 25, 2023
@LWinterberg LWinterberg changed the title Selecting an appropriate Export sample rate Use highest sample rate in a track to determine export default Nov 6, 2023
@ianalarina ianalarina added this to the Audacity 3.4.1 milestone Nov 6, 2023
@crsib
Copy link
Contributor

crsib commented Nov 7, 2023

I agree with @petersampsonaudacity, I think this issue needs more work from the design team. Probably we should find a way to show a "preferred" sample rate for exporting

@LWinterberg
Copy link
Member

I'll do a better spec for this, but not this patch

@LWinterberg LWinterberg removed this from the Audacity 3.4.1 milestone Nov 7, 2023
@SteveDaulton
Copy link
Member Author

I think this proposal needs some modification now that Audacity has a sample rate option in the Export Dialog that has been decoupled from the Project Rate,

I still think that the default case should be the minimum sample rate that avoids data loss, but now that the export sample rate has an independent control in the export dialog, (decoupled from the Project Rate), users should have additional ways to override the default export rate.

I've not yet fully thought through the details, but my inclination right now is for the Export dialog to support "presets". Audacity could provide a few common case factory presets, plus user presets.

If a preset Export profile is selected, then that would override automatically defaulting as described in the original proposal.

Example Factory Presets:

  • CD audio: Rate=44.1kHz, Channels=stereo, Format=WAV 16-bit
  • Podcast audio: Rate=44.1kHz, Channels=mono, Format=MP3 Constant 128kbps
  • MP3 [high quality]: Rate=44.1kHz, Channels=Auto, Format=MP3 Preset Extreme
  • Last used: Retain the last used settings
  • Last used format [Auto]: Retain last used format, with Rate and channels auto-selected to match the project.

("Last used format [Auto]" may be a good out-of-the-box default).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Request Or feature requests. Open-ended requests are better suited for discussions. feature tweak small changes in functionality import-export
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants