I’d like to write a plugin to work around the file size issue here: Smart clips file size issue (file size doubles after copy + effect).
Initial idea for process to be automated:
- Insert a short silence before and after a selected clip
- Join the clip to the silences
- Delete the silences.
This would add a tiny amount of hidden silence, but since I’m thinking on the order of 1 ms (maybe going up a little higher if anything seems buggy when using an interval that small), and it would be hidden anyway, that’s close enough to zero for me.
Question 1: Can this be done purely with a macro, or does the fact that we need to do stuff based on the start and end of the selection make that impossible?
I was thinking a nyquist tool might work, but now I’ve run into the issue that none of the built-in generators allow specifying a duration when it’s used in a macro. The nyquist ones do, but as I understand it it’s not a good idea to call nyquist from nyquist.
Question 2: is there any command or effect that will let a nyquist tool insert sound at the cursor?
I thought I’d be really clever and copy a piece of the clip and silence it, and then use that as my silence, and I even got it working! Except whoops, it turns out that copy is a smart clip, too, so my 5 ms of silence still has the entire original clip attached…
I imagine it’s possible to write a nyquist generator that just returns the selected audio (actually, do generators have access to selection information?), but frankly I’m not sure I’d trust that to fix the issue, since audacity is perfectly happy to let you replace a subclip with generated silence without modifying the hidden sound to the left or right of the clip at all.
I know mix-and-render has been suggested as a way to get rid of extra clip information, so some sequence of duplicate, then mix and render, then replace the original selection with the duplicated version, might work, but if the original track had any real-time effects enabled, those will now be baked in.
Question 3 Can nyquist turn off real-time effects for a track?
I know nyquist can get you clip information, but I haven’t messed around with it much, and I imagine it hasn’t been updated with smart clip information yet, though that does seem like an interesting avenue for a plugin that would clean a project and remove audio from all clips, rather than relying on a single clip being fully selected.
Anyway, does anyone else have thoughts on this? If someone already has a plugin that gets them most or part of the way there, that would also be interesting to know about.