BenZonneveld / Nava-2021-Firmware

https://www.e-licktronic.com
13 stars 2 forks source link

Bug in pattern chain play mode #47

Closed Oortone closed 8 months ago

Oortone commented 9 months ago

When changing pattern groups in play mode & synced pattern change mode there are erratic behaviors. Sometimes first bar in group is played twice, sometimes it's skipped, sometimes the second one is skipped, seems like there's a counter beneath going wrong. Either change should be at end of group or at end of current bar regardless of place in group. The current behavior makes no sense. After one loop, the group usually plays correctly. This is when making groups of patterns by holding step buttons pressing ENTER in step mode. Similar erratic behavior was in the last "official" release 1.028beta.

However in the 1.028beta you could instead chain patterns by holding two buttons thus creating temporary chains (like groups). As far as I can see that works correctly all the time. In this release is not working ufortunately. Display seems to show the correct pattern but often the playback is stuck on the same pattern. This behavior is "released" when selecting a single pattern instead. When entering step edit mode, the repeated pattern will overwrite others in the chain if it is edited and ENTER is pressed when another pattern is shown in the display.

Oortone commented 9 months ago

If I put a timer on SeqParameter(); in main loop it often takes almost 50 ms. It seems to be related to pattern changes (reading from EEprom?) but I'm not sure. Anyway. 50 ms is longer than one 16th note @120 bpm. I believe there are concurrency issues with this solution. User requires pattern chang late in a bar but it is not fully executed for the next bar. I see there's an attempt to solve this in the case of groups reading a whole bank into RAM. Might be the right way to go, I know very little of realtime systems and Arduino but I thought it was worth writing down. I don't think I can fix this myself though.

Oortone commented 8 months ago

Since I've moved to develop this firmware myself I'm closing my issues here.