# HG changeset patch # User Chris Cannam # Date 1478862822 0 # Node ID 935214f16f91bb6c1e65f4481612cc0da157edd0 # Parent 2cd8c30131acfd3c0f27ff0086055989bbd4e42c Add pYin build, use Makefile test target diff -r 2cd8c30131ac -r 935214f16f91 build-all.sh --- a/build-all.sh Fri Nov 11 11:13:29 2016 +0000 +++ b/build-all.sh Fri Nov 11 11:13:42 2016 +0000 @@ -22,13 +22,7 @@ for x in *; do if [ -d "$x" ] && [ -f "$x/Makefile" ]; then echo - js=$(echo "$x"/*.js) - if [ ! -f "$js" ]; then - echo "Problem running test for $x: more than one js file? (js=$js)" - else - node ../piper-vamp-js/test/node-load-test.js "$(pwd)/$js" && \ - echo "Successfully ran basic load-test on $js" - fi + make -C "$x" test fi done diff -r 2cd8c30131ac -r 935214f16f91 pyin/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pyin/Makefile Fri Nov 11 11:13:42 2016 +0000 @@ -0,0 +1,28 @@ + +PIPER_VAMP_JS_DIR := ../../piper-vamp-js +PLUGIN_SRC_DIR := ../../pyin + +MODULE_NAME := PYin + +SOURCE_FILES := \ + PYinVamp.cpp \ + YinVamp.cpp \ + LocalCandidatePYIN.cpp \ + Yin.cpp \ + YinUtil.cpp \ + MonoNote.cpp \ + MonoPitch.cpp \ + MonoNoteParameters.cpp \ + SparseHMM.cpp \ + MonoNoteHMM.cpp \ + MonoPitchHMM.cpp + +PLUGIN_SOURCES := $(addprefix $(PLUGIN_SRC_DIR)/,$(SOURCE_FILES)) + +INCLUDES := -I$(PLUGIN_SRC_DIR) -I../../vamp-build-and-test/DEPENDENCIES/generic/include + +MODULE_SOURCE := pyin.cpp + +EMFLAGS := -s TOTAL_MEMORY=100000000 + +include $(PIPER_VAMP_JS_DIR)/Makefile.inc diff -r 2cd8c30131ac -r 935214f16f91 pyin/pyin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pyin/pyin.cpp Fri Nov 11 11:13:42 2016 +0000 @@ -0,0 +1,20 @@ +/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ + +#include "PiperExport.h" + +#include "PYinVamp.h" +#include "YinVamp.h" +#include "LocalCandidatePYIN.h" + +std::string soname("pyin"); + +piper_vamp_js::PiperAdapter pyinAdapter(soname); +piper_vamp_js::PiperAdapter yinAdapter(soname); +piper_vamp_js::PiperAdapter localCandAdapter(soname); + +piper_vamp_js::PiperPluginLibrary library({ + &pyinAdapter, &yinAdapter, &localCandAdapter +}); + +PIPER_EXPORT_LIBRARY(library); +