Problems with Feedbackloop...

Hi,

I tried to controll a motorfader with a feedbackloop. When just sending the feedbackloop, the faders dont stop fireing messages and the fader gets stuck. Therefore I have to kill the feedbacksignal from the DAW, if I move the controller and vice versa.

I got it working with four translators for one fader, but with some problems.

Here´s my Code:

 

translator 1 (controller to DAW)

Incoming:

B0 66 pp

Rules:

if ga==1 then exit rules, execute Outgoing Action

exit rules, skip Outgoing Action

Outgoing:

B0 66 pp

 

translator 2 (controller to DAW)

Incoming:

B0 66 pp

Rules:

if ga<1 then ga=1

exit rules, execute Outgoing Action

Outgoing:

None

 

translator 3 (DAW to controller)

Incoming:

B0 66 pp

Rules:

if ga==0 then exit rules, execute Outgoing Action

exit rules, skip Outgoing Action

Outgoing:

B0 66 pp

 

translator 4 (DAW to controller)

Incoming:

B0 66 pp

Rules:

if ga>0 then ga=0

exit rules, execute Outgoing Action

Outgoing:

None

 

So far everything works fine (perfect, if I move the fader in the DAW), but here and there the code does not surpress the Signal properly, when I move the motorfader, and it gets stuck for a moment.

I also want to controll lots of faders and then I would run out of variables (ga), for every fader needs another one (otherwise they get stuck very often).

Im not very familiar with coding, so I have no idea for an elegant and relyably working solution. Would be great if somebody experienced could help here...

Thanks!

 

 

 

Hi, I'm not sure what DAW you are using but I think the general strategy is if you are moving the fader with the DAW, you want to disable fader movement with the controller.  However, if you are moving the fader with the controller, you want to temporary disable feedback from the DAW. The controller should take precedence.  The key question I have is does your DAW provide fader feedback? If so you can still capture it but do not let it go through to your controller while you are moving it with your controller.

If you use bitmapping, you can use 1 global variable for managing control of up to 32 faders. 

I think the way I would set it up is when you start moving a fader on the controller, you set a the bit for that fader to a 1,  When that bit is a 1, then you capture but not forward the DAW feedback to your controller. When you stop moving the controller fader, you have a watchdog timer set the bit back to a 0, and then signal the DAW to send back the currently captured value (so that the fader doesn't move back to its original position).

For capture fader feedback from the DAW, the simple way is to capture each fader in a different global variable but you really could also bitmap that as well so that you could caputer 4 fader values in a single global variable (28 out of 32 bits). 

I agree that this is a bit complex (with all of the bitmapping).  I can create an example without bitmapping for a single fader if you would like to test that. This would be part of Bome Free support.  If you want a bitmapping example for up to 32 faders,  I could do that for a fee. Just send me an email.

Stay tuned and I'll put an example with 1 fader not using bitmapping. It might take 1/2 hour to put it together for you.

 

Steve Caldwell
Bome Customer Care


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

Hi, here is an example that I used with my Motor 49.

You will need to change the MIDI CC# and channel on the translators, however after that it should work.

For Controller to DAW Preset  I have 2 translators

The first send through the control change to the DAW and sets the busy flag (ga) to 1

The second starts a watchdog timer for 500ms

For DAW to controller I have 2 translators

The first set the busy flag (ga) back to 0 (if the controller has stopped movement). If it has stopped movement, it will send the fader value from the DAW (gb) to the controller.

The second will capture the value from the DAW, if you are not moving a fader it will send it to the controller, otherwise, it will just capture the value in gb.

To test, I used Ableton Live 10 with generic manually mapped MIDI controller on fader 1.

 

 

I hope this helps!

Steve Caldwell
Bome Customer Care


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


Attachments:
1591991024477_Motorized-Fader1-Example-2020-06-12.bmtp

Hi Steve,

i did send you this e-mail:

that sounds great. Actually I don´t know what bitmapping is, but I will look it up. I would appreciate to get this example for one fader. If i can´t manage the bitmapping by my self, I surely would pay for it, if it is not to expensive for my budged and if will work properly.

To answer your key question, yes, I did manage that the DAW sends feedback. Otherwise my script would not work at all. Suppressing it, is the concept I wanted to achieve, but it seems that it has to be done in a more elegant way than I did.

If the fader on my controller does not get a value at all, after a fade, it does not move back to its original position. It just stays where it is. so that last signal you are talking of should not be necessary. Probably it would even confuse the fader, if I stop for a short while, and then directly fade again. My controller just needs a value from the DAW, when I, or the automation moves it in the DAW. The DAW fader does not need that as well. Both of them you can operate with a one way street. But I would like to have both options without having to switch between Translators. If one side is talking, the other one should keep still and should not repeat anything until it has to say something by itself. So, only if a change is made by mouse or keys, it should transmit immediately. And vice versa if I push a fader. I do not need a confirmation of the received value, because they are perfectly in line.

So, what I do not understand, is why you would use different code from controller to DAW than vice versa. Why a single variable can control just 4 fader, if from controller to DAW it can handle 32?

Thanks, and looking forward for your reply…

We could use a single bit (32 bits) as a busy flag to let the DAW know it is moving.
For fader value capture, each CC would keep 7 bits so for 4 faders (4x7 or 28) out of 32 for the fader value.
The difference is the fader value will consume 7 bits while the busy flag just one.
I already posted a 1 fader example without bit mapping.

Steve Caldwell
Bome Customer Care

Hey Steve,

that helped. For one fader I have everything set.

I had to bring your and my code together to get it working. For fader movement, switching between signals and the killing of the feedback I needed all my code. Your Move Fader Translators all went into the bin. Your Move Fader 1 (Watchdog start) was set to an initial delay of 50 ms. Your Watchdog Outgoing was set to none - otherwise the fader jumped back to -inf, when timer was at end. You find the Mod below.

Now everything is smooth and precise. Just when I double-click on the fader in the DAW (sets it to 0), then the Motorfader jumps sometimes, sometimes not. That should not be a problem if we don´t solve it.

But now the Multifader-Script has to be written. I still have no idea of what you´re talking about.

Thanks, Boris


Attachments:
1592001075538_Modification_Motorized-Fader1-Example-2020-06-12.bmtp

Well glad you got it working. In my script, I think you probably did not need to capture the DAW input into a global variable since the fader did not jump back to 0.  Other than that it should have worked.  There are many strategies that you can use and this is just the one I happened to choose.   

 Later I'll take a look at what you did and see if I see any issues.  I'm not sure what a double click of the fader does on your DAW. Maybe it is set up to reset the fader to 0.

Steve Caldwell
Bome Customer Care


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

Yes, it sets it back to 0. But this I solved it with a second Timer 100 ms, sets ga=1 (first is 50 ms, sets ga=0).

I also tried to use a variable for the CC#, but it´s still not working for several fader if they are moved simultaneously. It´s a problem in both ways (DAW to Controller and vice versa). So I guess we have to go into bitmapping. First I inform myself about that procedure, then I will contact You again if I need help and we will find a good deal.

Here is the modded Mod:


Attachments:
1592044778460_Modification_2_Motorized-Fader1-Example-2020-06-12.bmtp

Hey Steve,

well, I´m not very lucky in finding something about the basic term bitmapping in programming. Everything I google is about pictures, no basic explanations of that procedure. So, it´s very hard for me of getting a sense of what you are up to. Do you have any recommendations on tutorials for what you want to achieve with bitmapping?

It would also be very helpful to see an example of bitmapping done in MIDI Translator...

Thank you,

Boris

Hi Boris,

This is not really a forum for general education on how computer data values are stored and manipulated on computers but I will give you an overview.

Numbers in computers are stored in Binary format with various bit lengths. Each bit represents a value.

For example on an 8 bit number you have bits 0-7 where bit 1 set represets a value of 1, bit 2 a value of 4 and so forth. Each bit as you move right to left is 2 times that of the previous bit (hence the term binary).

So for an unsigned 8 bit value of 1111 1111 binary represents a value of 255.

Bome variables are all 32 bits long, so if you want to represent the on/off state of various switches, you have 32 bits to work with in a single global variable and you can use each of these bits to represent a given logic state 1 or 0

So say I want to handle 8 logic values I simply use one of these bits for each value I want to evaluate.

There are operators in MT Pro that allow me to manipulate these bits. Bit shift Right, Bit Shift Left, Bitwise And, Bitwise OR and Bitwise Exclusive OR.

In a nutshell, I use this to leverage using less global variables in MT Pro.

If you search on bit map in Bome Forum, you should find some examples.

Here are a few examples, but if you are still lost, then chances are you are a long way from doing it yourself.

https://www.bome.com/support/kb/high-bitmapping

https://www.bome.com/support/kb/bitwise-how-much-do-i-gain

 

Steve Caldwell
Bome Customer Care


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

 

Hey Steve,

thanks a lot for the education. But I think I will use a different way. It should be much more simple for me to just use different variables for each CC message. I just realised that there are much more variables available in MT Pro than I thought.

I had to create another solution for the turning knobs, wich is much more simple by the way.

Code for the Pan Knob looks like this:

 

translator 1 (controller to DAW)

Incoming:

B0 40 k0

Rules:

if k0==ha then exit rules, skip Outgoing Action
ha=k0

Outgoing:

B0 40 k0

 

translator 2 (controller to DAW)

Incoming:

B0 40 k0

Rules: -

Outgoing:

None

 

translator 3 (DAW to controller)

Incoming:

B0 40 k1

Rules:

if k1==ha then exit rules, skip Outgoing Action
ha=k1

Outgoing:

B0 40 k1

 

translator 4 (DAW to controller)

Incoming:

B0 40 k1

Rules: -

Outgoing:

None

 

For the mute push buttons I also had to come up with a different solution, because I had to invert the on/off signal, which was quite a bit brain twisting in combination with the loop cancelation.

Here´s the code for the push buttons:

 

translator 1 (controller to DAW)

Incoming:

B0 29 l0

Rules:

ma=l0
if ma==0 then l0=127
if ma==127 then l0=0
if mb==l0 then exit rules, skip Outgoing Action
mb=l0

Outgoing:

B0 29 l0

 

translator 2 (controller to DAW)

Incoming:

B0 29 l0

Rules: -

Outgoing:

None

 

translator 3 (DAW to controller)

Incoming:

B0 29 l0

Rules:

ma=l0
if ma==0 then l0=127
if ma==127 then l0=0
if mb==ma then exit rules, skip Outgoing Action
mb=ma

Outgoing:

B0 29 l0

 

translator 4 (DAW to controller)

Incoming:

B0 29 l0

Rules: -

Outgoing:

None

 

So, thank you for the Watchdog Timer without it the fader thing would´nt work. I had to adjust the timing and build a double gate. Now everything is fine.

I will post my solution for everyone running into a familiar problem. This script is working flawlessly with Yamaha AW 4416 and Reaper. It is an example for two fader, two knobs an two reversed push buttons. Now I will have a very nice midi controller and I´m very happy...

Boris


Attachments:
1592165482012_Fader-Knobs-and-Buttons-Feedback-control-Example-2020-06-13.bmtp

Sounds good Boris. As I said there are probable a lot of ways to solve for your situation. I’m glad you found a solution!

Steve