Skip to content

Mute part of a file during encoding #3440

Answered by smimram
jleren asked this question in Q&A
Discussion options

You must be logged in to vote

You can use source.time to get how many time has elapsed since the beginning of a source and amplify to mute it when needed. I would thus do something like this, where s is your source

s = ...

def amp()
  t = source.time(s)
  if (8. <= t and t <= 11.) or (36. <= t and t <= 40.) then 0. else 1. end
end

s = amplify(amp,s)
outpout(s)

Here, amp returns 0 or 1 depending on the time elapsed in s and we amplify s accordingly.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jleren
Comment options

Answer selected by jleren
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants