I've been thinking about this and it looks like an interesting idea, though I'm uncertain if there would be much demand.Gale Andrews wrote:No one is suggesting anything other than a generic plug-in to (for example) delete five specific ranges in a selection.
There are several approaches that could be taken:
1) Label based approach:
We already have "Edit > Labeled Audio > Cut/Delete/Split Cut/Split Delete/Copy" which can handle some editing tasks on multiple sections.
What we don't currently have is a way to "keep" the labeled sections and delete the un-labeled parts.
One way that this could be done is an indirect, but versatile solution of adding:
"Edit > Labeled Audio > Duplicate"
This solution assumes that "Truncate Silence" is enhanced to allow truncating to zero (a patch is already available for that).
Another possibility would be adding to Audacity a new "Label Track" feature:
"invert Labels"? (perhaps not the best name, but the idea is to automatically generate new region lables to replace the current labels, The new labels occupy the spaces between the old labels, up to the limit of the selection. I like the idea of this as a feature and have previously has practical cases where this feature would have been useful. It would probably not be too hard to implement, but would require a good name - any suggestions?
2) A plug-in with text input:
It would be possible for a Nyquist plug-in to have a text box into which a series of start / end times can be typed (or pasted). There is then an option to either "extract" (keep) these sections or delete these sections.
There could also be options for "Split Extract" and "Split Delete" (spaces between sections are converted to silence.
Limitations of using a Nyquist plug-in:
- It would be a lot slower than a built in effect because the data needs to be copied and re-written. (Audacity can simply move blocks of audio without processing the audio data).
- Currently Nyquist plug-ins perform audio extraction in RAM, so there would be a limit to how long the original selection could be (probably a bit less than 2 GB).
- Nyquist plug-ins do not support white space or track splits. After editing, all audio clips would be merged into one continuous track.
I'm not sure if we already have a "labels from text input" plug-in, but there are probably a few user cases for that.
File Export based approach:
This could be an added feature to "Export Multiple".
Export Multiple happens as now, but rather than creating multiple files from multiple tracks/labeled regions, all of the sections are concatenated into one file.