52 using Keys = std::vector<Key>;
void setConcertPitch(double pitch)
piano::PianoType mType
type of the real piano
double & getConcertPitch()
Keyboard mKeyboard
the keyboard
PianoType
Enumeration of piano types.
static const double DEFAULT_CONCERT_PITCH
default concert pitch of A
const Key * getKeyPtr(int i) const
double mConcertPitch
concert pitch (default 440 Hz)
Class describing the piano keyboard, holding a collection of keys.
piano::PianoType getPianoType() const
void setName(const std::string &name)
const std::string & getManufactionYear() const
double getDefiningTempFrequency(int keynumber, double cents=0, double A4=0) const
Compute the defining temperatent.
Class describing a single piano key.
static const int DEFAULT_KEY_NUMBER_OF_A
const std::string & getManufactionLocation() const
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.
void setKey(int i, const Key &key)
const std::string & getSerialNumber() const
static const int DEFAULT_KEYS_ON_BASS_BRIDGE
void setType(piano::PianoType type)
void setSerialNumber(const std::string &number)
std::string mManufactureLocation
location where the piano was produced
const Keyboard & getKeyboard() const
std::string mName
name of the real piano
void setTuningTimeToActualTime()
This function resets the tuning time to the actual time. This is used as default value.
void setManufactureYear(const std::string &year)
static const int DEFAULT_NUMBER_OF_KEYS
std::string mManufactureYear
manufaction year of the real piano
std::string mSerialNumber
serial number of the real piano
const std::string & getTuningTime() const
std::string mTuningLocation
location where the piano is now
const std::string & getTuningLocation() const
const double & getConcertPitch() const
std::string mTuningTime
time when the tuning hast been started (format yyyy-mm-dd HH:MM:SS, UTC)
void setTuningLocation(const std::string &loc)
void setManufactureLocation(const std::string &loc)
double getExpectedInharmonicity(double f) const
Compute expected approximative inharmonicity.
const std::string & getName() const
void setTuningTime(const std::string &time)
const Key & getKey(int i) const
piano::PianoType & getPianoType()