1
$\begingroup$

I have a simple switch based on a sound spectrum.
When the value hits above 0.15 the condition returns true which i've set to output 1:

enter image description here

However I would like that whenever the condition is true it doesn't just return 1 for that frame but for the following 3 frames.

I've tried using animate float node but I couldn't figure out how to use that node to achieve this.

$\endgroup$

1 Answer 1

2
$\begingroup$

you can do this with this node setup:

enter image description here

the expressions are just writing and reading the framestart value, which is that frame, when the condition (>= .6) was last time true.

The list viewer shows random values from 0 to 1.

The viewer on top of the list viewer shows the current random value.

The two other viewers show frame and the result you want.

enter image description here

$\endgroup$
11
  • $\begingroup$ Thank you for the answer, i've tried reproducing it but I am always getting false : imgur.com/a/GJM3mgK $\endgroup$
    – Monstar
    Commented May 17, 2022 at 1:04
  • $\begingroup$ Pls provide your blend file so I can check it out $\endgroup$
    – Chris
    Commented May 17, 2022 at 3:50
  • $\begingroup$ Sure here it is, i've kept it as a Minimum Reproducible Example : mega.nz/file/… $\endgroup$
    – Monstar
    Commented May 17, 2022 at 22:46
  • $\begingroup$ no wonder, that's because your compare here always returns false : [1]: i.sstatic.net/RwIAI.png $\endgroup$
    – Chris
    Commented May 18, 2022 at 7:36
  • 1
    $\begingroup$ it took me a while - you have chosen the wrong input type. Here: [1]: i.sstatic.net/QTqs8.png please delete frame start as input there, press + again and choose integer, then rename to framestart and plug the frame back in. Same on the other expression with framestart. if you made it right, the input will turn purple: [1]: i.sstatic.net/DUfvb.png $\endgroup$
    – Chris
    Commented May 18, 2022 at 13:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .