qiemem / eurorack

Firmware customization for Mutable Instruments' Eurorack Modules.
93 stars 16 forks source link

Chained modules except the rightmost do not change loop status or segment type on buttons presses #13

Closed qiemem closed 3 years ago

qiemem commented 3 years ago

Reported and discussed here: https://forum.mutable-instruments.net/t/stages-qiemems-alternative-firmware/17506/7?

qiemem commented 3 years ago

Thanks to pyerbass for the initial investigation.

Right module appears to work 100%.

Left module:

It looks like the problem is entirely in status change requests being passed back to the module on the left. Haven't figured out where the breakdown is yet in this process. It could be in transmitting the packet, receiving the packet, or handling the request. I've made the most changes to handling the request, but that code isn't different for remote vs local changes.

qiemem commented 3 years ago

Turned out to be a one character fix :stuck_out_tongue_closed_eyes:

For segment state update packets, the first 4 bits used to be used to indicate module index. For state change request packets, the first byte is used to indicate type, with the first 4 bits being 0xf, to distinguish from state updates.

Now, only the first 3 bits are used to indicate index (since one bit is dedicate to re-trigger/polarity), but the module was checking to see if the "index" was 0xf to see if the packet was a change request still. Since its only looking at three bits instead of 4, it needed to check for 0x7 instead.