You could do: input & (timer(x) > y)
Input is your input you want to use, x is the inverse of the frequency so x = 0.5 gives a frequency of 2. Y is the percentage of time the signal is zero, so for y = 0.5, you have signal which is 50% of the time 0 and 50% of the time 1.
Input is your input you want to use, x is the inverse of the frequency so x = 0.5 gives a frequency of 2. Y is the percentage of time the signal is zero, so for y = 0.5, you have signal which is 50% of the time 0 and 50% of the time 1.