/* contains all bindings for use with emscripten */ #ifndef Maxi_Emscripten_maxiFFT_embind_h #define Maxi_Emscripten_maxiFFT_embind_h #include #include #include "fft.cpp" using namespace emscripten; EMSCRIPTEN_BINDINGS(my_module_maxiFFT) { // ------------------------------------------------------------------------------------------- // LIBS // MAXI MAXI CLOCK class_("maxiFFT") // .constructor<>() // .constructor() .smart_ptr_constructor("shared_ptr",&std::make_shared) .function("setup", &maxiFFT::setup) .function("process", &maxiFFT::process) .function("magsToDB", &maxiFFT::magsToDB) .function("spectralFlatness", &maxiFFT::spectralFlatness) .function("spectralCentroid", &maxiFFT::spectralCentroid) .function("getMagnitude", &maxiFFT::getMagnitude) .function("getMagnitudeDB", &maxiFFT::getMagnitudeDB) .function("getPhase", &maxiFFT::getPhase) // .function("setTempo", &maxiClock::setTempo) // .function("setTicksPerBeat", &maxiClock::setTicksPerBeat) // .function("isTick", &maxiClock::isTick) // .property("tick", &maxiClock::getTick, &maxiClock::setTick) ; }; #endif