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

User presets for generators do not save and restore duration #2848

Open
Paul-Licameli opened this issue Apr 20, 2022 · 9 comments
Open

User presets for generators do not save and restore duration #2848

Paul-Licameli opened this issue Apr 20, 2022 · 9 comments
Labels
Task Tasks for the team, typically in conjunction with sprints and projects

Comments

@Paul-Licameli
Copy link
Member

Paul-Licameli commented Apr 20, 2022

@petersampsonaudacity wrote:

@Paul-Licameli @LWinterberg @dozzzzer Further testing on 3.1.3 shows that for all the other generators (Chirp,Noise, Silence, Tone, Pluck and Rhythm Track) the Duration is stored as part of a user preset and is properly restored when that preset is invoked.

Thus it is only DTMF that fails to store the duration - and thus this inconsistency really should be fixed. Do we need a new separate issue logged for this.

I find you are incorrect about the behavior of 3.1.3. Exactly what I did with that version (which is following Pietro's steps):

  • delete pluginsettings.cfg
  • start Audacity
  • open the Silence dialog (duration is its only control)
  • Enter 10 in the control, Manage > Save Preset... , enter "ten", OK
  • Enter 20 in the control, Manage > Save Preset... , enter "twenty", OK
  • Manage > UserPresets > ten

Expected: control changes its value to 10
Observed: no change

  • (Alternatively: reset to factory defaults, or Import effect settings that were previously Exported, also make no change when you expect they should)

So this problem with durations not saved in presets is a real problem, but not a regression in this development cycle. I think it is an old problem never noticed before.

Originally posted by @Paul-Licameli in #2822 (comment)

@DavidBailes
Copy link
Collaborator

DavidBailes commented Apr 21, 2022

There may have been a reason why duration wasn't included in the presets. When using a generator to replace a selected region, you wouldn't want the duration to be changed when you chose a preset. See:
https://manual.audacityteam.org/man/generate_menu.html#Duration

@petersampsonaudacity
Copy link

petersampsonaudacity commented Apr 21, 2022

There may have been a reason why duration wasn't included in the presets. When using a generator to replace a selected region, you wouldn't want the duration to be changed when you chose a preset.

A very good point @DavidBailes

@Paul-Licameli
Copy link
Member Author

Paul-Licameli commented Apr 21, 2022

So there may be work to specify reasonable correct behavior.

If Silence has nothing but duration for its settings, and that should not be part of presets, then maybe it's silly to allow doing that in the Silence dialog.

But maybe duration as part of presets does make sense when selection has zero duration.

@SteveDaulton
Copy link
Member

SteveDaulton commented Apr 21, 2022

So there may be work to specify reasonable correct behavior.

I thought the duration for generators was specified:

  1. When there is a selection, the duration defaults to the length of the selection.
  2. When there is not a selection, the duration defaults to the last used duration.
  3. When there is no selection and no last used duration, the duration defaults to 30 seconds.

@Paul-Licameli
Copy link
Member Author

Paul-Licameli commented Apr 21, 2022

So there may be work to specify reasonable correct behavior.

I thought the duration for generators was specified:

  1. When there is a selection, the duration defaults to the length of the selection.
  2. When there is not a selection, the duration defaults to the last used duration.
  3. When there is no selection and no last used duration, the duration defaults to 30 seconds.

Yes it behaves like that now, but some generators have a control that you can adjust, which is not saved and restored as part of a user preset. Should it be? If still no, then this is a nonissue.

@SteveDaulton
Copy link
Member

SteveDaulton commented Apr 21, 2022

but some generators have a control that you can adjust, which is not saved and restored as part of a user preset.

Nyquist generators are a bit different because of GUI limitations, but I don't think that any of the built-in generators save the duration in presets (do they?). When testing, take care to ensure that there isn't a temporal selection.

@Paul-Licameli
Copy link
Member Author

Paul-Licameli commented Apr 21, 2022

but some generators have a control that you can adjust, which is not saved and restored as part of a user preset.

Nyquist generators are a bit different because of GUI limitations, but I don't think that any of the built-in generators save the duration in presets (do they?). When testing, take care to ensure that there isn't a temporal selection.

Peter said they were saved and 3.2 regressed, but I retested and see it’s not a regression in fact.

@petersampsonaudacity
Copy link

petersampsonaudacity commented Apr 22, 2022

Peter said they were saved and 3.2 regressed, but I retested and see it’s not a regression in fact.

Sorry for starting this un-necessary hare running (I totally forgot the behavior protocols for generators that @SteveDaulton has helpfully reminded us of).

For reference, the trhread I made this mistake in was:
Wrong switching of user presets in DTMF generator and Echo effect #2822

Generate Silence is an oddity with regard to saving presets

BTW Silence is an odd one her as it enables user presets to be Saved and retrieved - but since the only datum it has is the duration, and that is not saved, thus any saved preset for Silence is specious.

@SteveDaulton
Copy link
Member

SteveDaulton commented Apr 22, 2022

If still no, then this is a nonissue.

I think that this is a non-issue as it stands (and so can be closed), but it has raised some related issues:

  1. Is the current specification optimal, or would it be better if duration was saved in presets?
  • Note that such a change would break compatibility with existing macros
  • Even if saved, I think we would definitely still want: "When there is a selection, the duration defaults to the length of the selection".
  1. If the current specification is retained, then ideally, saving presets for Generate Silence should be disabled (there's nothing to save).
  2. If possible, it would be nice if Nyquist plug-ins could have a duration control that behaves the same way as built-in plug-ins. Perhaps this could be done with the addition of a new ;duration widget.

Personally, I'm happy for this to be left as it is. If changed, then I would see some benefit in the saved duration overriding the "default". Thus:

  1. When there is a selection, the duration defaults to the length of the selection.
  2. When there is not a selection, the duration defaults to the saved value.
  3. When there is no selection and no last used duration, the duration defaults to the saved value.

By overriding only the default, it is unlikely to break existing macros.

@LWinterberg LWinterberg added the Task Tasks for the team, typically in conjunction with sprints and projects label Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Tasks for the team, typically in conjunction with sprints and projects
Projects
None yet
Development

No branches or pull requests

5 participants