Skip to content

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

inline bool daisy::VoctCalibration::GetData (
    float & scale,
    float & offset
) 

Get the scale and offset data from the calibration

Return value:

  • returns true if calibration has been performed.

function ProcessInput

inline float daisy::VoctCalibration::ProcessInput (
    const  float inval
) 

Process a value through the calibrated data to get a MIDI Note number


function Record

inline bool daisy::VoctCalibration::Record (
    float val1V,
    float val3V
) 

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 volt
  • val3V 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

inline void daisy::VoctCalibration::SetData (
    float scale,
    float offset
) 

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

inline daisy::VoctCalibration::VoctCalibration () 

function ~VoctCalibration

inline daisy::VoctCalibration::~VoctCalibration () 


The documentation for this class was generated from the following file external-docs/libDaisy/src/util/VoctCalibration.h