audacity / audacity

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

Playback Looping should avoid clicks if possible #1982

Closed Penikov closed 2 years ago

Penikov commented 3 years ago

This probably should be a logic to snap to zero-crossings, except in cases where there can be a reasonable assumption that the user doesn't want it to snap (ie sample-level zooms).

Original bug report follows


Describe the bug Click-like noises while the looping region is replaying.

To Reproduce Steps to reproduce the behaviour:

  1. Generate a chirp

  2. Select a new looping region like this: изображение

  3. Run playback looping

Expected behaviour The stream replays without additional click or noises.

Screenshots

https://user-images.githubusercontent.com/25851359/138094143-e93534bc-19e1-4c0b-8bda-f76f29154a2f.mp4

Additional information (please complete the following information):

Paul-Licameli commented 3 years ago

This may be not-a-bug.

You must choose a loop region bounded precisely at zero crossings (both upward or both downward), or you may get clicks. That's life.

Your selection seems to do that, but it's the play region, not the selection, that is looped.

Select > At Zero Crossings (Z key in default shortcuts) is meant to help fine adjustment of a selection. Then you can "Set Loop to Selection" with the context menu. Maybe there should be an enhancement request to make that procedure easier.

LWinterberg commented 2 years ago

such a workflow doesn't appear to be a thing for any other program, rather, snapping to a musical grid is expected. Given that loops in music are much more common than in freeform content, I don't think this needs to be investigated further.