Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OverpullEstimator Class Reference

Class for estimating the overpull needed in a pitch raise. More...

#include <overpull.h>

Public Member Functions

 OverpullEstimator ()
 Constructor, resetting the member variables. More...
 
 ~OverpullEstimator ()
 
void init (const Piano *piano)
 Initialize. More...
 
double getOverpull (int keynumber, const Piano *piano)
 Compute the required overpull on the basis of the interaction matrix. More...
 

Private Member Functions

void computeInteractionMatrix (double averagePull=0.22)
 Compute the interaction matrix between the string. More...
 

Private Attributes

piano::PianoType mPianoType
 Piano type (upright/grand) More...
 
int mNumberOfKeys
 Total number of keys. More...
 
int mNumberOfBassKeys
 Keys on the bass bridge. More...
 
double mConcertPitch
 Concert pitch (A4) More...
 
std::vector< std::vector< float > > R
 Response matrix. More...
 

Detailed Description

Class for estimating the overpull needed in a pitch raise.

If a piano is heavily out of tune, one has to perform a pitch raise. The rising string tension increases the load on the soundboard, leading to an elastic deformation of the soundboard. This deformation in turn lowers the pitches. Overpulling means to tune the strings a little bit sharper than intended so that the expected loss during the tuning process is compensated.

The overpull algorithm is implemented in a fully automatic manner. If in the recording mode enough keys are measured (all with a distance less or equal than a fifth), and if the piano is flat (or sharp) by more than 5%, the overpull curve is automatically displayed in magenta color in the tuning window.

The overpull curve decreases during tuning and finally becomes flat and vanishes entirely. That is, for each key the overpull of all other keys is newly calculated.

The instance of the overpull estimator is held by the SignalAnalyzer.

Definition at line 52 of file overpull.h.

Constructor & Destructor Documentation

OverpullEstimator::OverpullEstimator ( )

Constructor, resetting the member variables.

Definition at line 40 of file overpull.cpp.

OverpullEstimator::~OverpullEstimator ( )
inline

Definition at line 56 of file overpull.h.

Member Function Documentation

void OverpullEstimator::computeInteractionMatrix ( double  averagePull = 0.22)
private

Compute the interaction matrix between the string.

The essential data structure that is needed to operate the overpull system is a response matrix R which tells us how many cents the string number k will fall if we increase string number j by one cent. On average the response is proprtional to the parameter averagePull and should be of the order of 22%.

This function contains the full overpull theory

Parameters
averagePull: average pull, of the order of 0.22

Definition at line 90 of file overpull.cpp.

double OverpullEstimator::getOverpull ( int  keynumber,
const Piano piano 
)

Compute the required overpull on the basis of the interaction matrix.

This function first checks whether enough red markers have been set. Then it computed the overpull according to these markers.

Parameters
keynumber: Number of the key to be tuned
piano: Pointer to the piano structure
Returns
Overpull in cents

Definition at line 245 of file overpull.cpp.

+ Here is the call graph for this function:

void OverpullEstimator::init ( const Piano piano)

Initialize.

This function initializes the member variables and calls the function computeInteractionMatrix.

Parameters
piano: Pointer to the piano structure

Definition at line 61 of file overpull.cpp.

+ Here is the call graph for this function:

Member Data Documentation

double OverpullEstimator::mConcertPitch
private

Concert pitch (A4)

Definition at line 65 of file overpull.h.

int OverpullEstimator::mNumberOfBassKeys
private

Keys on the bass bridge.

Definition at line 64 of file overpull.h.

int OverpullEstimator::mNumberOfKeys
private

Total number of keys.

Definition at line 63 of file overpull.h.

piano::PianoType OverpullEstimator::mPianoType
private

Piano type (upright/grand)

Definition at line 62 of file overpull.h.

std::vector<std::vector<float> > OverpullEstimator::R
private

Response matrix.

Definition at line 66 of file overpull.h.


The documentation for this class was generated from the following files: