ohmtech-rdi / eurorack-blocks

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

Add calibration #534

Open ohmtech-rdi opened 1 year ago

ohmtech-rdi commented 1 year ago

At least in the case of pot + trim * cv, when a CV is not connected, zero is not exactly zero and changing the trim value will have an impact on the final value, which sometimes can be easily heard (for example for a frequency parameter).

Add calibration tooling to solve that.

Typically:

module Foo {
   control freq CvIn {
      ...
      calibration 0V
   }

   control pitch CvIn {
      ...
      calibration 1V, 3V
   }
}
$ ebb calibrate
Unplug freq, press enter to continue
Measured value: 23mV
Set pitch to 1V, press enter to continue
Measured value: 985mV
Set pitch to 3V, press enter to continue
Measured value: 3010mV
Done.

erbb calibrate would use openocd semihosting.

The calibration would be written on QSPI, with for magic key a hash of the C++ side structure declaration.