# Seeking help - Refactoring midi controller device drivers for Vangelis

**URL:** <https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218>\
**Category:** Software\
**Tags:** midi-controllers\
**Created:** [June 1, 2026, 8:56am UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218 "2026-06-01T08:56:36Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [June 7, 2026, 6:20am UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/21 "2026-06-07T06:20:41Z")

</div>

> [@LFO](#):
>
> chains.
> 
> I put the `disable_note_filter` into each mode switch area except for note mode which has the enable function.

it’s just the opposite, @LFO .  
When you enable the filter, MIDI notes don’t pass thru. You have to disable the filter to get notes passing thru and reaching the chains.

Regards

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [June 7, 2026, 6:24am UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/22 "2026-06-07T06:24:03Z")

</div>

> [@jofemodo](#):
>
> ```auto
> def process(frames):
> outport.clear_buffer()
> if self.filter_enabled.value:
> return
> for offset, indata in inport.incoming_midi_events():
> outport.write_midi_event(offset, indata) # pass through
> # 3-bytes events
> if len(indata) == 3:
> status, pitch, vel = struct.unpack('3B', indata)
> # Note events in MIDI channel 1
> if status >> 4 in (NOTEON, NOTEOFF) and (status & 0xF) == 0:
> try:
> outport.write_midi_event(offset, (status, pitch, vel))
> except:
> pass
> 
> ```

Take a look to the code 😉  
BTW, you probably wat to route Pitch Bending events too.

Regards

---

<div class="post-metadata">

**Author:** ![OutOfCheese](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/outofcheese/32/16337_2.png) [@OutOfCheese](https://discourse.zynthian.org/u/OutOfCheese)\
**Post date:** [June 7, 2026, 7:05pm UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/23 "2026-06-07T19:05:11Z")

</div>

The launchpad mini mk3 driver is mostly working (launching/stopping clips/“scenes” in session mode, playing notes in drums and keys tabs). The arrow keys only work in Session mode.

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [June 7, 2026, 9:49pm UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/24 "2026-06-07T21:49:00Z")

</div>

Hi @OutOfCheese !

Do you mean you tested the driver? AFAIK It’s fully working 😉  
What functionality you expect is not working?

Regards,

---

<div class="post-metadata">

**Author:** ![OutOfCheese](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/outofcheese/32/16337_2.png) [@OutOfCheese](https://discourse.zynthian.org/u/OutOfCheese)\
**Post date:** [June 8, 2026, 2:12am UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/25 "2026-06-08T02:12:03Z")

</div>

Hi jofemodo! Yes I tested to confirm it’s working. The arrow keys in note mode would be a nice feature but the device is usable as is, I’m sorry if I made the impression that it’s not.

Thanks for the awesome work on the drivers, it’s very much appreciated.

---

<div class="post-metadata">

**Author:** ![LFO](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/l/3ab097/32.png) [@LFO](https://discourse.zynthian.org/u/LFO)\
**Post date:** [June 10, 2026, 10:25am UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/26 "2026-06-10T10:25:14Z")

</div>

For some reason it appears jack is not available or not being imported or something. It’s underlined in VSCode, I get this error.

```auto
Traceback (most recent call last):
  File "/zynthian/venv/lib/python3.11/site-packages/jack.py", line 801, in callback_wrapper
    callback(frames)
  File "/zynthian/zynthian-ui/zyngine/ctrldev/zynthian_ctrldev_launchpad_pro_mk2.py", line 297, in process
    evtype = (indata[0] >> 4) & 0x0F
              ~~~~~~~~~~^^~~
TypeError: unsupported operand type(s) for >>: 'bytes' and 'int'

```

 ![image](https://discourse.zynthian.org/uploads/default/original/3X/f/a/fabea755565b3e548a3f9683c0676f180334f305.png)

I’ll keep staring at jack examples but not having any success yet.

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [June 10, 2026, 3:05pm UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/27 "2026-06-10T15:05:15Z")

</div>

Hi @LFO!

I never used this VSCode thing. I try to avoid IDEs as they tend to confuse my limited mind 😉

But python jack library is installed in your zynthian for sure and the error you are getting doesn’t seem like a dependency (library not found) issue.

The error message is pretty clear: **You are using an operand “\>\>” that is not supported by the “bytes” type.** You should do the proper data conversion.

Regards

---

<div class="post-metadata">

**Author:** ![LFO](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/l/3ab097/32.png) [@LFO](https://discourse.zynthian.org/u/LFO)\
**Post date:** [June 11, 2026, 12:16am UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/28 "2026-06-11T00:16:41Z")

</div>

Wow I’m surprised you don’t use an IDE! It can be confusing and helpful in equal measure for me.

It’s not in front of me now but when I fix the error above it tends to break something else. I’m sure it’s something simple but I find whatever I try, it bounces between these results:

- midi notes send to chain in all modes and UI control works (so for example launcher works but also sends notes)
- midi notes go to chain in note mode only and UI control is broken in other modes (launcher & device control don’t work)

---

<div class="post-metadata">

**Author:** ![LFO](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/l/3ab097/32.png) [@LFO](https://discourse.zynthian.org/u/LFO)\
**Post date:** [July 18, 2026, 5:49am UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/29 "2026-07-18T05:49:36Z")

</div>

I added a pull request for the launchpad pro mk2 driver @jofemodo. Please look when you can.

---

<div class="post-metadata">

**Author:** ![LFO](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/l/3ab097/32.png) [@LFO](https://discourse.zynthian.org/u/LFO)\
**Post date:** [August 20, 2026, 10:12pm UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/30 "2026-08-20T22:12:03Z")

</div>

I found a bug in the nanokontrol driver. If you add a chain between some existing chains, they don’t ’shuffle down’ and make space for the new one. I.e. Start with 3 chains, add a 4th in between, the nanokontrol channels still control the original 3 in the same order. The new channel isn’t affected by the controller. I need to test this more, not sure if its only occurs when a chain it’s added between or also at the end of the list.

On another point, I think there are a few drivers floating out there that have never had a pull request. Hey @AL1-1956 would you like to share your keystep driver back?

---

<div class="post-metadata">

**Author:** ![LFO](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/l/3ab097/32.png) [@LFO](https://discourse.zynthian.org/u/LFO)\
**Post date:** [August 20, 2026, 10:57pm UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/31 "2026-08-20T22:57:02Z")

</div>

I found after some experimenting that the nanokontrol driver won’t update the controls to match any new chains (wherever they are placed) until you press the CYCLE button. Removing any chain will automatically update the controls to match what’s on screen.

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [August 21, 2026, 11:50am UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/32 "2026-08-21T11:50:00Z")

</div>

Thanks @LFO!  
If you could open a ticket with this report …

Regards

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [August 22, 2026, 12:09am UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/33 "2026-08-22T00:09:20Z")

</div>

> [@LFO](#):
>
> I added a pull request for the launchpad pro mk2 driver @jofemodo. Please look when you can.

Hi @LFO !

I can’t find the PR. Please, could you check you really send the PR to the zynthian-ui repo?

Regards,

---

<div class="post-metadata">

**Author:** ![LFO](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/l/3ab097/32.png) [@LFO](https://discourse.zynthian.org/u/LFO)\
**Post date:** [August 22, 2026, 12:50am UTC](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/34 "2026-08-22T00:50:21Z")

</div>

You already approved it! 🙂 That was the initial PR that fixed the driver for Vangelis and added the different modes.

I have another update that I will send for this driver, a bit of clean up/bug fix and rationalise the buttons used for mixer functions. I am trying to incorporate the core UI controls that you suggested based on APCkey 25…once I wrap my head around it.

Here’s the ticket describing the nanoKontrol 2 behaviour: [nanoKontrol2 driver doesn't auto map chain controls when new ones are added · Issue #1760 · zynthian/zynthian-issue-tracking · GitHub](https://github.com/zynthian/zynthian-issue-tracking/issues/1760)

[Previous page](https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218.md?page=1)
