CLAM::Fund2MIDI Class Reference

Converts fundamental to a MIDI note value. More...

#include <Fund2MIDI.hxx>

List of all members.

Public Member Functions

const char * GetClassName () const
 Override it in every subclass and retur the name of that class.
 Fund2MIDI (const ProcessingConfig &cfg=Config())
bool Do ()
 Supervised mode execution method (using ports).
bool Do (const Fundamental &inFund)

Detailed Description

Converts fundamental to a MIDI note value.

Things to know: C4 or "middle c" has a MIDI value of 60, then A4 (440Hz) has a MIDI value of 69 Taking that in account you can arrive to: $ fund_{midinote} = 69+log_{2^{(\frac{1}{12})}}(\frac{fundfrec}{440Hz}) $ and because $ log_{2^{\frac{1}{12}}}(a) = log_{e}(a)*17.31234 $ then: $ fund_{midinote} = 69+log_{e}(\frac{fundfrec}{440Hz})*17.31234 $.

Definition at line 44 of file Fund2MIDI.hxx.


Constructor & Destructor Documentation

CLAM::Fund2MIDI::Fund2MIDI ( const ProcessingConfig cfg = Config()  )  [inline]

Definition at line 57 of file Fund2MIDI.hxx.

References CLAM::Processing::Configure().


Member Function Documentation

bool CLAM::Fund2MIDI::Do ( const Fundamental inFund  ) 

Definition at line 33 of file Fund2MIDI.cxx.

bool CLAM::Fund2MIDI::Do (  )  [inline, virtual]

Supervised mode execution method (using ports).

Returns:
A boolean telling whether it has been output

Implements CLAM::Processing.

Definition at line 66 of file Fund2MIDI.hxx.

References CLAM::InPort< Token >::Consume(), and CLAM::InPort< Token >::GetData().

const char* CLAM::Fund2MIDI::GetClassName (  )  const [inline, virtual]

Override it in every subclass and retur the name of that class.

Implements CLAM::Processing.

Definition at line 55 of file Fund2MIDI.hxx.


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3