Storing different values in same byte

Conall   O Maolain's icon

Conall O Maolain

7月 26 2024 | 2:46 午後

Electribe ES-1 formatting.maxpat
Max Patch

formatSysexData.js
js

Hi, I'm working on a programmer for the Korg ES-1 sampler. I've used this tutorial as a guide and used some of the code in it, but I'm struggling when it comes to different parameter values being stored in the same byte.

In my code I have a default array called patternDataBuffer that is a placeholder for the sysex dump coming from the ES-1. Why is the value getting overwritten when a different parameter value is received?