Control Chain Actuator Mode - TAP_TEMPO

Hi There,

I am trying to add tap tempo support to my Control Chain accessory and I get this error in the UI when trying to assign the BPM to a control chain control:

image

But I am defining my actuators with the following supported modes:

CC_MODE_TOGGLE | CC_MODE_TRIGGER | CC_MODE_OPTIONS | CC_MODE_TAP_TEMPO | CC_MODE_MOMENTARY

What else do I need to do to let my actuator control tap tempo?

FYI - I am running firmware version 1.8.5.1103 (because 1.9.3 seems to make my unit lock up).

Thanks,
Mark

This is not supported in mod-host and mod-ui projects, it is a feature coming in v1.10 only.
Are you running Duo or Duo X? I can send you an early build in PM so you can keep development for this.

Ah. Thanks @falkTX. I am running a Mod Duo X. It would be interesting to test this out. When is v1.10 due out?

I am also seeing another weird problem with long option lists assigned to a button. I don’t have a real Mod footswitch to test this out, but it seems like sometimes I get a parameter error and I am wondering if it is because my acknowledge is not getting back to the host fast enough. Is there a timeout on this? I’m trying to debug this today. It works for short option lists (~6 or less) but fails intermittently for longer ones. It looks like my footswitch gets the assignment and sends the ACK but sometimes the host thinks something went wrong.

1 Like

big lists is for sure a problem in Control Chain.
we had the same issue with the main device controller, which we solved by using pagination.
This has not been done for Cotnrol Chain yet, but it is in our plans. We tried to push it for v1.10, but Dwarf took higher priority. So likely something for v1.11
Slow devices get kicked out yes.

I will send you a PM with a fresh 1.10 build, do note it still experimental and has to go through the usual RC phase.
To be released very soon, in January.

4 Likes

Good to know! And thanks for the link @falkTX!

Hi @falkTX - so I have tried this and updated my code to implement tap tempo.

The good news is that I can indeed assign tap tempo to my actuators now. However, when I get the assignment from the Mod Duo X, the assignment mode seems incorrect. Here is the assignment I receive:

Actuator assignment received: {'steps': 260, 'max': 280.0, 'mode': 16, 'unit': 'BPM', 'id': 0, '_def': 0.0, 'list_index': 0, 'label': 'Beats Per Minute', 'actuator_id': 0, 'min': 20.0, 'value': 150.0, 'list_items': []}

Mode 16 is CC_MODE_REAL. Since I am expecting an assignment mode of 8 (CC_MODE_TAP_TEMPO) my code that implements tap tempo never gets triggered. So perhaps this is not 100% implemented on the Mod Duo X side yet? Unless I am missing something?

Thanks,
Mark

1 Like

Might be an oversight somewhere, but I remember this working.

The mod-host part is implemented:

And haha, I see the issue!

A silly copy&paste mistake, will correct and do a new build, thanks for the early report! :sunglasses:

4 Likes

OK, so this seems to work and I have updated my code and have tap tempo implemented. Cool!

However, I still get this whenever I make the assignment. But it seems to assign properly and function.

image

That is the same error I see when assigning long lists, so I am wondering if is related (and due to timing). I could also be doing something wrong. But I will continue to play with it and debug. Thanks for the help, @falkTX!

3 Likes

Looks like this is my code…I must’ve changed something because this happens often now (even with the old DuoX firmware). I’ll need to bisect it.

OK, I can’t seem to figure this out. I now have unreliable behavior where sometimes my assignments work fine and other times they fail with the error: “Bug! Couldn’t address parameter, not allowed”. I thought it was a timing problem, but I am responding with the ACK in about 50ms. The control chain response timeout as far as I can see is 100ms.

When I get the error, I also see this in the browser console: Addressing failed for port :bypass hardware.js?v=1.8.5.1103:729

I don’t know where the port :bypass is coming from. Is there anything I can do to help debug this problem? Maybe some more verbose output?

1 Like

yes, ssh into the unit and run this:

systemctl stop mod-ui
hmi-reset
MOD_LOG=1 mod-ui.run

you will see all the logs related to the web UI / server

2 Likes

Doing some more debugging and running the control chain daemon in debug mode I am occasionally hitting a timeout on assignment:

[cc-lib] assignment received (id: 2)
[cc-lib]   requesting assignment to device (id: 2)
SEND: device: 1, command: assignment, data size: 38
      data: 02 02 07 5A 61 6D 43 6F 6D 70 00 00 80 3F 00 00 00 00 00 00 80 3F 00 00 80 3F 01 00 00 00 21 00
            04 6E 6F 6E 65 00
      text: ZamComp???!none
---
[cc-lib]   assignment timeout (id: 2)
RECV: device: 1, command: assignment, data size: 0
      data:
      text:
---

Looks like I am just on the ragged edge and just missing it sometimes now that I have implemented tap tempo and am doing more calculations. Is there any way it can wait longer thank 100ms? If not, I will need to look at how I can speed up my code. I think this is the same issue I am seeing for long lists as I initially posted about a year ago.

2 Likes

Actually, I think I know of some pretty silly additional queuing that I introduced recently that is not helping this situation. I will refactor that first.

3 Likes

@mark_melvin hey, i’m really appreciating this detailed discussion; looking to implement some Control Chain builds soon, so discussions like this are really helpful!

thanks a lot! :slight_smile:

3 Likes