#include <piano.h>
Definition at line 40 of file piano.h.
Constructor of the piano, initializing the member variables.
Definition at line 45 of file piano.cpp.
const double& Piano::getConcertPitch |
( |
| ) |
const |
|
inline |
double& Piano::getConcertPitch |
( |
| ) |
|
|
inline |
double Piano::getDefiningTempFrequency |
( |
int |
keynumber, |
|
|
double |
cents = 0 , |
|
|
double |
A4 = 0 |
|
) |
| const |
Compute the defining temperatent.
This function provides the defining temperament on which the tuning process takes place. At the moment non-standard temperaments are not yet implemented, instead the function simply returns the equal temperamtne (ET). By defining this function, we prepare ourselves for a possible extension.
- Parameters
-
keynumber | : key number |
cents | : additional shift in cents |
- Returns
- Frequency f1 without inharmonicity and stretch
Definition at line 148 of file piano.cpp.
double Piano::getEqualTempFrequency |
( |
int |
keynumber, |
|
|
double |
cents = 0 , |
|
|
double |
A4 = 0 |
|
) |
| const |
Function returning the equal temperament.
This function computes the theoretical frequency of a given key according to equal temperament (ET), optionally shifted by a given number of cents.
- Parameters
-
keynumber | : the index of the key on the piano keyboard |
cents | : additional cents in cents |
A4 | : Frequency of A4 (replaced by mConcerPitch if zero by default) |
- Returns
- Equal temperament frequency
Definition at line 123 of file piano.cpp.
double Piano::getExpectedInharmonicity |
( |
double |
f | ) |
const |
Compute expected approximative inharmonicity.
This function provides a rough estimate of the expected inharmonicity coefficient for an average upright. It is used to improve the expectation where the spectral lines should reside in the spectrum.
TODO: This could be depending on the piano type.
- Parameters
-
- Returns
- Inharmonicity coefficient B
Definition at line 102 of file piano.cpp.
const Key& Piano::getKey |
( |
int |
i | ) |
const |
|
inline |
Key& Piano::getKey |
( |
int |
i | ) |
|
|
inline |
const Keyboard& Piano::getKeyboard |
( |
| ) |
const |
|
inline |
const Key* Piano::getKeyPtr |
( |
int |
i | ) |
const |
|
inline |
Key* Piano::getKeyPtr |
( |
int |
i | ) |
|
|
inline |
const std::string& Piano::getManufactionLocation |
( |
| ) |
const |
|
inline |
const std::string& Piano::getManufactionYear |
( |
| ) |
const |
|
inline |
const std::string& Piano::getName |
( |
| ) |
const |
|
inline |
const std::string& Piano::getSerialNumber |
( |
| ) |
const |
|
inline |
const std::string& Piano::getTuningLocation |
( |
| ) |
const |
|
inline |
const std::string& Piano::getTuningTime |
( |
| ) |
const |
|
inline |
void Piano::setConcertPitch |
( |
double |
pitch | ) |
|
|
inline |
void Piano::setKey |
( |
int |
i, |
|
|
const Key & |
key |
|
) |
| |
|
inline |
void Piano::setManufactureLocation |
( |
const std::string & |
loc | ) |
|
|
inline |
void Piano::setManufactureYear |
( |
const std::string & |
year | ) |
|
|
inline |
void Piano::setName |
( |
const std::string & |
name | ) |
|
|
inline |
void Piano::setSerialNumber |
( |
const std::string & |
number | ) |
|
|
inline |
void Piano::setTuningLocation |
( |
const std::string & |
loc | ) |
|
|
inline |
void Piano::setTuningTime |
( |
const std::string & |
time | ) |
|
|
inline |
void Piano::setTuningTimeToActualTime |
( |
| ) |
|
This function resets the tuning time to the actual time. This is used as default value.
Definition at line 70 of file piano.cpp.
const double Piano::DEFAULT_CONCERT_PITCH = 440 |
|
static |
default concert pitch of A
Definition at line 46 of file piano.h.
const int Piano::DEFAULT_KEY_NUMBER_OF_A = 48 |
|
static |
const int Piano::DEFAULT_KEYS_ON_BASS_BRIDGE = 28 |
|
static |
const int Piano::DEFAULT_NUMBER_OF_KEYS = 88 |
|
static |
double Piano::mConcertPitch |
|
private |
concert pitch (default 440 Hz)
Definition at line 119 of file piano.h.
the keyboard
Definition at line 122 of file piano.h.
std::string Piano::mManufactureLocation |
|
private |
location where the piano was produced
Definition at line 112 of file piano.h.
std::string Piano::mManufactureYear |
|
private |
manufaction year of the real piano
Definition at line 110 of file piano.h.
name of the real piano
Definition at line 104 of file piano.h.
std::string Piano::mSerialNumber |
|
private |
serial number of the real piano
Definition at line 108 of file piano.h.
std::string Piano::mTuningLocation |
|
private |
location where the piano is now
Definition at line 115 of file piano.h.
std::string Piano::mTuningTime |
|
private |
time when the tuning hast been started (format yyyy-mm-dd HH:MM:SS, UTC)
Definition at line 117 of file piano.h.
type of the real piano
Definition at line 106 of file piano.h.
The documentation for this class was generated from the following files:
- /home/hinrichsen/Dokumente/Aktuell/EPT/Entropy-Piano-Tuner/core/piano/piano.h
- /home/hinrichsen/Dokumente/Aktuell/EPT/Entropy-Piano-Tuner/core/piano/piano.cpp