Hi there! This is probably to @ricardocrudo as the author of cc-arduino-lib, or whoever can help me out. Is it my poor c++ skills (they really are poor), or I’m getting an impression that not all the control chain protocol (as described here) is implemented in the library?
A more specific question: what combination of an actuator config parameters shall I use to replicate the behaviour of the MOD Dwarf’s (B) and (C) buttons of scrolling up and down through the list of the snapshots of a pedalboard?
I can only implement the very basic on/off switch, following the examples from the library, but the documentation is rather scarce to venture beyond the examples.
Hi @TheRedOne, as far as I’m aware, all of the functions that are described on that page are in the library. There are even some new properties we still need to document . What parts are you referring too?
regarding switching pedalboards that is not possible at the moment, as the configuration of ControlChain devices are saved at the pedalboard level, making this rather tricky.
Switching snapshots should be possible though! you can do this in the webui under the snapshots “load/manage” button and then assigning it to the ControlChain device. As long as the Arduino device is configured to allow for lists (by adding CC_MODE_OPTIONS to the supported modes), it should show up there!
Hope that helps!
Thanks, @Jan, for your reply. I have tried CC_MODE_OPTIONS, but no luck so far. Specifically, I don’t get how to implement a button scrolling the list up. Can you share a bit of a code for, say, two footswitches that would scroll through the list up and down? Or at least show me a direction for further diggin’ by myself?
I’ll experiment more tonight, and post my workflow and findings here.
When you say “all of the functions that are described on that page are in the library”, are you referring to this library? 'Cos that’s what I’m using, and it seems that this library uses an outdated version of cc-slave library. E.g. compare the snippets of /cc-master/blob/master/lib/src/assignment.h and /src/assignment.h from the cc-slave that cc-arduino-lib uses.
#define CC_MODE_TOGGLE 0x001
#define CC_MODE_TRIGGER 0x002
#define CC_MODE_OPTIONS 0x004
#define CC_MODE_TAP_TEMPO 0x008
#define CC_MODE_REAL 0x010
#define CC_MODE_INTEGER 0x020
#define CC_MODE_LOGARITHMIC 0x040
#define CC_MODE_COLOURED 0x100
#define CC_MODE_MOMENTARY 0x200
#define CC_MODE_REVERSE 0x400
#define CC_MODE_GROUP 0x800
cc-slave from cc-arduino-lib assignments.h:
#define CC_MODE_TOGGLE 0x01
#define CC_MODE_TRIGGER 0x02
#define CC_MODE_OPTIONS 0x04
#define CC_MODE_REAL 0x10
#define CC_MODE_INTEGER 0x20
I guess I need to get the latest cc-slave and recompile the library.
Ok, I think I get it, so the ControlChain Arduino library is essentially a wrapper class for the cc-slave protocol, and I need to keep cc-slave sources up-to-date, and fool around with the wrapper class however I want.
right so for an example of how lists work, I guess the best place to look is at is at the MOD Footswitch firmware, but how the list incremented / dectremented is actually handled by cc-slave here everytime a button event is detected. (whether it goes up or down can be set with the CC_MODE_REVERSE property)
yes, sadly thats the case. We where developing an update for the ControlChain library, with the intention to update the Arduino library right after. However due to some delays we split the update in several parts and did not manage to update the Arduino library (yet), while the MOD Footswitch is already running a newer version of cc-slave.
so you could also say that both the wiki and the Arduino lib are outdated, but at least they are in sync
Great, now this really helps! Thank you so much!
Hi, I’m not new to this topic Control chain, device timeout. Recently since I’ve published this https://github.com/MaxPayne86/meta-moddevices-contrib/blob/dunfell-hotfix-1.11/recipes-ext-controllers/cc-master/cc-master.bb I’ve tried another controlchain test with
- cc-master latest (3fc46c) version
- cc-arduino-lib v0.5.1 (latest release).
The arduino board is connected to my reference Nano Pi NEO2 based board and by doing
controlchaind /dev/ttyUSB0 -f
[cc-lib] control chain started (port: /dev/ttyUSB0, baud rate: 115200)
even by resetting the board I see no output at all. After reading this thread, I’ve inspected control_chain.h in cc-master and the one present in cc-arduino-lib, I can see cc-master is using
#define CC_PROTOCOL_MAJOR 0
#define CC_PROTOCOL_MINOR 7
while arduino-cc-lib is using
#define CC_PROTOCOL_MAJOR 0
#define CC_PROTOCOL_MINOR 5
so can you confirm again that arduino-cc-lib is not usable at the moment? I would just open an issue to github repo then with this information. I think the problem is updating arduino-cc-lib to the new protocol version, can you also confirm that? Thanks
The protocol should be backwards compatible, we have just did not find the time to update the Arduino lib too.
I’m not sure about the Nano Pi to be honest, as we never tested that one.
What I can confirm is that the cc-arduino-lib is working fine here on my uno and due, with IDE version 1.8.3.
Not saying this doesn’t need updating, and we are planning that after the next protocol release