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
overpull.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright 2015 Haye Hinrichsen, Christoph Wick
3  *
4  * This file is part of Entropy Piano Tuner.
5  *
6  * Entropy Piano Tuner is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * Entropy Piano Tuner is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14  * more details.
15  *
16  * You should have received a copy of the GNU General Public License along with
17  * Entropy Piano Tuner. If not, see http://www.gnu.org/licenses/.
18  *****************************************************************************/
19 
20 //=============================================================================
21 // Overpull estimator
22 //=============================================================================
23 
24 #ifndef OVERPULL_H
25 #define OVERPULL_H
26 
27 #include "../piano/piano.h"
28 
51 
53 {
54 public:
57 
58  void init (const Piano *piano);
59  double getOverpull (int keynumber, const Piano *piano);
60 
61 private:
65  double mConcertPitch;
66  std::vector<std::vector<float>> R;
67 
68  void computeInteractionMatrix (double averagePull = 0.22);
69 };
70 
71 #endif // OVERPULL_H
void init(const Piano *piano)
Initialize.
Definition: overpull.cpp:61
PianoType
Enumeration of piano types.
Definition: pianodefines.h:28
int mNumberOfKeys
Total number of keys.
Definition: overpull.h:63
double mConcertPitch
Concert pitch (A4)
Definition: overpull.h:65
Definition: piano.h:40
OverpullEstimator()
Constructor, resetting the member variables.
Definition: overpull.cpp:40
piano::PianoType mPianoType
Piano type (upright/grand)
Definition: overpull.h:62
double getOverpull(int keynumber, const Piano *piano)
Compute the required overpull on the basis of the interaction matrix.
Definition: overpull.cpp:245
Class for estimating the overpull needed in a pitch raise.
Definition: overpull.h:52
void computeInteractionMatrix(double averagePull=0.22)
Compute the interaction matrix between the string.
Definition: overpull.cpp:90
std::vector< std::vector< float > > R
Response matrix.
Definition: overpull.h:66
int mNumberOfBassKeys
Keys on the bass bridge.
Definition: overpull.h:64