# APC40 absolute to relative

**URL:** <https://forum.bome.com/t/apc40-absolute-to-relative/4466>\
**Category:** Bome Products\
**Tags:** bomes, apc40, ableton\
**Created:** [August 14, 2022, 1:21pm UTC](https://forum.bome.com/t/apc40-absolute-to-relative/4466 "2022-08-14T13:21:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon.cornelisse](https://forum.bome.com/letter_avatar_proxy/v4/letter/l/dc4da7/32.png) [@leon.cornelisse](https://forum.bome.com/u/leon.cornelisse)\
**Post date:** [August 14, 2022, 1:21pm UTC](https://forum.bome.com/t/apc40-absolute-to-relative/4466/1 "2022-08-14T13:21:42Z")

</div>

Hi everybody, I’ve got an Akai APC40 mk1 and I want to use the track control encoders to send out relative values. That way I could use STC (selected track control) to control parameters of any track I select in Ableton.

I’ve found the Bome script below in older threads about absolute/relative cc’s and tried it. It kind of works, but it basically swallows values 2-126 and when you use the knob you can feel the gab/delay that makes. I’m not a programmer (at all), but I was thinking, would it be possible for Bome (BMTpro) to remember the last previous value? That way the current vlaue and the previous value could be compared. A left turn (for example value 71 to 70 would be decrease output and a right turn (for example value 22 to 23) would be an increase. Something like this (sorry for the noob terms used):  
midi input value is pp  
previous value is pv (action to remember previouw value?)  
rules:  
if pp\>pv, output = value 127 (increment / +)  
if pp\<pv, output value 1 (decrement / -)  
if pp = 127, output = 127 (increment / +)  
if pp = 1, output = 1 (decrement / -)

Will something like this be possible? If so, how would you go about it?

Thanks,

Leon

This is the script used in older topics about absolute to relative cc:

> Translator 0: turn left  
> Options: stop=false  
> Incoming: MIDI B0 30 pp  
> Rules:  
> gd=pp-ga  
> ga=pp  
> if gd\>=0 then exit rules, skip Outgoing Action  
> Outgoing Message: B0 30 3F
> 
> Translator 1: turn right  
> Options: stop=false  
> Incoming: MIDI B0 0E pp  
> Rules:  
> if gd\<=0 then exit rules, skip Outgoing Action  
> Outgoing Message: B0 40 41

---

<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:** [August 14, 2022, 5:41pm UTC](https://forum.bome.com/t/apc40-absolute-to-relative/4466/2 "2022-08-14T17:41:58Z")

</div>

Hi and welcome to the Bome community!

Did you look at [this tutorial](https://youtu.be/VCvxPZawJyE)?

Steve Caldwell  
Bome Customer Care

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

---

<div class="post-metadata">

**Author:** ![leon.cornelisse](https://forum.bome.com/letter_avatar_proxy/v4/letter/l/dc4da7/32.png) [@leon.cornelisse](https://forum.bome.com/u/leon.cornelisse)\
**Post date:** [August 15, 2022, 7:13pm UTC](https://forum.bome.com/t/apc40-absolute-to-relative/4466/3 "2022-08-15T19:13:29Z")

</div>

Hi Steve,

Thanks, I saw those and the other threads about absolute to relative midi cc’s. I’ve tried it and it didn’ t work for me at first. When reaching 1 or 127 value, the APC keeps trigger the value as long as you keep turning the knob. But somehow the output stops when 127 (or 1) is reached. I looked at the monitoring in BMT. The incoming signal keeps firing, and so does the timer. But the output stops after a while. I don’ t really know what I am doing here but I changed the repeat count of the timer to 2. And now it works for rotary knobs in Ableton (like sends) perfectly. Somehow the range on the volume faders still isn’t enough and it stops just over half way. But that’s okay. I’m already very happy with controlling sends of all tracks with a single knob. 😃

Thanks for the quick reply. Maybe this could be useful for other poeple using Ableton and the APC.

---

<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:** [August 15, 2022, 10:49pm UTC](https://forum.bome.com/t/apc40-absolute-to-relative/4466/4 "2022-08-15T22:49:12Z")

</div>

Maybe this will work better for you. In this version we do not use timers. I’ve set up a translator for a knob (endless encoder). I think the APC-40 will continue to send 127 if turning to the right and 0 if turning to the left.

For the fader, I still have a bypass button but still no timers.

I set up for my APC-40 MK2 with the following aliases.

Each fader or knob requires a different global variable. I used ga for the knob and ha for the fader and ia for the fader bypass.

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

[APC-40-Knob and Fader - Absolute to Relative.bmtp](https://forum.bome.com/uploads/short-url/vviK4NGItRJSw1mDCrULyVhnTRb.bmtp) (1.9 KB)

Let me know if this works better for you.

Steve Caldwell  
Bome Customer Care

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

---

<div class="post-metadata">

**Author:** ![leon.cornelisse](https://forum.bome.com/letter_avatar_proxy/v4/letter/l/dc4da7/32.png) [@leon.cornelisse](https://forum.bome.com/u/leon.cornelisse)\
**Post date:** [August 16, 2022, 8:08am UTC](https://forum.bome.com/t/apc40-absolute-to-relative/4466/5 "2022-08-16T08:08:47Z")

</div>

Yeah! Thanks, this works great. I adjusted the output to 125 and 3, that way the knob has the right speed/calibration and one turn is enough to use the whole fader in Ableton. Selected Track Control lets you adjust the output you send so 127 and 1 is too precise (needs more knob tweaks to complete the whole fader movement). 125 and 3 work great. Thanks Steve! 😃

Don’t know if a link is allowed here, but for anyone interested in STC: [http://stc.wiffbi.com/midi-implementation-chart/](http://stc.wiffbi.com/midi-implementation-chart/)
