Dewb
3
Answered on Discord since we were already having a conversation there, but here’s a summary for posterity:
- The serialization code is for saving and loading to text formats like files on a USB stick. If you want your new additions to be saved to scene data stored in non-volatile flash memory, the code you want to look at is in
flash.c. You’ll need to handle your new data in flash_read and flash_write. Currently, only scripts, patterns, grid data, and the scene description text are saved to flash when you use SCENE WRITE mode.
- The VCV Rack version of Teletype works the same way as hardware with respect to flash persistence and SCENE READ/WRITE modes. The difference is that module RAM is also saved in the Rack patch, so you don’t have to write your active scene to scene memory, but you still can.
- “Serialization” is an industry term and maybe this Wikipedia page is helpful: Serialization - Wikipedia
- The code in scene_serialization.c was previously all in usb_disk_mode.c. I was the last person to touch most of this code, but it was mostly reorganizing the work others had already done; you can read some background on that change here: Proposal: separate scene serialization logic from USB disk logic, add scene serialization tests by Dewb · Pull Request #287 · monome/teletype · GitHub
1 Like