Reset encoder value to zero on press

This should be an easy one i hope lol.

I set up a press / release function on the button aspect of the encoder.

On press, it sends out a value of 0 to where I want and that works great.
I’d like it to reset the value of the encoder to 0 on release. I thought it made sense to just change the value of “eval” in the release section to 0 but it doesn’t do anything.

Certainly I am missing something easy?

This should be easy but I’m struggling with the context. You need both the press and release to send ‘0’? What’s the use case? What are you controlling?

So I’m controlling the delay send on the octatrack, everything is great.
I press the encoder to take the value of the send down to zero, that works great.
But then the next time i move the encoder, it starts from the last place it was on the octatrack before the encoder press went to zero, which is also the last known point given to it by my knob twisting. So i figured if i could reset the value on the grid on the button release then i can start at zero again.

1 Like

Ok. Understand now. I’m in the go for a bit but that should be easy enough to do. I’ll post something when I have a moment. What’s the CC for delay send? Just I can write something relevant.

Edit: You can use self:encoder_value(0) (or maybe self:encoder_value() = 0) to set the value back to zero. You just need to add that in the appropriate block. What type of action blocks are you using for your code?

awesome thanks! cc is 45

i was using the “press / release” function on the button page of the encoder, with the press setting the octatrack to zero

I don’t know the full context, but adding an action block under your MIDI action block in the press/release with the self:encoder_value(0) code snippet should set the encoder to value 0, so on next turn it will start from 0.

Thank you that worked! Much appreciation!