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
examplealgorithm::ExampleAlgorithm Class Reference

Basic class to show how to implement own algorithms. More...

#include <examplealgorithm.h>

+ Inheritance diagram for examplealgorithm::ExampleAlgorithm:
+ Collaboration diagram for examplealgorithm::ExampleAlgorithm:

Public Member Functions

 ExampleAlgorithm (const Piano &piano, const AlgorithmFactoryDescription &description)
 
- Public Member Functions inherited from Algorithm
 Algorithm (const Piano &piano, const AlgorithmFactoryDescription &desciption)
 
virtual ~Algorithm ()
 
virtual void workerFunction () overridefinal
 Virtual worker function, executed within the new thread. More...
 
- Public Member Functions inherited from SimpleThreadHandler
 SimpleThreadHandler ()
 Constructor. More...
 
virtual ~SimpleThreadHandler ()
 virtual destructor calls stop More...
 
virtual void start ()
 Start the thread. More...
 
virtual void stop ()
 Stop the thread. More...
 

Protected Member Functions

virtual void algorithmWorkerFunction () overridefinal
 
- Protected Member Functions inherited from Algorithm
void updateTuningCurve (int keynumber, double frequency)
 
bool terminateThread ()
 
void showCalculationProgress (double fraction)
 Transmit the current percentage of progress to the messaging system. More...
 
void showCalculationProgress (const Key &key, double start=0, double range=1)
 Transmit the current percentage of progress to the messaging system. More...
 
- Protected Member Functions inherited from SimpleThreadHandler
virtual void exceptionCaught (const EptException &e)
 EPT exception handling. More...
 
void setCancelThread (bool b)
 Cancel-flag setter method, thread-safe. More...
 
bool cancelThread () const
 Cancel-flag getter method, thread-safe. More...
 
void msleep (double milliseconds)
 Sleep function for staying idle. More...
 
bool isThreadRunning () const
 Flag to check if the thread is running. More...
 

Private Attributes

const double mConcertPitchParam
 

Additional Inherited Members

- Static Public Member Functions inherited from SimpleThreadHandler
static void setThreadName (std::string s)
 Specify the name of the thread. More...
 
- Protected Types inherited from Algorithm
using Keys = Keyboard::Keys
 
using SpectrumType = Key::SpectrumType
 
- Protected Attributes inherited from Algorithm
const size_t NumberOfBins = Key::NumberOfBins
 
Piano mPiano
 Copy of the piano. More...
 
const AlgorithmFactoryDescriptionmFactoryDescription
 
KeyboardmKeyboard
 Reference to the keyboard. More...
 
KeysmKeys
 Reference to the keys. More...
 
const int mNumberOfKeys
 The number of keys. More...
 
const int mKeyNumberOfA4
 Number of A4. More...
 

Detailed Description

Basic class to show how to implement own algorithms.

This class will calculate an equidistant tuning curve.

Definition at line 39 of file examplealgorithm.h.

Constructor & Destructor Documentation

examplealgorithm::ExampleAlgorithm::ExampleAlgorithm ( const Piano piano,
const AlgorithmFactoryDescription description 
)

Definition at line 37 of file examplealgorithm.cpp.

Member Function Documentation

void examplealgorithm::ExampleAlgorithm::algorithmWorkerFunction ( )
finaloverrideprotectedvirtual

Implements Algorithm.

Definition at line 49 of file examplealgorithm.cpp.

+ Here is the call graph for this function:

Member Data Documentation

const double examplealgorithm::ExampleAlgorithm::mConcertPitchParam
private

Definition at line 50 of file examplealgorithm.h.


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