Bugzilla – Bug 1763
Enh: Clicks on starting/stopping playback.
Last modified: 2019-08-10 15:25:13 UTC
Audacity sounds way less professional than it should, because of clicks on starting/stopping playback. There are believed to be two contributing factors: - Staring and stopping the audio engine causes clicks, even on silence. This would be fixed by addressing Bug 276. - Transition from a non zero to zero samples or vice-versa typically causes a click. Professional software will for example micro-fade out instead.
WORKSFORME Testing with RC1 on W10 Home and macOS 10.13 High Sierra both with music and silence I get no such clicks on starting and stopping playback Nor do I get such clicks on either platform in 2.1.3
I concur with Peter's results after testing on Sierra 10.12. Starting and stopping play on silence and audio gives no audible clicks on RC1 or 2.1.3. Generated a track with silence before and after a recording and no click during play heard when transitioning between silence and sound in either order.
Try it with DTMF and 0.1 amplitude. I think you are not listening right, in that you are so used to the click you ignore it. If it helps I can produce a sample that has micro fade in and out (about 100 samples = 2ms) so you can listen to how it should sound to compare. Completely smooth start and stop, and no click on looping. I do agree that the clicks on start/stop on silence mentioned in comment 0 are not found on Windows.
(In reply to James Crook from comment #3) Ok on my Mac using "with DTMF and 0.1 amplitude" stereo 30 seconds of tone - listening very carefully in my Sennheiser HD-25 cans at the 0.1 amplitude I hear a) no clicks on the entry to individual tones b) the occasional click or clunk when transitioning from tone to silence I then amplify to maximum and repeat the listening c) no clicks on the entry to individual tones d) still the occasiona click or clunk when transitioning from tone to silence - but more obviously now (as it's much louder). The most obvious click/clunk comes at the end of the second and tghird tones in the sequence - so the audible effect seems to depend on the pitch somewhat. I am worried at the thought of artificially manipulating the playback - I tend to think the user should be listening to what they are going to get as output when they export say - not a smoothed-out transition to make Audacity sound better. So I tried e) Exporting the amplified tone to 16-bit PCM stereo WAV and then listening to the result with Quicktime I still hear the clicks especially after the second and third tones as in d) above. From which I deduce that is what the actual sound is. You do, I agree, have the chance to effect a microfade in the Audacity project itself rather than a microfade on just playback - but then you are manipulating the user's audio (possibly without their knowledge or consent).
Re comment 4.... You are not following the steps to reproduce! Please read them. Play a selection that is entirely within one tone. For loudest click, select from a highest peak to a lowest trough (a second or so later). You'll get the clicks on playing the selection and also on loop play. These are undesirable artifacts of instantly starting/stopping play (or restarting in the case of loop play). You can hear them, but they do not show on spectrogram. They matter when you are hunting for clicks/pops in recordings.
Ah yes - the Loop play does it Aside: the pay cursor does odd things when used on short sections like this for loop play
Promoting to P2, now that some other clicks (mute/solo/pan changes) have been fixed.
Ameliorated with https://github.com/audacity/audacity/commit/74d0420b9658eae3ade9e3706a8e23ba74c4d40b Start, Stop and Pause of normal play now work without clicks. Loop-Play (each loop) and Play-At-Speed (start / stop / pause) still have clicks.
How badly do you want to fix the remaining problems for 2.3.0? What would be the right approach to fix the loop playing case? A micro fade to and from zero? Or a cross-fading of the end and the beginning of the looped selection? Would you take samples slightly out of the bounds of the loop selection to compute that? You did not mention scrubbing. I can also get clicks when scrubbing at unit speed reverses direction. I have ideas to fix that, which I would rather base on the other scrubbing rewrite I have already done. How badly do you want it?
Testing on W10 with audacity-2.3.0-alpha-100-d79c071d6d42eeb20ed26d4312e2c4bbc8743969 Default 100ms buffer setting Tested with all three hosts: MME, WDS, WASAPI with all three hosts - and non-zero start/stop selection A) Play => no clicks B) Loop play => no clicks c) Play-at-Speed => no clicks Looks to be fixed OK on Windows I would like to test this on Mac before closing this - but right now I have no recent Mac build to work this.
(In reply to Peter Sampson from comment #10) Tested similarly on 2.2.2 to observe that there I do get the clicks on all 3 hosts
Re Comment 11, and Steps B1. I get a click each time round the loop. My audio is a 50Hz tone. Accordingly I have a Test-OK-Win- flag, as it is in the steps, even though not in the title. Also start of play-at-speed clicks for me (as does Pause/UnPause). I expect this bug to still be open at 2.3.0 release, unless we break out loop-Play on its own.
Testing on macOS 10.13.6 with audacity-macos-2.3.0-85f13b.dmg - 28.82 MB | version: 2.3.0 alpha 85f13b Testing with a 3 minute song and a 30 second sine tone a) I get no clicks on start/stop of normal playback or TQP or Scrubbing b) with Lop Play with the sine tone I get a noticeable click - but I expct that if the waves don't match - with the normal music audio there is a little glitch - but also to be expected due too waveform mismatch. I think this is fixed OK for Mac
I get similar results with Loop Play on Windows with a click in the sine tone and a slight glitch in the music - as expected due to waveform mismatch And re-testing with Play, TQP and Scrub all seems OK to me. And no clicks with Pause/un-Pause. I think this is fixed - but this is now down to James with his Windows minus as per Comment #12
*** STEPS UPDATED *** Spun off clicks with Play-at-speed to bug 1954 and clicks with loop-play to bug 1955. RESOLVED FIXED
I determined by bisection that the partial fix for this bug at commit 74d0420b9658eae3ade9e3706a8e23ba74c4d40b is at fault for causing bug 1950.
See spin-off Bug #1955
DEVEL - FIX MADE https://github.com/audacity/audacity/commit/919571e79f754027c655e611eea6ece1f637cd82 This is a slight modification to the original fix for this bug, so as not to cause the regression of bug 1955. Because the fix has changed, this needs a retest. I've tested on Windows. I've reset Peter's tested flag.
Testing on W10 with audacity-2.3.0-alpha-109-40ab579442d3b033834323517692165b959b2dd5 a) with music audio I hear no start or stop clicks b) with a sine time, I get no start click but I do get a stop click
*** STEPS UPDATED *** There are two cases which take different paths in the code. 'A' when you Stop playback using the control toolbar button, and 'B' where the selection reaches the end. Problem A is believed fixed. Problem B remains. --- Also this commit makes the fix for A work with different latency settings. Previously it needed the default of 100ms to be being used. https://github.com/audacity/audacity/commit/3f7c639c3f1eb069ed5f09467fa0eb9eadf12f1d
Testing on W10 withaudacity-2.3.0-alpha-111-af276ac4f998e0869072a999d34812ea4a17eb9f 1) Testing with a real music track I can hear no clicks with use case Peoblem-A And with use case Problem-B I also hear no clicks. I tried truncating the music track abruptly at several pints and then playing to the new end, no click any time - and some of those were definitely not zero-crossings. Also tested with a short track recording my voice with my onboard mic, same tests - and here again no clicks in either use case So with real life audio this WORKSFORME But with a generated sine tone I can still get clicks with both use case A and use case B
Testing on macOS 10.13.6 with Mac alpha of 10Sep18 With music I don't hear starting or stopping c;ocks With a sine tone I hear no click at the beginning - but I consistently get a click at the end of the selection - even if it is on a zero crossing
*** STEPS UPDATED *** To refer to possible filter in sound system that hides these clicks. REOPENNED for the residual case B.
Testing Case B on w0 withaudacity-2.3.1-alpha-172-253aca7eec2e35eff0ee07ac022f11b95f514672 Tested with James' didgeridoo sample that he sent me (as a tricky piece) I cannot reproduce the "loud click" at the end of playing a selection - in fact I can detect no click at all when reaching the end of the selection. ------------------------------------------- I don't get clicks on loop play Nor do I get clicks when starting stopping playback And no clicks when transitioning from audio to silence and back to Audio I get a click at then end of a played selection of sine tone but not at the beginning - but I don't clicks when starting and stopping (with Play & Stop in a continuous sine tone Sine tone => silence => sine tone gets clicks at the boundaries - and loop play with a sine tone gets me boundary transition clicks. But I suspect that this is down to the nature of the sine tone So normal Audacity Play sounds fine to me on W10 ----------------------------------------------------- BUT Play-at-Speed and Scrubbing and seeking are *extremely* clicky with a sine tone - and still noticeably clicky with James' didgeridoo example. This is likely to be a problem with the scrubbing engine and should really be logged as a separate bug. And note that this is NOT the same as Bug #1954 referenced in the Steps to reproduce as that is "Clicks starting/pausing play-at-speed". I'm talking about clicks throughout while playing with PAS (and scrubbing) - which is odd as I don't recall hearing such clicks when I was testing dynamic PAS for its release in 2.3.0. And indeed testing on 2.3.0 now all I get with PAS on a sine tone is a BIG click at the start and then no clicks wile playing or dynamically changing speed.
On Mac Mojave with the latest 64-bit build of Cliff's 253aca7 with a sine tone I get clicks on starting and stopping I get clicks when transitioning in loop play I get clicks transitioning fro sine => silence => sine With the didgeridoo audio - the same clicks are there nut much less obvious BUT I get the constant ratty clicks with Play-Speed and Scrubbing&Seeking - and as this is a regression on 2.3.0 I shall later be logging this as a new P1 regression bug.
Same on Sierra.
I have logged the residual as P1 Bug #2045 Clicky playback with Play-at-Speed and Scrubbing/Seeking Perhaps we could consider closing this 1763 bug ?
See also Bug #1954
Dropped to P4.
The option 'micro fades' eliminates the clicks at ends (on most systems) but leads to a noticeably less responsive response to clicking stop. The micro fade is of fixed duration. On some systems it is more than needed, on others not enough. Improving on this is possible, but gets into the realms of enhancements, namely "What exactly should a better micro fade feature do?" Accordingly CLOSED NOT-A-BUG. It's a feature improvement request.