Silence 10 second audio at an interval

I was wondering if it’s possible to silence audio at set intervals.

For example:
I want to silence 10 seconds of audio every 10 seconds, so seconds 1-10 will be silenced, then 11-20 will remain normal, then 21-30 will be silenced and so forth.

I found this code https://forum.audacityteam.org/t/adding-silent-space-every-30-seconds-over-45-min-mp3/32063/2 that is sort of what I want except that the code doesn’t silence the 10 seconds of audio, it just adds it in between.

I’ve moved this topic to the “Nyquist” forum board, as the task may easily be accomplished with a Nyquist script.
See here for how to apply a Nyquist script using the “Nyquist Prompt” effect: http://manual.audacityteam.org/man/nyquist_prompt.html

and here is the code:

;version 4
(setf hz 0.05) 
(let ((sq-wave (osc-pulse hz 0)))
  (mult 0.5 (sum 1 sq-wave) *track*))

For me that does not produce even intervals : the first one is half the duration of the rest …
first interval is half.png
The TremVib.ny plugin can do the job …
TremVib plugin settings.png

Depends on whether the “intervals” are the sound or the gaps :wink:
Changing the starting phase would add quite a bit of complexity to the code, but you could easily set your audio selection to start at 5.0 seconds.

Yes, TremVib.ny will also do it.

Thank you very much, both the Nyquist code and the Tremolo/Vibrato plugin did exactly what I wanted to do. :smiley: