Relative encoder midi cc to midi cc with inc/dec with middle 64

Hi All,
I don’t find the solution to map my midi encoder to act like dec when scrolling left and inc when scrolling right.
I want to use my encoder in my daw to set pitch slider which has a default value Pitch +/- 0.
Additionally the encoder has button, so setting up to send a 64 value to reset my pitch would be also nice.

Thanks for advance for any help,


The following should do the trick. I use the global variable ga to track the current pitch bend amount.
// incoming value is qq
// first subtract 64 to get to relative position of 0
// multiplier for faster response (optional(
// add to last known value of ga to come up with new amount

// don’t allow exceeding of limits

if ga<-8192 then ga=-8192
if ga>8191 then ga=8191

// output will be pitch bend at amount of ga

For the button I just reset ga to 0 when pushed.

Here is the project file.

Rel-CC-to-Pitch Bend.bmtp (1.5 KB)

Steve Caldwell
Bome Customer Care

Also available for paid consulting services:

Thank You Steve!
Works smoothly.