Increment/ decrement and adjusting range of an absolute controller

Terence LLoren

2020-10-28 01:36:30

Hi!

I have a controller that outputs absolute values (0-127)

I want it to control a target parameter that has 778 values.

According to the midi output of the target parameter, it outputs two values when it is turned:

Minimum value:

BE 1D 00 (00-127)

BE 1A 00 (00-1F)

The max value output of the target parameter is:

BE 1D 06

BE 1A 1F

 

When the first line value passes 127, it loops back to BE 1D 00 and increments the second line value by 1.

My question is how to map this so that it will use the full range (as much as possible) of my source controller. I watched some increment and decrement, and absolute/relative videos but I am kind of lost when combining the two especially with the added complexity of the two line code.

Thanks!

Steve-Bome Forum Moderator

2020-10-28 04:40:27

OK, first of all a few questions:

 

Does you absolute controller rotate 360 degrees or does it stop at 0 and 127 where you cannot turn any further.

If, it doesn't have stops as described above, what happens if you keep rotating right after reaching 127, does it continue to put out values of 127 as you move further right or does it go silent?

 

Same question for rotating left. Does it continue putting out 0 or just stop sending MIDI messages.

 

The above questions are key to knowing if you will be able to do what you want to do. Hopefully if your answers are 360 degrees while continues 127 (right) and 0 message (left), then I think we can be in business. If not, We can still send the range of 778 but the resolution will be lower it would put out increments or decrements of 6 instead of 1  (778/128).

Also you indicate that the largest value is 1F (MSB) and 06 (LSB) which means the high end of the range is 7942 and not 776, so this is quite confusing (1F06 Hex is 7942 Decimal).

If this is the case, the resolution would be 7942/128 or 26 between steps.

Let me know the answers to my questions before we proceed with a possible solution.

Steve Caldwell
Bome Customer Care


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

Terence LLoren

2020-10-28 13:55:01

comment

Hi Steve, 1) The absolute controller in this case is a fader so it is physically limited from 0-127. Though the infinite knob values of the mixer only go from 0 (left) to 127 (right) and stops outputting messages when it reaches 0 or 127. Thanks!

Steve-Bome Forum Moderator

2020-10-28 14:02:48

comment

OK, could you double check the range you need? Maybe B0 1D is only between 0 and 1F instead of 0 and 7F? What is the target control application? This format seems highly unusual.

Terence LLoren

2020-10-28 14:14:15

comment

This is from a parameter in one of the built in effects of the DM1000. Sorry, I wrote it backwards in my first post. It should be: BE 1D 00-06(max) BE 1A 00-7F So when 1A value reaches 7F, it loops back to 00 and increments the 1D value by 1. The maximum 1D value for this parameter is 06.

Steve-Bome Forum Moderator

2020-10-28 17:11:08

OK, something like the attached should work although the precision is 7 steps per click.

 


Attachments:

DM1000-Parameter-2020-10-28.bmtp

Terence LLoren

2020-10-29 03:01:52

That did it! Great one Steve!

I researched a bit about bitshift operators and now I finally understand the rules you made! It all seems so much clearer now. I will try this out on other similar parameters with different ranges for more practice and see how it goes.

I have a question about the use of some of the rules:

debug. how does the program know when to debug? Do we need it? because I dont see zz anywhere in the input and output messages so this is a bit confusing.

Thanks!

 

Steve-Bome Forum Moderator

2020-10-29 04:47:53

comment

The zz variable and debug is just a way I use to test an upcoming feature of MT Pro. I'm running 1.8.5 beta and testing this out. There are other (probably cryptic) rules later down that in 1.8.5 will provide some interesting and useful logging techniques to help better track what things are doing. This should make it easier for debugging as you build your project file.