Hold last value

This might be an easy one, but I couldn’t work it out or find a result here!

What I’m looking for is a modifier that will hold last given value.

So if I hit a midi note that tells it “3” that continues to pass 3 along the chain until it receives another message.


I’m gonna leave this here incase anyone has a modifier based answer, but for me the answer was the javascript node.

1 Like

3 methods:

If you open the Convert to Radio Buttons bin there is actually a setup for this, I’ve stripped it down slightly for this screen shot.

The workflow is quite simple - the execute child node is executed first as the parent, so it tells the null to activate and receive the number from the condition. When the condition de-activates, the execute child deactivates first so the null doesn’t update to pick up the extractor position, therefore, the value is held.

The simplest approach would be this :

The accumulator here just picks up the value in from the conidition, and just loops between 0-1 depending on the condition. converting to 3 could be done a number of ways, either multiply after the fact or set the max value to 6.

Finally, as you found, Javascript is a totally viable solution here too. Personally I wouldn’t because of the above two options, but I dont see any issue with js here either.

– Ryan