innocenceisdeath wrote:Given that it is difficult to work with multiple tracks (and assuming clicks can be accurately detected), would it be possible to instead log the location and duration of the clicks to a file. Then use this log file to mute the clicks in one track, and mute everything but the clicks in the other?
Yes that could be done (assuming, as you say, that the clicks can be accurately detected).
There is a slight problem that Nyquist does not know much about the computer file system so file handling is not great, but see
http://manual.audacityteam.org/o/man/sa ... xport.html as an example of how output files can be specified.
You could analyze the fault track and in one pass detect the clicks, write a text file with start/end times for each correction, and mute those parts. Then run a plug-in that reads the text file and mutes everything except for those parts.
Alternatively (and possibly easier to program) you could write a WAV file to disk that has amplitude 0 where you want to mute the track and amplitude 1.0 where you want the track not muted. Example: to mute from 0.0 to 3.0 seconds and from 3.5 seconds to the end of the selected track, leaving 3.0 to 3.5 seconds not muted:
Code: Select all
; find the end of the selection
(setq dur (get-duration 1))
;; "controlwave" is the waveform that would be written to disk
(setf controlwave
(abs-env
(pwlv 0 3.0 0 3.0 1 3.5 1 3.5 0 dur 0)))
;; Applying the controlwave to the selected audio
(mult controlwave s)