Extend "Play one second"?

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.

I moved this to “Adding Features”.

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.

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.


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.

I was not aware of this feature (you learn something every day :smiley:)
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?

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.

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.


It’s tempting. I see it in Menus.cpp:

   GetControlToolBar()->PlayPlayRegion(pos - 0.5, pos + 0.5);

I see from http://wiki.audacityteam.org/wiki/Windows_compilation_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.

There is no reason you can’t download the free Visual Studio 2008 C++ Express, is there?

http://wiki.audacityteam.org/wiki/Developing_On_Windows#Visual_Studio_Express_and_Microsoft_SDK .