Skip to content

Feature/audacity3 add truncate silence options - #9938

Merged
kryksyh merged 2 commits into
audacity:audacity3from
nosenfield:feature/audacity3-truncate-silence-options
Dec 30, 2025
Merged

kryksyh merged 2 commits into
audacity:audacity3from
nosenfield:feature/audacity3-truncate-silence-options

Conversation

@nosenfield

Copy link
Copy Markdown

Resolves: #4204

Adds options to control which silences are truncated based on location (beginning, middle, or end of track). This allows users to selectively remove silence without affecting intentional pauses.

Changes

  • Add mbTruncateStart, mbTruncateMiddle, mbTruncateEnd parameters to TruncSilenceBase
  • Register parameters in Parameters() method with true defaults (backward compatible)
  • Add "Truncate Location" UI section with checkboxes in TruncSilence.cpp
  • Modify DoRemoval to filter silences by location before processing
  • Add validation ensuring at least one option is selected
  • I signed CLA
  • The title of the pull request describes an issue it addresses
  • If changes are extensive, then there is a sequence of easily reviewable commits
  • Each commit's message describes its purpose and effects
  • There are no behavior changes unnecessary for the stated purpose of the PR

Recommended:

  • Each commit compiles and runs on my machine without known undesirable changes of behavior

QA:

  • Autobot test cases have been run

@kryksyh
kryksyh self-requested a review December 2, 2025 14:07
@kryksyh kryksyh linked an issue Dec 29, 2025 that may be closed by this pull request
Implement Feature 2: Truncate Silence Start/End Options (Issue audacity#4204)

- Add mbTruncateStart, mbTruncateMiddle, mbTruncateEnd parameters to base class
- Register new parameters in Parameters() method
- Initialize parameters to true by default (backward compatible)
- Add UI checkboxes for location options in effect dialog
- Update data transfer to sync checkbox values
- Modify DoRemoval algorithm to filter silences by location
- Add validation to ensure at least one location option is selected

Tasks: 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7
- Add DEF_BoundaryTolerance constant to replace magic number 0.001
- Add user-facing error message when no location options selected

Improves maintainability and UX.
@kryksyh
kryksyh force-pushed the feature/audacity3-truncate-silence-options branch from 8960535 to d4a74b6 Compare December 30, 2025 13:51
@kryksyh
kryksyh merged commit be3e0fa into audacity:audacity3 Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Truncate Silence: add option to truncate start/end only

2 participants