ohmtech-rdi / eurorack-blocks

Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust
Other
308 stars 21 forks source link

Erb persistent #658

Closed ohmtech-rdi closed 8 months ago

ohmtech-rdi commented 8 months ago

This PR brings the concept of persistence in ERB, which means to persist some states between power cycles. This is typically used to save some settings such as an encoder "position", or calibration data.

Compare to the equivalent libDaisy implementation, ERB brings a magic number for identifying the meaning of data, as well as rate limiting (1s by default), to avoid premature obsolescence of the QSPI chip.

To implement rate limiting, we introduced the daisy ClockHal which is a C++ clock matching std::chrono Clock requirements.

This feature is also supported in the simulator, by emulating the QSPI chip and saving it in the VCV patch.