I would like to trigger a pattern from a button that I set up with “Hardware - Wiring” in the web config. It sends a midi note with the value of 0 (should be C-1) and a velocity of 114 on channel 10 (I also tried other values):
I can record midi events in the pattern editor. However, if I set the trigger options in the ZynPad menu to “device: all”, “channel: all” and trigger note “C-1”, nothing happens. I also tried a number of other values here.
My device is a diy foot controller. It is essentially a Mini v2 and uses its wiring preset. The software is Oram stable.
I did a bit of debugging and I think I found the reason:
The state manager filters internal devices with a number above 23. External devices are ZMIP_DEV0 to ZMIP_DEV23 as defined in zyncoder/zynmidirouter.h . The events generated by the mpc23017 get a ZMIP_FAKE_INT with a 26 and is therefore treated as internal. Internal devices are filtered because otherwise events from the stepper with a number of 25 (among others) are fed back to pattern starting method.
A fix might be to filter devices above 23 except 26. These are filtered in two places in oram stable:
zynthian_state_manager.py, line 895:
# Handle external devices only except 26 (ZMIP_FAKE_INT)
if izmip < self.get_max_num_midi_devs() or izmip == 26:
zynsigman.send_queued(zynsigman.S_MIDI, zynsigman.SS_MIDI_NOTE_ON,
izmip=izmip, chan=chan, note=ev[1] & 0x7f, vel=ev[2] & 0x7f)
zynthian_gui_zynpad.py, line 842:
if (izmip > 23 and izmip != 26) or self.trigger_device is None or (self.trigger_device != 0xFF and self.trigger_device != izmip):
return False
With these changes the sequence starts but there might be other side effects.