getting or sending current position (play or record)

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
artificiel
Posts: 4
Joined: Thu Dec 19, 2019 9:39 pm
Operating System: macOS 10.14 Mojave

getting or sending current position (play or record)

Post by artificiel » Wed Jan 08, 2020 2:48 am

hello!

maybe not a "scripting" question but:

(theater context) we want to display the current audio position on remote displays. a video cable connected to a 2nd output of audacity computer is impractical, and does not allow control of the presentation to the level we are hoping for.

ideally, i would query Audacity and retrieve this information (once per second or so) and display it myself. or maybe Audacity can emit it? (perhaps through Midi Time Clock?).

i tried searching the different ressources and did not find anything that helped around the notion of "current position" or timecode.

thanks,
alex.

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

Re: getting or sending current position (play or record)

Post by steve » Wed Jan 08, 2020 9:17 am

Audacity does not have MIDI clock control, or Jack Transport control, and you can't get the play position from scripting commands.
However, you can tell Audacity where to start playback via Python scripting (which gives you the initial play position), and you can measure elapsed time with Python, so the current play position may be calculated as:

Code: Select all

Start position + elapsed time = current position
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply