Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 815 - Enh: Clicking Play-at-Speed Toolbar Play button pushes down Transport Play button
Enh: Clicking Play-at-Speed Toolbar Play button pushes down Transport Play bu...
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: User Interface
2.1.0
Per OS All
: P3 Enhancement
Assigned To: Default Assignee for New Bugs
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-10 10:28 UTC by Paul L
Modified: 2021-12-30 15:30 UTC (History)
5 users (show)

See Also:
Steps To Reproduce:
1) Click the Play-at-Speed toolbar play button. That button releases and the Transport play button engages (appears pressed). Correct behavior: Just the transcription toolbar button should be down. Note that this bug happens however play is triggered, e.g. by keyboard shortcuts or by other play buttons. Try this BOTH by pressing the Play-at-Speed button (with or without shift or control), AND by using shortcut keys assigned to each of the three Play-at-Speed commands.
Release Note:
First Git SHA:
Group: Needs Discussion
Workaround:
Closed: 2021-12-30 00:00:00
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+


Attachments
Fix it the first, easy way. (586 bytes, application/octet-stream)
2015-01-10 10:31 UTC, Paul L
Details
Alternative, more complicated fix (4.44 KB, patch)
2015-01-10 11:38 UTC, Paul L
Details | Diff
Updated fix. Merged with head and removed an unnecessary line. (3.33 KB, patch)
2015-01-27 12:29 UTC, Paul L
Details | Diff
Updated fix, again. (4.00 KB, patch)
2015-01-27 15:41 UTC, Paul L
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul L 2015-01-10 10:28:20 UTC
My project for improved icons for the two play buttons (making both of them change images for shift and for ctrl) left this behavior, that several on the mailing lists dislike:

If you press either the play or the transcription toolbar button (or hit a shortcut key that invokes either), then both buttons have pushed appearance for the duration of play.

What should be the correct behavior?

1) Transport play button only is pressed, regardless whether play is at normal speed.

2) The button that was clicked, only, is pressed.
Comment 1 Paul L 2015-01-10 10:31:26 UTC
Created attachment 537 [details]
Fix it the first, easy way.

This patch causes transport button only to be pressed during playback, even if the user clicked on the transcription button.  That might not make the best sense, but it is easiest and behaves as 2.0.6 does.
Comment 2 Paul L 2015-01-10 11:38:42 UTC
Created attachment 538 [details]
Alternative, more complicated fix

Alternative causes either transport or transcription play to stay down during playback but not both.

Also noticed and fixed this inconsistency:

During recording the transport play was disabled but transcription play was not.  Now both are disabled.
Comment 3 Gale Andrews 2015-01-15 18:23:28 UTC
Paul, what are the steps to reproduce this? I thought this was fixed and don't see what you describe on Windows. Are you testing in HEAD?
Comment 4 Paul L 2015-01-15 18:31:32 UTC
That's odd.  Did Leland do something to ControlToolBar.cpp that incidentally fixed this?

Complaint a month or two ago was that both play buttons appeared "pressed" for the duration of play, and that was a consequence of things I did.

But Gale is right that in head now, only the Transport play button stays depressed.

That restores 2.0.6 behavior, it is true.  But I have done some work so that either Transport or Transcription play (but not both) appears pressed, appropriately to the button push or the command.  Perhaps that is a little bit preferable.
Comment 5 James Crook 2015-01-24 12:04:17 UTC
PX->P2.  Regression.  RM needs to decide if this is a show stopper.  I think not only is it not by any stretch of the imagination a show stopper, but that also the bug as described is actually closed.  

Current behavior is that clicking the transcription play button causes the transport button (only) to stay down.  I think that we do not need to open a new bug for 'the wrong button' being down as this is a logical way to do it.  Needs a decision from RM though.
Comment 6 Paul L 2015-01-25 07:54:29 UTC
Bug 804 duplicated this complaint.  Revision 13800 made a fix.  The result of that fix is the old behavior, that the transport Play button, only, appears pressed for the duration of play.

My proposed patch has the different effect that the button that was clicked, only, appears pressed.  That may be transport Play or transcription Play.

The latest comment at 804 said

"Bill wrote:
> Click the Play button or press spacebar, and both the Play and Play-at-speed
> (Transcription toolbar) buttons show the “pressed” state. Similarly, click the
> Play-at-speed button and both play buttons show the pressed state.

> It should be one or the other.
That's not how it worked before. After releasing click on the Play-at-speed
button, the standard Play button lights up, indicating you can restart play at
standard speed. That's the behaviour the fix has gone back to."

But this confuses the pressed appearance ("lighting up") of a button with its enabled state (dark green, not gray).
Comment 7 Gale Andrews 2015-01-25 12:50:53 UTC
(In reply to comment #6)
I think the least confusing and least overhead solution is to rename this bug from "Transport and Transcription play buttons should not both appear pressed" (already fixed and closed at bug 804) to what it should have been in the first place "Transcription Toolbar Play button should be down after clicking it, not Transport Play button". I therefore reopened this bug.   

The current bug title is not a regression on 2.0.0 or on any version I can find. 1.3.3 had neither Play button down after clicking either button. Given that, I'm just going to demote to P4 Enhancement. I agree it would be better for the button that is activated to stay down but it isn't a show stopper IMO.  

I'm confused whether either patch attached here does only what the new bug title says, so pending clarification, removed "patch" keyword.
Comment 8 Paul L 2015-01-25 13:09:54 UTC
As mentioned, the second patch combined a fix for this and the problem in bug 816.

Now bug 816 has a patch that fixes that other problem, only.

I could make a third patch for 815, only... which would duplicate a little bit of the code for 816, because both fixes required a new method added to class TranscriptionToolBar.
Comment 9 Gale Andrews 2015-01-25 18:02:41 UTC
(In reply to comment #8)
Paul wrote:
> I could make a third patch for 815, only... which would duplicate a little bit
> of the code for 816, because both fixes required a new method added to class
> TranscriptionToolBar
That would sound fine to me, a patch for this bug only that keeps bug 816 fixed.
Comment 10 Paul L 2015-01-25 18:19:19 UTC
Sorry, I was confused.  The first version of my patch (now obsoleted) was the cause of what I reported in bug 816, which is now rightly invalidated.  The second version of the patch needed the extra work to avoid introducing that misbehavior during recording, so the patch should not be separated into two parts.
Comment 11 Paul L 2015-01-25 19:56:39 UTC
I am contemplating a third (!) play button in Audacity 2.1.1, on the Spectral Selection toolbar, to play selected frequencies only.  That would complicate this fix further, to depress the correct one of three play buttons.
Comment 12 James Crook 2015-01-26 04:43:53 UTC
(In reply to comment #11)
Paul, proposals for future features belong on wiki.
Comment 13 Paul L 2015-01-27 12:29:02 UTC
Created attachment 565 [details]
Updated fix.  Merged with head and removed an unnecessary line.
Comment 14 Paul L 2015-01-27 15:41:11 UTC
Created attachment 566 [details]
Updated fix, again.

I made sure in this version that the correct button appears pressed, even if you don't use the button but instead use shortcut keys for the related commands.
Comment 15 Steve Daulton 2015-05-08 09:49:43 UTC
Steps to reproduce say:

"Correct behavior:
Just the transcription toolbar button should be down."

I'm not sure that is the correct behaviour.

The normal Play button and the Play at speed button work differently from each other.

When the play button is pressed, two commands are issued. The first is to stop playback and the second is to start playback. The button stays down for as long as playback continues. If pressed again, playback stops, then starts again.

When the "Play at speed" button is pressed, a command to start playing at the specified speed is given. If pressed again, another command to start playing at the specified speed is given.

The difference in behaviour can be seen clearly by the following steps:
1) Open a project  with at least 30 seconds of audio
2) Select from around 15 seconds to around 25 seconds
3) Press "play" (for second part of test, "play at speed")
4) While the audio is playing, click on the waveform at about 5 seconds.
5) Press "play".
Note that (because playback is stopped), the play region disappears and playback resumes from the cursor position at around 5 seconds.

Repeat the above using the "play at speed" button.
On step 5, note that the play region from 15 s to 25 s is retained and playback resumes from around 15 seconds.

It seems to me that the "play at speed" button is behaving like a "momentary action switch", in that it is issuing a command to start an action each time it is pressed. (Momentary action switches are like doorbell switches - they return to the "Up" position after being pressed).

The "Play" button also appears to be behaving correctly as it designed to indicate (by the down position) that Audacity is in "play mode".
Comment 16 Peter Sampson 2017-04-04 07:56:27 UTC
I believe that this is more than an enhancement request - it certainly looks to me like erroneous behavior - certainly deserving of at lest P3 and a release note.


What happens is the when the user clicks on the green play button in the Transcription Toolbar and holds it down that button chnges to showing as depressed.

Once the user releases the button then the play-at-speed commences - but the Play-at-speed button is popped up and the normal Play button is shown as depresssed (and active).  This just looks wrong.


There is some sense in this, I suppose, as the user needs to press the Stop or Pause in the Transport Toolbar to manage the play-at-speed (as it has no corresponding Stop/Pause button in the Transcription Toolbar).  So depressing the normal Play button in the Transport Toolbar draws the user's attention to the Transport Toolbar and the Stop & Pause controls there.
Comment 17 Gale Andrews 2017-04-13 22:14:27 UTC
(In reply to Steve Daulton from comment #15)
> It seems to me that the "play at speed" button is behaving like a "momentary 
> action switch", in that it is issuing a command to start an action each time it 
> is pressed. (Momentary action switches are like doorbell switches - they return 
> to the "Up" position after being pressed).
> 
> The "Play" button also appears to be behaving correctly as it designed to indicate 
> (by the down position) that Audacity is in "play mode".

I have commented on this impasse on the -quality list:
http://audacity.238276.n2.nabble.com/Bug-815-Transcription-Toolbar-and-Transport-Toolbar-play-buttons-td7579543.html .
Comment 18 Peter Sampson 2017-11-26 09:18:58 UTC
James wrote by email:
>For my money, the 'correct' behaviour is to do away with the play-at-speed 
>button, and instead always use the play button AND the slider.  
>The slider should have a toggle button on it, that toggles between some 
>preset speed and a speed of x1.  And always toggles back to x1 on opening 
>a new project to avoid a 'stuck in mode' problem for noobs.

I am strongly minded to agree
Comment 19 Peter Sampson 2021-12-30 15:30:31 UTC
Testing with 3.1.3 on W10 and macOS 12.0.1 Monterey

This now works as Paul requested - he may have fixed this as part of his recent changes to Play, TQP and PAS