Merge / sum controllers

Wondering how I might approach merging two controllers into one controller output - I have a pedal modulating CC11, and I’d like to have channel AT adding CC11 value to the pedal. Both would need to work simultaneously (and independently), basically summing their values to a max limit of 127, discarding overs. Thanks for assistance.

Hi,

Please find the attached.

The first translator takes CC11 from your pedal and populates the global variable ‘ga’ with the value.

The second translator takes CC11 from Channel AT and populates the value of ‘gb’.

The outgoing action of both triggers the third translator which adds ga and gb together. Of course the Maximum value will now be 254 so we scale it down to 127 and output the final value to the application.

For testing, I have the aliases set up as follows:

image

You can learn more about aliases from this tutorial.

You can see a tutorial on scaling here.

The rules on translator 0.2 look like this.

Log "Controller 1=%ga% Controller 2=%gb%"
pp=ga+gb
Log "Log Sum =%pp%"
// Scale it from 254 to 127
pp=pp*128
pp=pp/256
Log "Log Normalized sum=%pp%"

SumCC11.bmtp (1.8 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Thank you, that solved it. I hadn’t used perform actions yet, very useful. This is the rule that worked for me:

pp=ga+gb
if pp > 127 then pp = 127

1 Like