Replies: 1 comment
-
Hi. Let's define functions that will return actual gain values. def get_gain_min()
if random.bool() then
0.
else
null()
end
end
def get_gain_max()
if random.bool() then
0.
else
null()
end
end Then I have to do something with source. r = sine() The I'll get the gain values gain_min = get_gain_min()
gain_max = get_gain_max() Probably this is what you asking about. r = if (null.defined(gain_min) and null.defined(gain_max)) then
normalize(gain_min=null.get(gain_min), gain_max=null.get(gain_max), r)
else
r
end After that I want to get print(r.id())
output.dummy(r) You could share a more detailed code sample so we could discuss it further. |
Beta Was this translation helpful? Give feedback.
-
Hi, is posible to add a if codition to if variable has not empty then add the normalize line, something like this:
Beta Was this translation helpful? Give feedback.
All reactions