I’m trying to create a keyboard-launched macro that will:
select the waveform between the two nearest zero crosses
clip-fix that waveform
Problem is, the “select at zero crossings” [sic] only selects A SINGLE zero crossing, as far as I can tell. Anyone know of a trick to select the two nearest ones?
The documentation for the Select At Zero Crossings command implies that if you start with a cursor position (not a selected region) then the cursor is moved to a nearby (not necessarily the nearest) zero-crossing point. If you start with a selection, then the edges of the selection are adjusted.
You should be able to get around this by first making a small selection around the cursor position. But then you might run into this bug:
You could experiment to find out how big the selection needs to be to avoid the bug. You might end up clip-fixing 2 or 3 cycles of the audio, but I don’t think that would be a disaster.