#include #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) #error You need at least flext version 0.4.1 #endif class e_major: public flext_base { FLEXT_HEADER(e_major, flext_base) public: e_major() { AddInFloat("freq in"); // measured freq in AddOutFloat("freq out"); // rounded freq out FLEXT_ADDMETHOD(0, m_float); // We're done constructing: post("e_major pitch output"); } // end of constructor protected: void m_float(float f); private: float get_freq(float f); FLEXT_CALLBACK_1(m_float, float); }; // end of class declaration for yin #include "e_major_lookup.cpp" FLEXT_NEW("e_major", e_major) void e_major::m_float(float f) { ToOutFloat(0, get_freq(f)); }