If there’s a non zero selection, it adds the label at the start of the selection as desired. But if it’s zero length, as it would be if I just clicked on the waveform, it just adds the label at the start of the track.
It won’t work for an “analyze” type plug-in because with no selection there is nothing to “analyze”.
It won’t work for an “process” type plug-in because with no selection there is nothing to “process”.
It will work with a “generate” type plug-in.
(btw, I suppose you’re aware that you can create a point label with Ctrl+B)
I changed it to a generate plug-in, and that works well, thanks. But is there any way to get it to always add the labels to a particular label track? It keeps adding new ones.
(btw, I suppose you’re aware that you can create a point label with > Ctrl+B> )
Yes, but I need to add lots of labels with the same text, so I wanted to make it as simple as possible. I could use control+alt+v to paste text to the label as it creates it, but I’ve got about 5 pieces of text to insert dozens of time randomly. I was going to make several plug-ins, and assign them to control+1, control+2, etc.
I can make it do it if I make a selection and extend it down into the label track, but that’s not very convenient. If there’s no way to make it do that directly, is there a way to programatically extend the selection. I can do it with the keyboard by pressing shift+right then shift+down, then it works nicely.
Perhaps I should be using an external keyboard macro for this instead.
Only by selecting both the audio track and the label track.
To do this, click on the audio track, then click on the “track control panel” (the box on the left) of the label track.
Alternatively, if you have just one audio track and one label track you can click on either of the tracks then Ctrl+shift+K (select in all tracks), then generate the label.
Sorry it’s a bit awkward - we really need a new “type” of plug-in that does not require an audio track. It has previously been suggested that there should be a “tools” or “utilities” type plug-in, but this would probably require a new menu item in the main Audacity menu. (There was previously a “Tools” menu, but there were so few things in it that it was removed again). I’m not sure how this type of feature request should be handled, but if you’d like Audacity to have a “tools” type plug-in that does not require a track selection, then you are very welcome to suggest it on the Features Request board.
It makes the audio track “selected”.
(you will notice that the track control panel on the left of the audio track becomes highlighted)
If there is an audio track selected, a “Generate” plug-in will generate audio into the selected track(s).
In this case we are generating “no audio” - in effect that’s the same as generating audio of zero duration. Audacity will zoom out to accommodate the generated audio, but because there isn’t any Audacity does not need to zoom out.
If there is no audio track selected, then a generate plug-in will create a new track. In this case Audacity will zoom out to show the generated audio in the context of the entire project. Personally I’m not sure how useful this behaviour is, but after lengthy discussions the developers decided that this was the behaviour that they wanted.
The underlying reason for why this is fiddly is because you are doing something that neither generate, effect or analyze type plug-ins are supposed to do. I think that rally we need a “Tools” or “Utilities” type plug-in that does not require an audio selection for plug-ins that do not return audio (such as this plug-in).
I’m now trying to use AutoHotKey to do the same thing, and it’s working but slightly oddly. I know this isn’t an AutoHotKey forum, but I’m wondering if anyone can suggest why it’s doing this.
I want to click on the (zoomed in) waveform to place the cursor, then have the AutoHotKeyScript press control+B to create a label in the track under it, then type a “?” in the label and press Enter to close the label editing.
My AutoHotKeyScript is
(The first line defines the hotkey, the second sends the keys, the third quits the script.)
I click on the waveform then press control+shift+1. It places the label in the correct place, but then the display scrolls to the start of the track. If I press the right arrow key, I find that the cursor was where I left it.
Why does the display scroll to the start of the track?
I can work around it by adding a Right key after the Enter
I’m afraid I can’t help with AutoHotKey as I’ve not used it in years and I’m not even using Windows.
The Nyquist section is one of the quieter corners of the forum, so you may do better to start a new topic in the General Audio Programming section: http://forum.audacityteam.org/viewforum.php?f=21