# Modify pitch bend behavior

**URL:** <https://forum.bome.com/t/modify-pitch-bend-behavior/6955>\
**Category:** Bome Products\
**Created:** [January 28, 2025, 2:30am UTC](https://forum.bome.com/t/modify-pitch-bend-behavior/6955 "2025-01-28T02:30:14Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![lepapillonbleu](https://forum.bome.com/user_avatar/forum.bome.com/lepapillonbleu/32/5173_2.png) [@lepapillonbleu](https://forum.bome.com/u/lepapillonbleu)\
**Post date:** [January 28, 2025, 2:30am UTC](https://forum.bome.com/t/modify-pitch-bend-behavior/6955/1 "2025-01-28T02:30:14Z")

</div>

Hi Steve.

My pitch bend range goes from -8000 up to +16000.  
I can translate it to CC quite easily (using pp=pp\>\>7)

However is there a simple rule so the highest CC value (127) stands at the 0 point (when the pitch bend is centered) and then decrease when the pitch bend goes to the extremities ?

In some way reversing the behavior and getting the CC highest values when the pitch-bend is centered ?

Thank you

Kind regards

---

<div class="post-metadata">

**Author:** ![SteveC](https://forum.bome.com/user_avatar/forum.bome.com/stevec/32/8250_2.png) [@SteveC](https://forum.bome.com/u/SteveC)\
**Post date:** [January 28, 2025, 3:12am UTC](https://forum.bome.com/t/modify-pitch-bend-behavior/6955/2 "2025-01-28T03:12:47Z")

</div>

Hi, usually pitch bend is -8192 to +8191 if measure as bipolar and 0 to 16383 if measured as absolute. Are you saying that you want an incoming pitch bend to be at CC value of 127 at the mid point and going towards 0 as it goes in either direction from there?

This would be a basic math exercise but before I go through the calculations I want to confirm that this is what you are looking for. In this case, how would the target device determine whether the value is going up or down?

min = 0  
mid = 127  
max = 0

Steve Caldwell  
Bome Customer Care

* * *
_Also available for paid consulting services: bome@sniz.biz_

---

<div class="post-metadata">

**Author:** ![lepapillonbleu](https://forum.bome.com/user_avatar/forum.bome.com/lepapillonbleu/32/5173_2.png) [@lepapillonbleu](https://forum.bome.com/u/lepapillonbleu)\
**Post date:** [January 28, 2025, 5:34am UTC](https://forum.bome.com/t/modify-pitch-bend-behavior/6955/3 "2025-01-28T05:34:03Z")

</div>

My bad, Steve, that’s exactly what I initially meant (8192 to +8191), and yes, you got it right :

min = 0  
mid = 127  
max = 0

"CC value of 127 at the mid point and going towards 0 as it goes in either direction from there "😉

Thank you

---

<div class="post-metadata">

**Author:** ![SteveC](https://forum.bome.com/user_avatar/forum.bome.com/stevec/32/8250_2.png) [@SteveC](https://forum.bome.com/u/SteveC)\
**Post date:** [January 28, 2025, 5:59am UTC](https://forum.bome.com/t/modify-pitch-bend-behavior/6955/4 "2025-01-28T05:59:00Z")

</div>

OK

Incoming - Pitch bend on MIDI CH1 any value set to qq

Rules:

```auto
Log "Incoming value=%qq%"
qq=qq>>6
if qq>127 then tt=256-qq
else tt=qq
// Make sure it doesn't go out of bounds
if tt<0 then tt=0
if tt>127 then tt=127
Log "Outgoing value=%tt%"

```

Outgoing - CC7 on MIDI CH1 value tt

I currently have no way to test this because I’m working on my Chromebook.  
Hopefully I got it right

Steve Caldwell  
Bome Customer Care

* * *
_Also available for paid consulting services: bome@sniz.biz_

---

<div class="post-metadata">

**Author:** ![lepapillonbleu](https://forum.bome.com/user_avatar/forum.bome.com/lepapillonbleu/32/5173_2.png) [@lepapillonbleu](https://forum.bome.com/u/lepapillonbleu)\
**Post date:** [January 28, 2025, 8:20am UTC](https://forum.bome.com/t/modify-pitch-bend-behavior/6955/5 "2025-01-28T08:20:41Z")

</div>

> [@SteveC](#):
>
> ```auto
> Log "Incoming value=%qq%"
> qq=qq>>6
> if qq>127 then tt=256-qq
> else tt=qq
> // Make sure it doesn't go out of bounds
> if tt<0 then tt=0
> if tt>127 then tt=127
> Log "Outgoing value=%tt%"
> 
> ```

Just wondering if you find some time to sleep every now and then 😁

Checked it.

It doesn’t really work : values in the down position are null, values only start to increment from the center point (value :0) up to the end of the fader upwards (value :127)

Tried to modify it with my limited knowledge, the only snippet that come close would be that one :

Log ‘Incoming value=%qq%’  
qq=qq\>\>-127  
if qq\>127 then tt=256-qq  
else tt=qq  
// Make sure it doesn’t go out of bounds  
if tt\<0 then tt=0  
if tt\>127 then tt=127  
Log ‘Outgoing value=%tt%’

Of course I did certainly wrong, and it might well be pure casualty playing with values, as the curve is pretty steep, starting very close to the center point (on my 100mm fader, it starts to increment 5mm before the center point, and completely fades out 5mm after the center point). Can I improve it ?

However the max value is at the center point.

---

<div class="post-metadata">

**Author:** ![SteveC](https://forum.bome.com/user_avatar/forum.bome.com/stevec/32/8250_2.png) [@SteveC](https://forum.bome.com/u/SteveC)\
**Post date:** [January 28, 2025, 3:22pm UTC](https://forum.bome.com/t/modify-pitch-bend-behavior/6955/6 "2025-01-28T15:22:56Z")

</div>

Hi,

For the most part the rules were right. Please find the attached.

I also created a timer so that you can push a button and the timer would iteration across the entire range Pitchbend timer (translators 1.2) is triggered y by translator 1.1 and goes through the entire range.

If you filter your log window by ‘IN=’, then you can see the incoming and outgoing values.

 ![image](https://forum.bome.com/uploads/default/original/2X/a/ae87bbd300dfd3a213f64bb6406dd9d24a81f945.png)

[PBtoCC-mod-2025-01-28.bmtp](https://forum.bome.com/uploads/short-url/8CTXm1lJ2JWTB1ZdAN4E665i6Yl.bmtp) (2.5 KB)

Steve Caldwell  
Bome Customer Care

* * *
_Also available for paid consulting services: bome@sniz.biz_

---

<div class="post-metadata">

**Author:** ![lepapillonbleu](https://forum.bome.com/user_avatar/forum.bome.com/lepapillonbleu/32/5173_2.png) [@lepapillonbleu](https://forum.bome.com/u/lepapillonbleu)\
**Post date:** [January 28, 2025, 8:01pm UTC](https://forum.bome.com/t/modify-pitch-bend-behavior/6955/7 "2025-01-28T20:01:51Z")

</div>

Wow ! 🙂 Thank you so much Steve. Will give it a try now and let you know how it goes 😉

---

<div class="post-metadata">

**Author:** ![lepapillonbleu](https://forum.bome.com/user_avatar/forum.bome.com/lepapillonbleu/32/5173_2.png) [@lepapillonbleu](https://forum.bome.com/u/lepapillonbleu)\
**Post date:** [January 29, 2025, 10:29am UTC](https://forum.bome.com/t/modify-pitch-bend-behavior/6955/8 "2025-01-29T10:29:06Z")

</div>

Hi Steve, it seems to work quite well, thanks again 🙂.  
However how can we reverse the behavior ?  
How can we get the 127 values at both extremities, null at center ?  
Kind regards

---

<div class="post-metadata">

**Author:** ![SteveC](https://forum.bome.com/user_avatar/forum.bome.com/stevec/32/8250_2.png) [@SteveC](https://forum.bome.com/u/SteveC)\
**Post date:** [January 29, 2025, 3:42pm UTC](https://forum.bome.com/t/modify-pitch-bend-behavior/6955/9 "2025-01-29T15:42:28Z")

</div>

Hi, add this rule

```auto
// reverse polarity here added rule
tt=127-tt
Log "In=%rr% Out=%tt%"

```

Steve Caldwell  
Bome Customer Care

* * *
_Also available for paid consulting services: bome@sniz.biz_

---

<div class="post-metadata">

**Author:** ![lepapillonbleu](https://forum.bome.com/user_avatar/forum.bome.com/lepapillonbleu/32/5173_2.png) [@lepapillonbleu](https://forum.bome.com/u/lepapillonbleu)\
**Post date:** [January 29, 2025, 4:52pm UTC](https://forum.bome.com/t/modify-pitch-bend-behavior/6955/10 "2025-01-29T16:52:08Z")

</div>

Huge thanks to you Steve !!! Amazing 😀 ⭐ ⭐ ⭐ ⭐ 🙏 🙏 🙏 💥 💥 💥
