jmamma / MCL

MCL firmware for the MegaCommand MIDI Controller.
BSD 2-Clause "Simplified" License
48 stars 9 forks source link

V3.0 MD Shift Left / Shift Right not working correctly #143

Closed jmamma closed 3 years ago

jmamma commented 3 years ago

Not sure what's happening here, but some steps + locks are dropping off when you shift. visible in step sequencer, not triggered..

jmamma commented 3 years ago
692   switch (dir) {
693   case DIR_LEFT: {
694     // shift locks
695     uint8_t nlock = popcount(steps[0].locks);
696     memcpy(lock_buf, locks, nlock);
697     memmove(locks, locks + nlock, total_nlock - nlock);
698     memcpy(locks + total_nlock - nlock, lock_buf, nlock);
699 
700     // shift steps
701     step_buf = steps[0];
702     timing_buf = timing[0];
703     memmove(steps, steps + 1, ncopy);
704     steps[length - 1] = step_buf;
705     timing[length - 1] = timing_buf;
706     break;
707   }
jmamma commented 3 years ago

looks like timing data is not shifted.

jmamma commented 3 years ago

8ba40625436176c75ecc8048166c4d0c71b10d19 fixed.