29 #include "../system/eptexception.h"
50 mManufactureLocation(
""),
53 mConcertPitch(DEFAULT_CONCERT_PITCH),
54 mKeyboard(DEFAULT_NUMBER_OF_KEYS)
72 time_t rawtime = time(0);
75 gmtime_s(&nowtime, &rawtime);
77 nowtime = *gmtime(&rawtime);
80 strftime(buffer, 50,
"%Y-%m-%d %H:%M:%S", &nowtime);
104 return (f > 100 ? exp(-15.45 + 1.354*log(f)) : exp(-2.622 - 1.431*log(f)));
Keyboard mKeyboard
the keyboard
static const double DEFAULT_CONCERT_PITCH
default concert pitch of A
double mConcertPitch
concert pitch (default 440 Hz)
double getDefiningTempFrequency(int keynumber, double cents=0, double A4=0) const
Compute the defining temperatent.
static const int DEFAULT_KEY_NUMBER_OF_A
Piano()
Constructor of the piano, initializing the member variables.
double getEqualTempFrequency(int keynumber, double cents=0, double A4=0) const
Function returning the equal temperament.
static const int DEFAULT_KEYS_ON_BASS_BRIDGE
void setTuningTimeToActualTime()
This function resets the tuning time to the actual time. This is used as default value.
static const int DEFAULT_NUMBER_OF_KEYS
int getKeyNumberOfA4() const
std::string mTuningTime
time when the tuning hast been started (format yyyy-mm-dd HH:MM:SS, UTC)
double getExpectedInharmonicity(double f) const
Compute expected approximative inharmonicity.
int getNumberOfKeys() const
The piano is a grand piano.