Extend "Play one second"?

Effects, Recipes, Interfacing with other software, etc.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
pshute
Posts: 181
Joined: Sat Feb 18, 2012 9:39 am
Operating System: Please select

Extend "Play one second"?

Post by pshute » Sat Nov 17, 2012 8:21 pm

I find the "1" shortcut to "Play one second" very useful, but not quite long enough. Is there a way to extend it to, say, two seconds?

"Play cut preview" would work even better for me if it would work for a zero length selection.

I'd like to place the cursor on a short event I'd like to label, listen to a second before and after it, then control+B to label it if I decide it's necessary. If I extend the selection slightly as necessary for "Play cut preview" to work, I naturally hear a tiny click in the middle, and the label becomes a range rather than a point.

I'm having to select around the location, press Space to play, click the point then control+B to label. I've got hundreds of these to do and I'd like to save a couple of clicks per label.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Extend "Play one second"?

Post by Gale Andrews » Sun Nov 18, 2012 6:50 am

I moved this to "Adding Features".
pshute wrote:I find the "1" shortcut to "Play one second" very useful, but not quite long enough. Is there a way to extend it to, say, two seconds?
Not without recompiling Audacity. Do you want to vote for this to be configurable in Playback preferences? The obvious problem of course is that the "1" shortcut is then misleading. Or, should we add a "2" shortcut to play one second either side? I agree 1 second may be a little short.
pshute wrote:"Play cut preview" would work even better for me if it would work for a zero length selection.

I'd like to place the cursor on a short event I'd like to label, listen to a second before and after it, then control+B to label it if I decide it's necessary. If I extend the selection slightly as necessary for "Play cut preview" to work, I naturally hear a tiny click in the middle, and the label becomes a range rather than a point.

I'm having to select around the location, press Space to play, click the point then control+B to label. I've got hundreds of these to do and I'd like to save a couple of clicks per label.
I would suggest two workarounds.

You could drag your region in the Timeline, and just make a mental note of the halfway point should you want to then click at that point in the waveform and make a label.

Use Cut Preview. Click the central spot, SHIFT + LEFT arrow or SHIFT + RIGHT arrow to make a minimal selection, C, then if you want to label that place, use the opposite arrow key without the SHIFT modifier, then CTRL + B.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

pshute
Posts: 181
Joined: Sat Feb 18, 2012 9:39 am
Operating System: Please select

Re: Extend "Play one second"?

Post by pshute » Sun Nov 18, 2012 8:36 am

Gale Andrews wrote: Do you want to vote for this to be configurable in Playback preferences? The obvious problem of course is that the "1" shortcut is then misleading. Or, should we add a "2" shortcut to play one second either side? I agree 1 second may be a little short.
Yes, please add my vote. It's already been requested then?

I'd be happy sticking with the 1 shortcut, even if I change it to 2 or 3 or 4 seconds. It's just a shortcut, and there are plenty of others that have no real logical connection with the command. E.g Space to play and stop, Control+b to add a label. I don't mind either way, so long as the shortcut is really easy to press.

I do think sometimes I might want a longer period than 2 seconds, so I'd like to be able to configure it.
I would suggest two workarounds.
Thanks, but they're too too fiddly. I'm doing better with the "1" shortcut by zooming in close enough that I can get the mouse more precisely in the middle of the event. If I miss by 1/4 of a second then I only get 1/4 second played before or after it.

I might have a go at making an AutoHotKey script to do it. I can't see a way to reliable move the cursor, say, 1 second left when it's not playing. The Left and Right keys move the cursor different amounts depending on the zoom level.

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Extend "Play one second"?

Post by steve » Sun Nov 18, 2012 6:41 pm

Gale Andrews wrote:o you want to vote for this to be configurable in Playback preferences?
I was not aware of this feature (you learn something every day :D)
I know that the developers don't like "preferences creep" but there's plenty of space in "Preferences > Playback" and had it been there I'd have "discovered" this feature years ago, so +1 from me for making it configurable.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

pshute
Posts: 181
Joined: Sat Feb 18, 2012 9:39 am
Operating System: Please select

Re: Extend "Play one second"?

Post by pshute » Sun Nov 18, 2012 8:26 pm

steve wrote:
Gale Andrews wrote:o you want to vote for this to be configurable in Playback preferences?
I was not aware of this feature (you learn something every day :D)
I know that the developers don't like "preferences creep" but there's plenty of space in "Preferences > Playback" and had it been there I'd have "discovered" this feature years ago, so +1 from me for making it configurable.
I discovered it by browsing through the shortcuts list in the manual. It might be unique in that it's not in the menus - it can't be because it plays around the mouse position, not the cursor - so you're less likely to stumble on it than other commands.

I wonder why they used the mouse position instead of the cursor. When would that be useful? Perhaps when you're looking for something to extend the selection to?

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Extend "Play one second"?

Post by steve » Sun Nov 18, 2012 9:49 pm

pshute wrote:I wonder why they used the mouse position instead of the cursor. When would that be useful?
For playing either side of the cursor there is the "B" shortcut.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

pshute
Posts: 181
Joined: Sat Feb 18, 2012 9:39 am
Operating System: Please select

Re: Extend "Play one second"?

Post by pshute » Sun Nov 18, 2012 10:21 pm

steve wrote:
pshute wrote:I wonder why they used the mouse position instead of the cursor. When would that be useful?
For playing either side of the cursor there is the "B" shortcut.
Doesn't that play from the mouse position to the start or end of the selection? I want to play a couple of seconds either side of the cursor, or the mouse position. Once it's played, I don't want to have to move the cursor again to label the point, so placing the cursor to one side of the point isn't going to help. I might as well just make a selection either side of the point and then play it.

Normally I'd just do that, but I've got a lot of these to do, and I'd like to conserve keystrokes and mouse clicks. The "1" shortcut is perfect, just a little short.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Extend "Play one second"?

Post by Gale Andrews » Mon Nov 19, 2012 8:32 am

pshute wrote:
steve wrote:
pshute wrote:I wonder why they used the mouse position instead of the cursor. When would that be useful?
For playing either side of the cursor there is the "B" shortcut.
Doesn't that play from the mouse position to the start or end of the selection?
Yes, or from mouse to cursor or cursor to mouse. It doesn't help you.

It may be worth trying to compile Audacity. Changing the 0.5 seconds either side of the pointer is a very simple change if you don't want to add a preference to change it.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

pshute
Posts: 181
Joined: Sat Feb 18, 2012 9:39 am
Operating System: Please select

Re: Extend "Play one second"?

Post by pshute » Mon Nov 19, 2012 9:53 pm

Gale Andrews wrote:It may be worth trying to compile Audacity. Changing the 0.5 seconds either side of the pointer is a very simple change if you don't want to add a preference to change it.
It's tempting. I see it in Menus.cpp:

Code: Select all

   GetControlToolBar()->PlayPlayRegion(pos - 0.5, pos + 0.5);
I see from http://wiki.audacityteam.org/wiki/Windo ... tion_notes that I'd need Visual C++ 9. Haven't got it, so I'll have to forget this idea. Once upon a time I would have tried to patch the exe file, but I doubt I could find the constant, and it might be shared with some other code if it's optimised. Just had a look, there are 3F 00 00 00 and BF 00 00 00 all over the place in the exe. Only found one occurrence each of double precision +/-0.5, but they didn't affect it when I changed them. That's assuming I worked out the hex representations correctly - I used the converter at http://www.binaryconvert.com/convert_double.html.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Extend "Play one second"?

Post by Gale Andrews » Tue Nov 20, 2012 9:10 am

pshute wrote:
Gale Andrews wrote:It may be worth trying to compile Audacity. Changing the 0.5 seconds either side of the pointer is a very simple change if you don't want to add a preference to change it.
It's tempting. I see it in Menus.cpp:

Code: Select all

   GetControlToolBar()->PlayPlayRegion(pos - 0.5, pos + 0.5);
I see from http://wiki.audacityteam.org/wiki/Windo ... tion_notes that I'd need Visual C++ 9. Haven't got it, so I'll have to forget this idea.
There is no reason you can't download the free Visual Studio 2008 C++ Express, is there?

http://wiki.audacityteam.org/wiki/Devel ... rosoft_SDK .


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Post Reply