One not uncommon (I’d imagine) use for Audacity is to record audio for presentations. To sync such audio up with slides/video, one needs to know exactly when one track stops and another begins.
In other words, one needs a list of the lengths of each track, eg.:
1: 1:30.234
2: 1:11.123
3: 2:01.429
Currently the only way to extract such info is to go track by track, highlighting each track, looking at it’s length at the bottom of the screen (I don’t know how blind users could even do this), and then typing it into a separate text file (and then doing the same thing for every track in the file).
However, Audacity has all this info available, so generating such a list should be trivial for it. If you’ll forgive some pseudo code …
output = ‘’;
for trackIndex in file.tracks:
output += trackIndex + ': ’ + file.tracks[trackIndex].length + ‘\n’
giveUser(output)
Whether Audacity actually generates a .txt file, or simply displays the track length list in a modal, the point is that if there was simply a menu option that let users “Extract Track Lengths”, it would provide a huge benefit (for the subset of users who need this info) … and again hopefully should be pretty easy to generate.
Select “Tracks” as the command, and either JSON, LISP or Brief as the format. (https://manual.audacityteam.org/man/extra_menu_scriptables_ii.html#get_info)
If the format is “Brief”, the start and end times of the track are shown after the “kind” of track, for example, the highlighted numbers below are the start and end times in seconds:
Well that was so clear and obvious, no wonder I didn’t find it on my own!
Seriously though, thank you so much for that answer, it will help me a lot.
However, I don’t think this really solves the problem for anyone but me. Ideally this “ticket” should be converted into a “make this task possible for an ordinary human being who isn’t an Audible developer or forum admin to accomplish”.
I’d have thought that most “ordinary human beings” would be capable of looking in the Selection Toolbar (which should be readable by Jaws for VI users). I was just giving a tip about an “advanced” feature (for “advanced users” )
Hey man, the “ordinary humans” bit was just me giving you a user’s perspective, because as a developer myself I know how easy it is to lose that (there’s a reason companies pay huge sums of money for usability studies where they essentially just watch people use their software; if developers could just “think like a user” they never would pay for such things). And I thought the smiley (and following text) indicated that I was being tongue in cheek, and not rude or dismissive of your effort to help.
But look, if you sincerely believe that those steps you outlined are the best way for people who want to use Audacity for presentations to get track lengths, and you sincerely believe that all those people will be able to figure out those steps you outlined (without coming here and getting you to outline them), then one random person in a forum thread (bug ticket?) like myself saying “maybe there could be an easier way” certainly won’t be able to convince you otherwise.
I just thought that, like myself, you would want people who use your software to be able to do so, easily, and I was providing feedback to the effect that right now, for me (data point of one) it’s not. But since it might have gotten lost in this text-based medium, I’ll be explicit: I very much appreciate your assistance, and any “negative feedback” I provided was only to suggest an avenue for improving the program, no in any way to be unappreciative.
The “Scriptables” are a new feature (and still under development). They are only available in very recent versions of Audacity (sorry, I don’t recall exactly when they were introduced - possible 2.3.0).
Me too, hence the smilies
Feedback is very much appreciated.
I think that for the vast majority of Audacity users, the exact track length is not particularly important. Out of the 50,000+ forum topics, there have been very few requests for text output of track lengths.
We do have some related feature requests logged:
Other analytical/statistical ability:
… Track sample data: > headroom to dBFS (audio level), peak minimum and maximum sample, RMS volume, replay gain etc. see SF, Wavelab, Cool Edit etc. over an arbitrary length of audio, even the whole file. (8 votes)
Allow export selected audio and/or Export Multiple to name files with start and length (or end) of the selection (1 votes 02May17)
Permanent indication of/add box for total length of project: (6 votes)
This should be “end-time” minus “start-time”, so ignoring white space at the start (1 votes)
Show project length when Length button is selected with no region selected (1 votes)
Separate time displays for End and Length Very useful to see both at the same time(2 votes)
The feature request page is here: Missing features - Audacity Support
If you would like to “vote” for any of these features, or would like your suggestion to be logged as a separate item, then I’d be happy to log that for you. If the latter (separate item), please suggest wording to make it clearly distinct from the current suggestions.
And please note that as a relatively new feature, the Selection Bar now has options:
Start and End of selection: the start time and the end time of your selection (default setting)
Start and Length of selection: the start time and the length of your selection
Length and End of selection: the length and the end time of your selection
Length and Center of selection: the length and the time at the center of your selection
I do realize that this is only a concern for the subset of Audacity users who use the tool for presentations, and I have no idea how big that subset is; I just know that this feature would be very useful to that subset. My hope was that even if that subset was relatively small, the easy of implementation might help justify making the (hopefully small) effort to support them … but I completely understand if it isn’t.
I tried searching the feature request page but couldn’t find anything except for:
Import/Export of envelope points: as XML file
Import/Export playlist file like M3U/PLS
… and I don’t think either of those would output the necessary information (but they might)?
I hate to make someone else do work for me, but strangely even though that page is a wiki I can’t just sign up for an account (even with a CAPTCHA or something), so I guess I have to ask you to edit it for me? Could you please add the following bullet point to the end of “Other Import/Exports”:
Ability to export track length data as a text file (or even just as copy/paste-able text in a dialog). > Use Case/Rationale: > Audacity users who build presentations (where each track corresponds to a particular slide or other visualization in the presentation) need to know the length (and/or the exact start/end time) of each track, and the only way to get this information currently is to hand type it after selecting each track individually.
Also, if I could make just one more suggestion, if you want feature requests submitted some other way (eg. via the page you linked … although it’s not editable so I don’t know how anyone could request a feature there) it might make sense to link to it on this page: Missing features - Audacity Support … along with some text to the effect of “maybe you don’t want to be here at all, maybe you want to go request a feature”.
And one more time, just for good measure … thanks for taking the time to help me with this “ticket”!
That could be done quite easily with a Nyquist plug-in, though it would require a fairly recent version of Audacity.
I’m not sure if your version will be new enough, but you can try this “proof of concept” code in the Nyquist Prompt effect.
If the debug window does not open automatically in your version, try using the Debug button.
I’d guess a fairly small subset. Because Audacity is such a versatile application, there are many, widely differing subsets (or as we tend to call them: “use cases”).
One of my favourite features in Audacity is that it has a built-in scripting language called “Nyquist”. Although only a small subset of users are likely to use Nyquist directly, indirectly it is one of the most widely used features. Nyquist is an interpreted language that runs straight from the plain text code (no need to compile), and with the addition of some special “header” comments, can be used by Audacity as “plug-ins”.
Audacity ships with quite a few Nyquist plug-ins. In the Effect menu, the effects listed at the bottom (Adjustable Fade, Clip Fix, Crossfade Clips, …) are Nyquist plug-ins. There are also a large number of optional plug-ins available, many of which were written to provide functionality required by subsets of Audacity users: Missing features - Audacity Support
Plug-ins are a very good way of providing functionality that is required only by a subset of users, as it avoids adding “clutter” for other users. It would be nice if installing Nyquist plug-ins was easier, but we’re working on that.
Perhaps won’t need to if we can provide a plug-in to do the job.
Originally the Audacity wiki was like Wikipedia in that anyone could set up an account and post directly to the wiki. To combat spam, restrictions on accounts were progressively increased, but even when manually verifying that user accounts were genuine, a lot of what was being posted was written so badly that it was often incomprehensible. We do not have the resources to adequately monitor, edit, rewrite submissions to a public wiki, so it is now available as a read-only addition to the manual. There is still a huge amount of cruft in the wiki that needs updating / revising / deleting, but the priority for the documentation crew is to keep the manual up to date.
Our preferred way for Audacity users to submit feature request is via this forum. This allows Audacity users to comment and discuss feature requests before they are transferred to the wiki. A large number of requested features are for things that Audacity already has, so feature requests sometimes mutate into a discussion about how to improve an existing feature.
Thanks for the link. That’s a pretty old page, and it has a note at the top for wiki editors, indicating that it needs some TLC. I’ve put that on my to-do list.
You’re very welcome. Thank you for your feedback, and my apologies if my initial reply appeared dismissive - that wasn’t the intention, but even emojis are limited in their ability to express mood
I’d be interested in your feedback on the Nyquist code that I posted - if it works for you, then I’d be happy to turn it into an installable plug-in and post it to the wiki plug-ins page so that it is available for everyone.
I think the idea of making a plug-in out of that would be a perfect solution. It would give presenters exactly what they need, while keeping it out of the way of most users. My one suggestion would be that it would be ideal if the plug-in could somehow have UI which let you pick which values to output, and possibly also a way to define how you want them separated.
Personally all I really need is the lengths, ie.:
39.24
33.08
8.49
Which I got by tweaking your code slightly to be:
(format t "~a~%"
(- (get '*track* 'end-time)(get '*track* 'start-time)))
or whatever, so even a simple UI could make the plug-in useful to a lot more people.
Thanks again. I am just starting work on a new class, which I expect to have 32 (8 weeks/quarter X 4 videos a week) projects that need this. Plus I revise my existing course every so often and need to recalculate these times for certain lessons as well.
Having this code will save me a ton of time: you rock!
Full functionality requires Audacity 2.3.0 or later, but it should still be usable in any version of Audacity from 2.2.0 onwards.
In versions of Audacity earlier than 2.3.0, output to file is not supported, but everything else should work.
There’s no documentation as yet, but given our discussions to date, I think it should be quite easy to work out.
If you have time to thoroughly test all available features, that would be a big help towards releasing it on the Audacity wiki plug-ins page.