Following on from a request here.
This topic is about how to modify a plug-in that outputs labels, so that it also outputs a text file.
Writing to a text file can be quite problematic for it to work reliably, with error checking, with cross platform support, so we will take a short cut and limit the export folder to one “safe” location - the user’s “home” folder.
To test small parts of code we can use the “Nyquist Prompt” effect.
For making and testing the plug-in, we will have the plug-in open in a text editor (such as Notepad++ on Windows) while we work. Changes can then be made and tested instantly in Audacity.
The example plug-in in this forum thread will be based on the SoundFinder plug-in.
For the sake of being able to run this plug-in in a Chain, the “type” of plug-in will need to be change from an Analyze plug-in to a “Process” plug-in,
Analyze plug-ins appear in the Audacity Analyze menu.
Process plug-ins appear in the Audacity Effect menu.
From Audacity 2.0.1 (currently in alpha, but due for release soon) Nyquist “process” plug-ins may be used in Chains http://manual.audacityteam.org/manual/help/manual/man/batch_processing.html
Making Sound Finder into a “process” type effect.
Make a copy of SoundFinder.ny and rename it SoundFinderText.ny
Save the file in the Audacity Plug-ins folder.
Open SoundFinderText.ny in a text editor and change line 3 from
Change line 5 from:
;name "Sound Finder..."
;name "Sound Finder to Text File..."
Restart Audacity and there should be a new effect (below the line) in the Effect menu called “Sound Finder to Text File…”