Conversation
Co-authored-by: schollz <6550035+schollz@users.noreply.github.com>
Co-authored-by: schollz <6550035+schollz@users.noreply.github.com>
|
@copilot A problem: The persistent save is corrupting the save data from the calibration. Probably better to combine the data structures for calibration + the bank/sample to load from because both need to be loaded on startup. You may need to refactor the calibration/saving loading so it works with your PersistentStorage |
…as RAM-resident Co-authored-by: schollz <6550035+schollz@users.noreply.github.com>
…cture Co-authored-by: schollz <6550035+schollz@users.noreply.github.com>
Fixed in commit 750b27e. I've refactored the code to use a unified
Both features now share the same flash sector without conflicts. |
|
@copilot Perfect! It is actually getting the stored bank/sample information. However it is NOT loading the new bank/file on startup. Here's the startup debug info: sdcard_startup] checking settings/grimoire/rune7 It says its loading, but the actual file is not being loaded for playback. |
…xists Co-authored-by: schollz <6550035+schollz@users.noreply.github.com>
Fixed in commit 4027bda. The issue was that the restored bank/sample values weren't triggering the file change mechanism. The code was setting Now after |
|
@copilot Perfect! It is now loading the sample correclty! But one more thing - it is not setting the current bank such that when the ectocore "sample" knob is turned, it switches to a sample from bank 0, not from the saved bank which was set (which in this case was bank 1) |
Co-authored-by: schollz <6550035+schollz@users.noreply.github.com>
Fixed in commit d3cc4d4. The issue was that only Now all four variables are synchronized when restoring from flash, ensuring consistent bank selection throughout the system. |
|
@copilot One more thing, make this feature available to the ectocore only for now |
Co-authored-by: schollz <6550035+schollz@users.noreply.github.com>
|
@copilot Hm. There is still an issue, where it loads the bank/sample correctly and plays it from the right file and All that is perfect. However, when changing the sample knob it reverts to bank 0 instead of staying on the bank loaded. Somehow the bank loading persists to load the sample, but not persisting into the main ectocore loop when sample knob is changed. |
Co-authored-by: schollz <6550035+schollz@users.noreply.github.com>
Fixed in commit 1c41960. The issue was in the ectocore input handling loop. The local variables Now these variables are initialized with the current bank/sample values ( |
…arts (ectocore only) (#784) * Initial plan * Add persistent bank+sample state saving to flash Co-authored-by: schollz <6550035+schollz@users.noreply.github.com> * Fix flash access by marking functions as RAM-resident Co-authored-by: schollz <6550035+schollz@users.noreply.github.com> * Fix code review issues: use correct constants and mark load function as RAM-resident Co-authored-by: schollz <6550035+schollz@users.noreply.github.com> * Combine calibration and bank/sample into unified PersistentState structure Co-authored-by: schollz <6550035+schollz@users.noreply.github.com> * Fix bank/sample restoration to trigger file change when no savefile exists Co-authored-by: schollz <6550035+schollz@users.noreply.github.com> * Initialize sel_bank_next and sel_sample_next with restored values Co-authored-by: schollz <6550035+schollz@users.noreply.github.com> * Restrict bank+sample persistence to ectocore only Co-authored-by: schollz <6550035+schollz@users.noreply.github.com> * Initialize ectocore loop bank/sample tracking with current values Co-authored-by: schollz <6550035+schollz@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: schollz <6550035+schollz@users.noreply.github.com> Former-commit-id: 4e3ae1c
sel_bank_next_newfrom 0 tosel_bank_cursel_sample_next_newfrom 0 tosel_sample_curRoot Cause:
The ectocore input handling loop has local variables
sel_bank_next_newandsel_sample_next_newthat were always initialized to 0. When the loop checked if the bank changed (sel_bank_cur != sel_bank_next_new), it would always detect a "change" from the restored bank (e.g., 1) to 0, then setsel_bank_next = 0, effectively resetting the bank.Solution:
Initialize these local tracking variables with the current bank/sample values so they start in sync with the global state, allowing proper change detection.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.