I wonder I’ll be capable to create some macro or script that can insert a label in an existing label track, at its beginning, stamped with its track name.
I expect it is possible. You would need to create a “Nyquist Macro” (Nyquist-Macros - Audacity Manual) in order to add a label to the current label track. You would then “install” the Nyquist macro, so that you can then include it in a normal macro (if required).
Just checking that I’ve got this right - you want the name of the label track in a label at the start of that label track?
Will there always be exactly one audio track and one label track, with the label track below the audio track?
Nyquist macros are a bit tricky, because you need some familiarity with the Nyquist programming language, and some familiarity with Audacity’s Macro commands. The code itself is pretty simple, though there is a bit of “magic” going on in getting the track name.
This code does not use the “best” way to get the track name, but just a quick and dirty way.
Because we are assuming that the label track is the second track, we look for the second track listing in the “Tracks” info, and the first item in that contains a pair of elements, (NAME “the-track-name”).
If you’d like a more detailed explanation of how this plug-in works, just ask.
Hi
I was giving this tool a try of batching some projects in order to prepare them to print.
So this code is working when the second track is a label one. Isn’t when the selected one is a label one. in this case it create an empty label.
So I was think about the label exporter you’ve made. it’s capable to retrieve label track names. so can a code inject the selected label track his name ?
was tinkering in my macros and guessing how to add a label at the beginning of each label track created by each macro step.
One way should be passing parameter to dedicated macro
Another one should be using the trackname (audio) selected on witch macro apply.
First case is simple I’ll try. even creating duplicated macros with different name for my purpose
Second case is little more touchy for me.
If you want to create a plug-in to be versatile enough to handle cases other than the specific case that you described initially, then you need to decide what the plug-in should do in ALL cases. For example, what if more than one track is selected? What if there are multiple label tracks?
Probably the most important question to ask when designing a program is “what, precisely, do I want this program to do?”
Nyquist can obtain information about tracks from the “GetInfo” command (see: “Extra menu > Scriptables II > Get Info”. If the “Extra” menu is not visible, enable it in the “View” menu.
I was wandering my mind about it.
Searching for the best resume I can provide.
Even looking at .ny file in order to modify some parameters in it.
Why ?
In order to get the functionnality I need at a highest level. in a process manor.
So here is my conclusion : Every .ny plug-ins that generate a new label track as a result should provide the first label at track start being the name of the audio track it applies to. added with several more significant parameters of the used function.
This is the way I’m going to try.
I see tons of interesting Steve Daulton’s I gonna work with