Class daisy::VoctCalibration¶
ClassList > daisy > VoctCalibration
Helper class for calibrating an input to 1V/oct response. More...
#include <VoctCalibration.h>
Public Functions¶
Type | Name |
---|---|
bool | GetData (float & scale, float & offset) |
float | ProcessInput (const float inval) |
bool | Record (float val1V, float val3V) |
void | SetData (float scale, float offset) |
VoctCalibration () |
|
~VoctCalibration () |
Detailed Description¶
Author:
shensley
This provides a scale and offset value for converting incoming CV into MIDI note numbers accurately for musical pitch tracking.
To use, record both the 1V and 3V values using the specified functions once calibration is complete you can use the GetData function to retrieve the calibration values.
This can also be used for 100mV/Semitone calibration as used by Buchla synthesizer modules. To calibrate for this standard. You would send 1.2V, and 3.6V
Public Functions Documentation¶
function GetData¶
Get the scale and offset data from the calibration
Return value:
returns
true if calibration has been performed.
function ProcessInput¶
Process a value through the calibrated data to get a MIDI Note number
function Record¶
Uses the values retrieved for 1V and 3V in order to compute a scale and offset value that can be used to convert a CV input signal to a calibrated 1V/oct range.
Parameters:
val1V
ADC reading for 1 voltval3V
ADC reading for 3 volts
Return value:
returns
true if the calibraiton is successful - this is always true
Todo
Add some sort of range validation. Originally we had a check for a valid range on the input, but given that the input circuit or the AnalogControl configuration can have a drastic effect on input, that could cause unintentional failure to calibrate, it was removed.
function SetData¶
Manually set the calibration data and mark internally as "calibrated" This is used to reset the data after a power cycle without having to redo the calibration procedure.
function VoctCalibration¶
function ~VoctCalibration¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/util/VoctCalibration.h