Custom midi map

I’m trying to configure midimap for a simple Arduino controller with 4 buttons. Can’t get it to work. Could someone help me?

Here are midi commands from my Arduino controller:

5229776 Program Change chn 1 50
5286493 Program Change chn 1 51
5319526 Program Change chn 1 52
5364670 Program Change chn 1 53

Incoming Midi on: Arduino micro (correct device selected)
The file selected in Control Surfaces/Generic Midi/Midi Bindigs.
The code stored in .config/mixbus6/midi_maps/arduino4knobs.map:

<?xml version="1.0" encoding="UTF-8"?>
<ArdourMIDIBindings version="1.0.0" name="arduino4knobs">
<DeviceInfo bank-size="16"/>
<Binding channel="1" pgm="50" function="Transport/ToggleRoll"/>
<Binding channel="1" pgm="51" function="Transport/record-roll"/>
<Binding channel="1" pgm="52" function="Transport/ToggleRollForgetCapture"/>
<Binding channel="1" pgm="53" function="Transport/ToggleClick"/>
</ArdourMIDIBindings>

You are mixing functions and actions.“Transport/ToggleRoll”/ is an action. Actions are done like:
action=“Transport/ToggleRoll”
the same function would be:

function="transport-roll"

Well sort of, That one doesn’t toggle it just starts. Anyway, actions are always two parts, a section and command similar to a menu and it’s item. A function is all one word and all lower case. Functions tend to be transport related. A uri is a path to a controllable that is part track or bus or VCA, internally known as a strippable (something that can be a mixer strip)
I figure you have already looked at:


maybe my comments will help it make a bit more sense.

Thanks for your help.

I have found the exact actions that I needed here: https://manual.ardour.org/appendix/menu-actions-list/

Changed function to action but there is no luck. Must be missing something else.

<?xml version="1.0" encoding="UTF-8"?>
<ArdourMIDIBindings version="1.0.0" name="arduino4knobs">
<DeviceInfo bank-size="16"/>
<Binding channel="1" pgm="50" action="Transport/ToggleRoll"/>
<Binding channel="1" pgm="51" action="Transport/record-roll"/>
<Binding channel="1" pgm="52" action="Transport/ToggleRollForgetCapture"/>
<Binding channel="1" pgm="53" action="Transport/ToggleClick"/>
</ArdourMIDIBindings>

I have changed the PC to CC commands on my Arduino and the midimap file respectively. This test was performed in Ardour. Doesn’t work.

<?xml version="1.0" encoding="UTF-8"?>
<ArdourMIDIBindings version="1.0.0" name="4CCButtonsArduino">
<DeviceInfo bank-size="16"/>
<Binding channel="1" ctl="10" action="Transport/ToggleRoll"/>
<Binding channel="1" ctl="11" action="Transport/record-roll"/>
<Binding channel="1" ctl="12" action="Transport/ToggleRollForgetCapture"/>
<Binding channel="1" ctl="13" action="Transport/ToggleClick"/>
</ArdourMIDIBindings> 

Screenshot_20210113_113012

Looking at the manual page:


The very bottom lines:
"

Please note that channel, controller and note numbers are specified as decimal numbers in the ranges 1-16, 0-127 and 0-127 respectively

"
The MIDI tracer on the other hand shows numbers as hex. So for your MIDI map, where you have:

you might try changing that to:
Binding channel=“1” ctl=“16” action=“Transport/ToggleRoll”
or changing your controller to send 0x0a

In the midi tracer check the Decimal box, currently is showing hex so a 10 is actually a 16 in decimal, which is what the scripts reads. Other than that everything seems fine in that last one.