Is PlayLooped changed/broken?

Questions, discussion and recipes for scripting and batch processing in Audacity.
See also the "Scripting" section of the Audacity manual.
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
tintwotin
Posts: 72
Joined: Tue Sep 09, 2014 7:58 am
Operating System: Please select

Is PlayLooped changed/broken?

Post by tintwotin » Sun Jul 31, 2022 6:21 am

I'm testing our Blender pipe to Audacity add-on https://github.com/tin2tin/audacity_tools_for_blender on Audacity 3.2 and for some reason doesn't the PlayLooped command start playing in Audacity. Has the usage of this somehow been changed or broken?

Code: Select all

Send: >>> SelectTime:End="9.691666666666666" RelativeTo="ProjectStart" Start="0.0"
Rcvd: <<<
BatchCommand finished: OK

Send: >>> PlayLooped:
Rcvd: <<<
BatchCommand finished: OK

Send: >>> Stop:
Rcvd: <<<
BatchCommand finished: OK

tintwotin
Posts: 72
Joined: Tue Sep 09, 2014 7:58 am
Operating System: Please select

Re: Is PlayLooped changed/broken?

Post by tintwotin » Sun Jul 31, 2022 6:49 am

I can see that loop playing has been separated into two functions, with a separate button for Loop On/Off, however the documentation is still referring to PlayLooped: https://manual.audacityteam.org/man/scr ... rence.html Which makes sense since 3.2 is not out yet, but will there be a way to call the loop playing through scripting in 3.2?

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

Re: Is PlayLooped changed/broken?

Post by steve » Sun Jul 31, 2022 2:29 pm

In a Macro, Loop Play can be toggled on / off with the command:

Code: Select all

TogglePlayRegion:
However, it does not fully work for me with Python. The loop region is created, but the loop button is not depressed. Then, on sending the "Play:" command, the selection plays once and stops. Curiously, at this point the Loop button is depressed.

I've logged these issues on the GitHub issue tracker. Thanks for reporting the issue.


Commands relating to looping in Audacity 3.2.0:
  • Set Loop In = SetPlayRegionIn:
  • Set Loop Out = SetPlayRegionOut:
  • Set Loop to Selection = SetPlayRegionToSelection
  • Loop On/Off = TogglePlayRegion
I've not found any way to play looped (tested on Linux), which I think is a bug. I'd expect that "TogglePlayRegion" should enable looping, then "Play" would play looped, but that does not work currently.
Learn more about Nyquist programming at audionyq.com

tintwotin
Posts: 72
Joined: Tue Sep 09, 2014 7:58 am
Operating System: Please select

Re: Is PlayLooped changed/broken?

Post by tintwotin » Sun Jul 31, 2022 9:49 pm

Thank you for the quick reply.

I'll stand by till a solution has been implemented.

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

Re: Is PlayLooped changed/broken?

Post by steve » Tue Aug 02, 2022 12:20 pm

tintwotin wrote:
Sun Jul 31, 2022 9:49 pm
I'll stand by till a solution has been implemented.
I think this will be the issue to watch: https://github.com/audacity/audacity/issues/3326
Learn more about Nyquist programming at audionyq.com

Post Reply