#include #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) #error You need at least flext version 0.4.1 #endif class e_gypsy: public flext_base { FLEXT_HEADER(e_gypsy, flext_base) public: e_gypsy() { AddInFloat("freq in"); // measured freq in AddOutFloat("freq out"); // rounded freq out FLEXT_ADDMETHOD(0, m_float); // We're done constructing: post("gypsy scale in E: 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_gypsy_lookup.cpp" FLEXT_NEW("e_gypsy", e_gypsy) void e_gypsy::m_float(float f) { ToOutFloat(0, get_freq(f)); }