audacity / audacity

Audio Editor
https://wiki.audacityteam.org/wiki/For_Developers
Other
12.59k stars 2.26k forks source link

New Project does not take its Project Rate from Quality Preferences #3017

Closed petersampsonaudacity closed 2 years ago

petersampsonaudacity commented 2 years ago

Describe the bug A New Project (Ctrl+N from an open project, not a fresh launch) does not take its Project Rate from Qualty Preferences as the Manual clearly states that it should:

Default Sample Rate: This sets the Sample Rate which will be used each time Audacity is launched and also when a new project window is opened.

So Audacity should change the Project rate and the rate of newly recorded tracks in the new project window.

It is only on launch that the Project Rate is set from the setting in Quality preferences for Defaul Sample Rate

Testing shows that this is a regression on 3.0.2

To Reproduce Steps to reproduce the behavior:

  1. purge the Audacity settings folder
  2. launch 3.2.0 alpha
  3. Edit > Preferences > Quality
  4. change the Default Sample Rate to be any non-default rate - i.e. not 44100 Hz
  5. Observe: Project Rate in the Selection Toolbar does not change - this is expected behavior
  6. Press Record
  7. Observe: new tcak is recored at the original (default 44100) Project Rate - this is expected behavior
  8. Press Stop
  9. Ctrl +N
  10. Observe: in the New Project the Project Rate in te Selection Toobar is the default 44100 and NOT the rate set at Step 4 in Quality Preferences

Actual behavior See above

Expected behavior As it states in the Manual the new project should take its rate from the setting in Quality Prefences for Default Sample Rate

Screenshots None

Additional information (please complete the following information):

Additional context An alternative solution would be to acceo this as "desired behavior" and change the Manual accordingly

petersampsonaudacity commented 2 years ago

Further testing shows that in a project (in this case the original project) any newly recorded track is recorded at whatever the user sets or changes their Project rate to be in the Selection Toolbar.

So whatever is in the Selection Toolbar for Project Rate at any time is independent of what the setting is in the Quality preferences. The Quality Preferences is only ever used at launch time to set the Project Rate (but should be used for a Ctrl+N new project, according to the Manual anyway).

I'm not convinced that this loose linkage is readily "discoverable" - it takes a careful RTFM to grasp this.

petersampsonaudacity commented 2 years ago

Note However that if the user makes a change to the Default Sample Format in Quality Prefences, then the next time they record a new track in the existing project the now, changed sample format, is used for the new track.

So in this case the change in prefs has an immediate ongoing effect - unlike it's close cousin Default Sample Rate

SteveDaulton commented 2 years ago

I think the behaviour described in the manual is correct and desirable. That is:

  1. The "Default Sample Rate" setting in Prefs should do exactly what it says and change the default (not the current Project rate or current track sample rates).
  2. The "Default Sample Rate" setting in Prefs should take effect straight away without requiring a restart. Any new project created should use the default sample rate (unless overridden by the "import file into empty project rule *1).
  3. The "Project Rate" selector at the bottom of the main Audacity window should affect the current project only.

*1 - When importing a file into an empty project, the file's sample rate overrides both the "Default Sample Rate" and the current "Project Rate". I've never liked this "special case" rule as I think it's (a) not really very useful (b) unexpected (c) can cause lower than expected sound quality if the user does not spot when Audacity silently changes the Project Rate to a lower value. However, this behaviour has been around for decades, so probably best to leave it as it has always been.

petersampsonaudacity commented 2 years ago

Testing on W11 with latest 3.2.0 alpha master audacity-win-3.2.0-alpha-20220606+d750329-x64-msvc2022

This now works fine in master