mute parts of audio automatically using seconds

Hello . I have an audio and I want to extract 2 audios : the 1st one starts with the first 3 seconds muted ( 00:00 to 00:03 ) then the second 3 seconds with original sound ( 00:03 to 00:06 ) then the third 3 seconds muted ( 00:06 to 00:09 ) then the fourth 3 seconds with original sound ( 00:09 to 00:12 ) … till the end .
The audio length needs to be the same . These muted parts are not a silence inserted . They are original parts where people talk but I want them to be muted .
The 2nd audio starts this time with the first 3 seconds with original sound ( 00:00 to 00:03 ) then the second 3 seconds muted ( 00:03 to 00:06 ) then the third 3 seconds with original sound ( 00:06 to 00:09 ) then the fourth 3 seconds muted ( 00:09 to 00:12 ) … till the end .
When manually working , this takes me many hours per video and I need to extract like this audios for many audios as soon as possible . I would be very happy if there is anything that will do this for me automatically . Thank you !!

Use the Nyquist Prompt to apply this code:

;version 4

(setf phase -90)

(setf *sq-table*
  (maketable
    (abs-env
      (pwlv 0 0.5 0 0.5 1 1.5 1 1.5 0 2 0))))

(mult *track*
  (osc (hz-to-step (/ 6.0)) 10 *sq-table* phase))



For this, only the “phase” needs to be changed:

;version 4

(setf phase 90)

(setf *sq-table*
  (maketable
    (abs-env
      (pwlv 0 0.5 0 0.5 1 1.5 1 1.5 0 2 0))))

(mult *track*
  (osc (hz-to-step (/ 6.0)) 10 *sq-table* phase))

Thank you very much Steve <3 <3 I don’t know how to thank you . Really thank you !!!

Actually, I’ve noticed a minor error in the code - it doesn’t actually make any difference in practice, but as a matter of “correctness”, the final line should be:
(osc (hz-to-step (/ 6.0)) 1 sq-table phase))


So here’s the corrected versions:

;version 4

(setf phase -90)

(setf *sq-table*
  (maketable
    (abs-env
      (pwlv 0 0.5 0 0.5 1 1.5 1 1.5 0 2 0))))

(mult *track*
  (osc (hz-to-step (/ 6.0)) 1 *sq-table* phase))



;version 4

(setf phase 90)

(setf *sq-table*
  (maketable
    (abs-env
      (pwlv 0 0.5 0 0.5 1 1.5 1 1.5 0 2 0))))

(mult *track*
  (osc (hz-to-step (/ 6.0)) 1 *sq-table* phase))

Hello Steve . Please if it doesn’t annoy you , I need these audios for 1 second , I mean
the 1st audio : 00:00 to 00:01 muted
00:01 to 00:02 with sound
00:02 to 00 :03 muted
the 2nd audio : 00:00 to 00:01 with sound
00:01 to 00:02 muted
00:02 to 00 :03 with sound
Thank you very much Steve and sorry for annoyance .

That is a 6 second cycle, which can also be described as a “frequency” of 1/6 Hz.

That is a 2 second cycle, which can also be described as a frequency of 1/2 Hz.

(mult *track*
  (osc (hz-to-step (/ 6.0)) 1 *sq-table* phase))

This part of the code multiplies the selected audio track by a “square” waveform that has a frequency of 1/6 Hz.
To change the frequency to 1/2 Hz, just change the “6.0” to “2.0”.

Thank you very much Steve !!! <3 <3 <3