Update libvamp to 2.5.

This commit is contained in:
lllucius 2013-10-31 06:33:59 +00:00
parent c8aa505879
commit 6fef6dd8b4
77 changed files with 6254 additions and 3598 deletions

View File

@ -124,12 +124,9 @@ Upstream Version: 0.0.5 (although no file downloads are available yet)
libvamp
-------
Library to load and use VAMP plug-ins. http://www.vamp-plugins.org/
Version in Audacity SVN: 2.0
Patches: optional-progs.patch: Make building the Vamp host (and so the
dependecy on libsndfile) optional rather than mandatory. Accepted upstream.
distclean.patch: ensure that distclean actually works and takes away
auto* droppings. Accepted upstream.
Upstream Version: 2.4
Version in Audacity SVN: 2.5
Patches: none
Upstream Version: 2.5
libvorbis
---------

View File

@ -0,0 +1,4 @@
repo: 6479539d1b32056cb2477596121ab072e31e5b42
node: 92b1fbb1cc878a60a3dfd4aa036e938767705b3a
branch: default
tag: vamp-plugin-sdk-v2.5

25
lib-src/libvamp/.hgignore Normal file
View File

@ -0,0 +1,25 @@
syntax: glob
doc/
*.o
autom4te*
*.m4
*.a
*.so
*.orig
*~
host/vamp-simple-host
rdf/generator/vamp-rdf-template-generator
config.log
config.status
Makefile
re:^build/Debug/
re:^build/Release/
*.zip
build/UpgradeLog*
*.suo
*.user
*.sdf
*.filters
re:^build/_UpgradeReport_Files/
*.ipch

23
lib-src/libvamp/.hgtags Normal file
View File

@ -0,0 +1,23 @@
003147fdf42c0688992e9e07bfd3ca7e6d1ace10 vamp-plugin-sdk-v2.2
036db77506f732caf1d058b5f61f89cb7c69b177 vamp-plugin-sdk-v1.1b
120f8888034735fc9ba91a073ca9e63467c5c8ae vamp-plugin-sdk-v1.3
1da43924fa143ba841d37a435c9185b9dbc2976a vamp-plugin-sdk-v1.2
2403ae53b8a54ca15993502ceae0649514a48821 vamp-plugin-sdk-v1.0pre1
4412c619b3739fb6567604fb56f0edd15c824627 vamp-plugin-sdk-v0.9rc2
6bf198e06d721fe081866ce07efbce4341a953c7 vamp-plugin-sdk-v1.1
7d678f889789e2244332acf1f23c94fc4b0ed685 vamp-plugin-sdk-v2.0pre1
9dc3a5e17600052d3e5e7c55e90b24b50727ce70 vamp-plugin-sdk-v2.0pre2
ba5f87117b676dd0897783b1cf2b2db933472f2c vamp-plugin-sdk-v1.1pre1
bb67b61458122dd202e8573ae34cb6ef171e1476 vamp-plugin-sdk-v2.1
ca1309b937b6b79bd07a53920e3309edf3ac2e04 vamp-plugin-sdk-v0.9rc1
ce61ad9b9159b00a8d7a3dd468c34ac2bf474328 1.0
de3e865f92c879fb8b247ab97e15f789a324170a vamp-plugin-sdk-v2.0
2351610cd3b0e8dfb762f94a9b264b61d82967bb vamp-plugin-sdk-v2.2.1
71b69f569f5204f8409ba0c735855a61eb6d0841 vamp-plugin-sdk-v2.3
71b69f569f5204f8409ba0c735855a61eb6d0841 vamp-plugin-sdk-v2.3
2c546a899eec72623c8f2333136f230f0302ca5f vamp-plugin-sdk-v2.3
2c546a899eec72623c8f2333136f230f0302ca5f vamp-plugin-sdk-v2.3
ef1dc9963638adc84bda46d4aa31b99f3229a892 vamp-plugin-sdk-v2.3
ef1dc9963638adc84bda46d4aa31b99f3229a892 vamp-plugin-sdk-v2.3
8cab5a0198d64ee606727e5f8a0683c44a55f432 vamp-plugin-sdk-v2.3
393885d7ea72d6678ea7973363cf38623fa829f5 vamp-plugin-sdk-v2.4

View File

@ -1,5 +1,55 @@
Version 2.5, 2013-05-08 (maintenance release):
Version 2.0
* Fix incorrect handling of FixedSampleRate outputs in the
PluginBufferingAdapter. Un-timestamped features on these outputs
were incorrectly being timestamped from the process timestamp,
where they should have been timed relative to the previous
feature on the output according to the output's sample rate.
* Fix return of uninitialised memory through getCurrentProgram
when plugin specifies no programs
* Ensure output sample rate is initialised (to 0) for variable-rate
outputs where the plugin forgets to set a rate
Version 2.4, 2012-07-12 (maintenance and minor feature release):
* Provide a simple FFT implementation as a convenience for plugins
* Add symbols to make the library versions discoverable by autoconf
using C linkage
* Fix failure to open plugins from Unicode builds on Windows (thanks
RJ Ryan)
* Fix thread-safety issue in PluginInputDomainAdapter
* Add build for OS/X 10.7+/Xcode 4; remove build for OpenSolaris
Version 2.3, 2011-09-28 (minor feature release):
* Add window type property to PluginInputDomainAdapter
* Permit vamp-simple-host to use streaming input with indeterminate
length (thanks Dan Stowell)
* Print label as well as values from vamp-simple-host (thanks Dan)
Version 2.2.1, 2011-04-05 (maintenance release):
* Minor build fixes for OS/X
Version 2.2, 2010-08-26 (maintenance release):
* Fixes to OS/X build procedures so as to build three-way
universal binaries (PPC, i386, x86_64) by default. Forced upon
us by OS/X 10.6 defaulting to 64-bit rather than 32-bit
Version 2.1, 2009-09-22 (maintenance and minor feature release):
* Add ProcessTimestampMethod to PluginInputDomainAdapter, offering
the ability to decide how data buffering and timestamping works for
frequency-domain plugins (whose process timestamps have to be at
the centre of each processing block rather than the start)
* Make PluginBufferingAdapter take into account any timestamp shift
introduced by a PluginInputDomainAdapter that it wraps
* Fix crash in PluginAdapter when plugin library getDescriptor fails
on plugin construction
* Add plugin skeleton files as starting point for new developers
Version 2.0, 2008-12-08 (major release):
* Feature structure now has an optional duration (plugin API change)
* Libraries reorganised into separate include and src directories for

View File

@ -1,4 +1,8 @@
Vamp Plugin SDK
Copyright (c) 2005-2006 Chris Cannam
Copyright (c) 2006-2009 Queen Mary, University of London
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
@ -13,8 +17,8 @@
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

16
lib-src/libvamp/INSTALL Normal file
View File

@ -0,0 +1,16 @@
Compiling and Installing the SDK and Examples
=============================================
* Windows with Visual C++: Please read build/README.msvc
* Mac OS/X: Please read build/README.osx
* Solaris: Please read build/README.osol
* Linux: Please read build/README.linux
* Windows cross-compiling from Linux: Try build/Makefile.mingw32
See the README file in this directory for more information about this SDK.

View File

@ -34,20 +34,22 @@ RDFGENDIR = rdf/generator
# clean -- remove binary targets
# distclean -- remove all targets
#
default: @TARGETS@
default: @TARGETS@
# Compile flags
#
CXXFLAGS := -I. @CXXFLAGS@ @SNDFILE_CFLAGS@
CC = @CC@
CXX = @CXX@
CXXFLAGS = -I. @CXXFLAGS@ @SNDFILE_CFLAGS@
# ar, ranlib
#
AR := ar
RANLIB := ranlib
AR = ar
RANLIB = ranlib
# Libraries required for the plugins.
#
PLUGIN_LIBS = $(SRCDIR)/libvamp-sdk.a
PLUGIN_LIBS = ./libvamp-sdk.a
# File extension for a dynamically loadable object
#
@ -57,37 +59,37 @@ PLUGIN_EXT = .so
# Libraries required for the host.
#
HOST_LIBS = $(SRCDIR)/libvamp-hostsdk.a @SNDFILE_LIBS@ @LIBS@
HOST_LIBS = ./libvamp-hostsdk.a @SNDFILE_LIBS@ @LIBS@
# Libraries required for the RDF template generator.
#
RDFGEN_LIBS = $(SRCDIR)/libvamp-hostsdk.a @LIBS@
RDFGEN_LIBS = ./libvamp-hostsdk.a @LIBS@
# Locations for "make install". This will need quite a bit of
# editing for non-Linux platforms. Of course you don't necessarily
# have to use "make install".
#
INSTALL_PREFIX := @prefix@
INSTALL_API_HEADERS := $(INSTALL_PREFIX)/include/vamp
INSTALL_SDK_HEADERS := $(INSTALL_PREFIX)/include/vamp-sdk
INSTALL_HOSTSDK_HEADERS := $(INSTALL_PREFIX)/include/vamp-hostsdk
INSTALL_SDK_LIBS := $(INSTALL_PREFIX)/lib
INSTALL_PLUGINS := $(INSTALL_PREFIX)/lib/vamp
INSTALL_BINARIES := $(INSTALL_PREFIX)/bin
INSTALL_PREFIX = @prefix@
INSTALL_API_HEADERS = $(INSTALL_PREFIX)/include/vamp
INSTALL_SDK_HEADERS = $(INSTALL_PREFIX)/include/vamp-sdk
INSTALL_HOSTSDK_HEADERS = $(INSTALL_PREFIX)/include/vamp-hostsdk
INSTALL_SDK_LIBS = $(INSTALL_PREFIX)/lib
INSTALL_PLUGINS = $(INSTALL_PREFIX)/lib/vamp
INSTALL_BINARIES = $(INSTALL_PREFIX)/bin
INSTALL_SDK_LIBNAME := libvamp-sdk.so.2.0.0
INSTALL_SDK_LINK_ABI := libvamp-sdk.so.2
INSTALL_SDK_LINK_DEV := libvamp-sdk.so
INSTALL_SDK_STATIC := libvamp-sdk.a
INSTALL_SDK_LA := libvamp-sdk.la
INSTALL_SDK_LIBNAME = libvamp-sdk.so.2.5.0
INSTALL_SDK_LINK_ABI = libvamp-sdk.so.2
INSTALL_SDK_LINK_DEV = libvamp-sdk.so
INSTALL_SDK_STATIC = libvamp-sdk.a
INSTALL_SDK_LA = libvamp-sdk.la
INSTALL_HOSTSDK_LIBNAME := libvamp-hostsdk.so.3.0.0
INSTALL_HOSTSDK_LINK_ABI := libvamp-hostsdk.so.3
INSTALL_HOSTSDK_LINK_DEV := libvamp-hostsdk.so
INSTALL_HOSTSDK_STATIC := libvamp-hostsdk.a
INSTALL_HOSTSDK_LA := libvamp-hostsdk.la
INSTALL_HOSTSDK_LIBNAME = libvamp-hostsdk.so.3.5.0
INSTALL_HOSTSDK_LINK_ABI = libvamp-hostsdk.so.3
INSTALL_HOSTSDK_LINK_DEV = libvamp-hostsdk.so
INSTALL_HOSTSDK_STATIC = libvamp-hostsdk.a
INSTALL_HOSTSDK_LA = libvamp-hostsdk.la
INSTALL_PKGCONFIG := $(INSTALL_PREFIX)/lib/pkgconfig
INSTALL_PKGCONFIG = $(INSTALL_PREFIX)/lib/pkgconfig
# Flags required to tell the compiler to create a dynamically loadable object
#
@ -119,6 +121,7 @@ SDK_HEADERS = \
$(SDKDIR)/PluginAdapter.h \
$(SDKDIR)/PluginBase.h \
$(SDKDIR)/RealTime.h \
$(SDKDIR)/FFT.h \
$(SDKDIR)/plugguard.h \
$(SDKDIR)/vamp-sdk.h
@ -138,7 +141,9 @@ HOSTSDK_HEADERS = \
SDK_OBJECTS = \
$(SDKSRCDIR)/PluginAdapter.o \
$(SDKSRCDIR)/RealTime.o
$(SDKSRCDIR)/RealTime.o \
$(SDKSRCDIR)/FFT.o \
$(SDKSRCDIR)/acsymbols.o
HOSTSDK_OBJECTS = \
$(HOSTSDKSRCDIR)/PluginHostAdapter.o \
@ -148,19 +153,20 @@ HOSTSDK_OBJECTS = \
$(HOSTSDKSRCDIR)/PluginInputDomainAdapter.o \
$(HOSTSDKSRCDIR)/PluginLoader.o \
$(HOSTSDKSRCDIR)/PluginSummarisingAdapter.o \
$(HOSTSDKSRCDIR)/PluginWrapper.o
$(HOSTSDKSRCDIR)/PluginWrapper.o \
$(HOSTSDKSRCDIR)/acsymbols.o
SDK_STATIC = \
$(SRCDIR)/libvamp-sdk.a
./libvamp-sdk.a
HOSTSDK_STATIC = \
$(SRCDIR)/libvamp-hostsdk.a
./libvamp-hostsdk.a
SDK_DYNAMIC = \
$(SRCDIR)/libvamp-sdk$(PLUGIN_EXT)
./libvamp-sdk$(PLUGIN_EXT)
HOSTSDK_DYNAMIC = \
$(SRCDIR)/libvamp-hostsdk$(PLUGIN_EXT)
./libvamp-hostsdk$(PLUGIN_EXT)
SDK_LA = \
$(LADIR)/libvamp-sdk.la
@ -191,6 +197,9 @@ PLUGIN_TARGET = \
PLUGIN_CAT = \
$(EXAMPLEDIR)/vamp-example-plugins.cat
PLUGIN_TTL = \
$(EXAMPLEDIR)/vamp-example-plugins.n3
HOST_HEADERS = \
$(HOSTDIR)/system.h
@ -263,6 +272,7 @@ install: $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLU
cp $(RDFGEN_TARGET) $(DESTDIR)$(INSTALL_BINARIES)
cp $(PLUGIN_TARGET) $(DESTDIR)$(INSTALL_PLUGINS)
cp $(PLUGIN_CAT) $(DESTDIR)$(INSTALL_PLUGINS)
cp $(PLUGIN_TTL) $(DESTDIR)$(INSTALL_PLUGINS)
cp $(API_HEADERS) $(DESTDIR)$(INSTALL_API_HEADERS)
cp $(SDK_HEADERS) $(DESTDIR)$(INSTALL_SDK_HEADERS)
cp $(HOSTSDK_HEADERS) $(DESTDIR)$(INSTALL_HOSTSDK_HEADERS)
@ -357,6 +367,7 @@ src/vamp-sdk/PluginAdapter.o: vamp-sdk/PluginAdapter.h vamp/vamp.h
src/vamp-sdk/PluginAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
src/vamp-sdk/PluginAdapter.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
src/vamp-sdk/RealTime.o: ./vamp-sdk/RealTime.h vamp-sdk/plugguard.h
src/vamp-sdk/FFT.o: src/vamp-sdk/FFT.cpp vamp-sdk/FFT.h src/vamp-sdk/FFTimpl.cpp
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginBufferingAdapter.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/Plugin.h
@ -381,6 +392,8 @@ src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/FFT.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: src/vamp-sdk/FFTimpl.cpp
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginHostAdapter.h
src/vamp-hostsdk/PluginLoader.o: vamp/vamp.h vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/PluginBase.h

View File

@ -9,7 +9,7 @@ An API for audio analysis and feature extraction plugins.
Vamp is an API for C and C++ plugins that process sampled audio data
to produce descriptive output (measurements or semantic observations).
This is version 2.0 of the Vamp plugin Software Development Kit.
This is version 2.5 of the Vamp plugin Software Development Kit.
Plugins and hosts built with this SDK are binary compatible with those
built using version 1.0 of the SDK, with certain restrictions. See
@ -155,6 +155,13 @@ plugin. They are also intended to be correct and useful, if simple.
plugin having several outputs with varying feature structures.
skeleton
--------
Skeleton code that could be used as a template for your new plugin
implementation.
host
----
@ -230,7 +237,7 @@ Authors
Vamp and the Vamp SDK were designed and made at the Centre for Digital
Music at Queen Mary, University of London.
The SDK was written by Chris Cannam, copyright (c) 2005-2008
The SDK was written by Chris Cannam, copyright (c) 2005-2009
Chris Cannam and QMUL.
Mark Sandler and Christian Landone provided ideas and direction, and

View File

@ -1,4 +1,4 @@
# Doxyfile 1.5.5
# Doxyfile 1.5.8
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
@ -31,7 +31,7 @@ PROJECT_NAME = VampPluginSDK
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 2.0
PROJECT_NUMBER = 2.5
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@ -57,8 +57,8 @@ CREATE_SUBDIRS = NO
# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek,
# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages),
# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish,
# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish,
# and Ukrainian.
# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene,
# Spanish, Swedish, and Ukrainian.
OUTPUT_LANGUAGE = English
@ -155,13 +155,6 @@ QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
# If the DETAILS_AT_TOP tag is set to YES then Doxygen
# will output the detailed description near the top, like JavaDoc.
# If set to NO, the detailed description appears after the member
# documentation.
DETAILS_AT_TOP = YES
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
# member inherits the documentation from any documented member that it
# re-implements.
@ -214,6 +207,17 @@ OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
# Doxygen selects the parser to use depending on the extension of the files it parses.
# With this tag you can assign which parser to use for a given extension.
# Doxygen has a built-in mapping, but you can override or extend it using this tag.
# The format is ext=language, where ext is a file extension, and language is one of
# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
# use: inc=Fortran f=C
EXTENSION_MAPPING =
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
# to include (a tag file for) the STL sources as input, then you should
# set this tag to YES in order to let doxygen match functions declarations and
@ -223,7 +227,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
BUILTIN_STL_SUPPORT = NO
# If you use Microsoft's C++/CLI language, you should set this option to YES to
# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
CPP_CLI_SUPPORT = NO
@ -234,6 +238,15 @@ CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
# For Microsoft's IDL there are propget and propput attributes to indicate getter
# and setter methods for a property. Setting this option to YES (the default)
# will make doxygen to replace the get and set methods by a property in the
# documentation. This will only work if the methods are indeed getting or
# setting a simple type. If this is not the case, or you want to show the
# methods anyway, you should set this option to NO.
IDL_PROPERTY_SUPPORT = YES
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
# tag is set to YES, then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
@ -259,6 +272,22 @@ SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
# determine which symbols to keep in memory and which to flush to disk.
# When the cache is full, less often used symbols will be written to disk.
# For small to medium size projects (<1000 input files) the default value is
# probably good enough. For larger projects a too small cache size can cause
# doxygen to be busy swapping symbols to and from disk most of the time
# causing a significant performance penality.
# If the system has enough physical memory increasing the cache will improve the
# performance by keeping more symbols in memory. Note that the value works on
# a logarithmic scale so increasing the size by one will rougly double the
# memory usage. The cache size is given by this formula:
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols
SYMBOL_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
@ -386,7 +415,7 @@ SORT_GROUP_NAMES = NO
# sorted by fully-qualified names, including namespaces. If set to
# NO (the default), the class list will be sorted only by class name,
# not including the namespace part.
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
# Note: This option applies only to the class list, not to the
# alphabetical list.
@ -443,6 +472,19 @@ SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
# This will remove the Files entry from the Quick Index and from the
# Folder Tree View (if specified). The default is YES.
SHOW_FILES = YES
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
# Namespaces page.
# This will remove the Namespaces entry from the Quick Index
# and from the Folder Tree View (if specified). The default is YES.
SHOW_NAMESPACES = YES
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
# doxygen should invoke to get the current version for each file (typically from
# the version control system). Doxygen will invoke the program by executing (via
@ -453,6 +495,15 @@ SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
# doxygen. The layout file controls the global structure of the generated output files
# in an output format independent way. The create the layout file that represents
# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
# file name after the option, if omitted DoxygenLayout.xml will be used as the name
# of the layout file.
LAYOUT_FILE =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
@ -609,14 +660,17 @@ IMAGE_PATH =
# by executing (via popen()) the command <filter> <input-file>, where <filter>
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
# input file. Doxygen will then use the output that the filter program writes
# to standard output. If FILTER_PATTERNS is specified, this tag will be
# to standard output.
# If FILTER_PATTERNS is specified, this tag will be
# ignored.
INPUT_FILTER =
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
# basis. Doxygen will compare the file name with each pattern and apply the
# filter if there is a match. The filters are a list of the form:
# basis.
# Doxygen will compare the file name with each pattern and apply the
# filter if there is a match.
# The filters are a list of the form:
# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
# is applied to all files.
@ -651,22 +705,23 @@ INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
# If the REFERENCED_BY_RELATION tag is set to YES (the default)
# If the REFERENCED_BY_RELATION tag is set to YES
# then for each documented function all documented
# functions referencing it will be listed.
REFERENCED_BY_RELATION = YES
# If the REFERENCES_RELATION tag is set to YES (the default)
# If the REFERENCES_RELATION tag is set to YES
# then for each documented function all documented entities
# called/used by that function will be listed.
REFERENCES_RELATION = YES
# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
# link to the source code. Otherwise they will link to the documentstion.
# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
# link to the source code.
# Otherwise they will link to the documentation.
REFERENCES_LINK_SOURCE = YES
@ -755,12 +810,13 @@ HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
# will be generated that can be used as input for tools like the
# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
# of the generated HTML documentation.
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded. For this to work a browser that supports
# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
GENERATE_HTMLHELP = NO
HTML_DYNAMIC_SECTIONS = NO
# If the GENERATE_DOCSET tag is set to YES, additional index files
# will be generated that can be used as input for Apple's Xcode 3
@ -769,7 +825,8 @@ GENERATE_HTMLHELP = NO
# HTML output directory. Running make will produce the docset in that
# directory and running "make install" will install the docset in
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
# it at startup.
# it at startup.
# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
GENERATE_DOCSET = NO
@ -787,13 +844,12 @@ DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded. For this to work a browser that supports
# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
# will be generated that can be used as input for tools like the
# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
# of the generated HTML documentation.
HTML_DYNAMIC_SECTIONS = NO
GENERATE_HTMLHELP = NO
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
# be used to specify the file name of the resulting .chm file. You
@ -815,6 +871,12 @@ HHC_LOCATION =
GENERATE_CHI = NO
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
# is used to encode HtmlHelp index (hhk), content (hhc) and project file
# content.
CHM_INDEX_ENCODING =
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
# controls whether a binary table of contents is generated (YES) or a
# normal table of contents (NO) in the .chm file.
@ -826,6 +888,55 @@ BINARY_TOC = NO
TOC_EXPAND = NO
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
# are set, an additional index file will be generated that can be used as input for
# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
# HTML documentation.
GENERATE_QHP = NO
# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
# be used to specify the file name of the resulting .qch file.
# The path specified is relative to the HTML output folder.
QCH_FILE =
# The QHP_NAMESPACE tag specifies the namespace to use when generating
# Qt Help Project output. For more information please see
# http://doc.trolltech.com/qthelpproject.html#namespace
QHP_NAMESPACE =
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
# Qt Help Project output. For more information please see
# http://doc.trolltech.com/qthelpproject.html#virtual-folders
QHP_VIRTUAL_FOLDER = doc
# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
# For more information please see
# http://doc.trolltech.com/qthelpproject.html#custom-filters
QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
# filter section matches.
# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
QHP_SECT_FILTER_ATTRS =
# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
# be used to specify the location of Qt's qhelpgenerator.
# If non-empty doxygen will try to run qhelpgenerator on the generated
# .qhp file.
QHG_LOCATION =
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
# top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it.
@ -837,12 +948,20 @@ DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
# generated containing a tree-like index structure (just like the one that
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
# structure should be generated to display hierarchical information.
# If the tag value is set to FRAME, a side panel will be generated
# containing a tree-like index structure (just like the one that
# is generated for HTML Help). For this to work a browser that supports
# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
# probably better off using the HTML help feature.
# probably better off using the HTML help feature. Other possible values
# for this tag are: HIERARCHIES, which will generate the Groups, Directories,
# and Class Hierarchy pages using a tree view instead of an ordered list;
# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which
# disables this behavior completely. For backwards compatibility with previous
# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE
# respectively.
GENERATE_TREEVIEW = YES
@ -852,6 +971,14 @@ GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 250
# Use this tag to change the font size of Latex formulas included
# as images in the HTML documentation. The default is 10. Note that
# when you change the font size after a successful doxygen run you need
# to manually remove any form_*.png images from the HTML output directory
# to force them to be regenerated.
FORMULA_FONTSIZE = 10
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
@ -1064,8 +1191,10 @@ GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
# nicely formatted so it can be parsed by a human reader. This is useful
# if you want to understand what is going on. On the other hand, if this
# nicely formatted so it can be parsed by a human reader.
# This is useful
# if you want to understand what is going on.
# On the other hand, if this
# tag is set to NO the size of the Perl module output will be much smaller
# and Perl will parse it just the same.
@ -1152,14 +1281,16 @@ SKIP_FUNCTION_MACROS = YES
# Optionally an initial location of the external documentation
# can be added for each tagfile. The format of a tag file without
# this location is as follows:
# TAGFILES = file1 file2 ...
#
# TAGFILES = file1 file2 ...
# Adding location for the tag files is done as follows:
# TAGFILES = file1=loc1 "file2 = loc2" ...
#
# TAGFILES = file1=loc1 "file2 = loc2" ...
# where "loc1" and "loc2" can be relative or absolute paths or
# URLs. If a location is present for each tag, the installdox tool
# does not have to be run to correct the links.
# Note that each tag file must have a unique name
# (where the name does NOT include the path)
# does not have to be run to correct the links.
# Note that each tag file must have a unique name
# (where the name does NOT include the path)
# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.
@ -1198,7 +1329,7 @@ PERL_PATH = /usr/bin/perl
# fallback. It is recommended to install and use dot, since it yields more
# powerful graphs.
CLASS_DIAGRAMS = NO
CLASS_DIAGRAMS = YES
# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see
@ -1222,6 +1353,29 @@ HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
# By default doxygen will write a font called FreeSans.ttf to the output
# directory and reference it in all dot files that doxygen generates. This
# font does not include all possible unicode characters however, so when you need
# these (or just want a differently looking font) you can specify the font name
# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
# which can be done by putting it in a standard location or by setting the
# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
# containing the font.
DOT_FONTNAME = DejaVuSansCondensed
# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
# The default size is 10pt.
DOT_FONTSIZE = 9
# By default doxygen will tell dot to use the output directory to look for the
# FreeSans.ttf font (which doxygen will put there itself). If you specify a
# different font using DOT_FONTNAME you can set the path where dot
# can find it using this tag.
DOT_FONTPATH = /usr/share/fonts/truetype/ttf-dejavu
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for each documented class showing the direct and
# indirect inheritance relations. Setting this tag to YES will force the
@ -1289,13 +1443,13 @@ GRAPHICAL_HIERARCHY = YES
# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
# then doxygen will show the dependencies a directory has on other directories
# in a graphical way. The dependency relations are determined by the #include
# in a graphical way. The dependency relations are determined by the #include
# relations between the files in the directories.
DIRECTORY_GRAPH = YES
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. Possible values are png, jpg, or gif
# generated by dot. Possible values are png, jpg, or gif
# If left blank png will be used.
DOT_IMAGE_FORMAT = png
@ -1311,7 +1465,7 @@ DOT_PATH =
DOTFILE_DIRS =
# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
# nodes that will be shown in the graph. If the number of nodes in a graph
# becomes larger than this value, doxygen will truncate the graph, which is
# visualized by representing a node as a red box. Note that doxygen if the
@ -1332,10 +1486,10 @@ DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
# background. This is enabled by default, which results in a transparent
# background. Warning: Depending on the platform used, enabling this option
# may lead to badly anti-aliased labels on the edges of a graph (i.e. they
# become hard to read).
# background. This is disabled by default, because dot on Windows does not
# seem to support this out of the box. Warning: Depending on the platform used,
# enabling this option may lead to badly anti-aliased labels on the edges of
# a graph (i.e. they become hard to read).
DOT_TRANSPARENT = NO
@ -1359,7 +1513,7 @@ GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
# Options related to the search engine
#---------------------------------------------------------------------------
# The SEARCHENGINE tag specifies whether or not a search engine should be

View File

@ -0,0 +1,354 @@
# Makefile for the Vamp plugin SDK. This builds the SDK objects,
# libraries, example plugins, and the test host. Please adjust to
# suit your operating system requirements.
#
# This version of the Makefile is approximately correct for cross-
# compiling for Windows from Linux using the MinGW tools.
# Note that it has no "install" target; the following are the
# library and related files that may be of interest resulting from
# the build:
#
# libvamp-sdk.dll [SDK dynamic library for plugins]
# libvamp-hostsdk.dll [SDK dynamic library for hosts]
#
# libvamp-sdk.a [SDK static library for plugins]
# libvamp-hostsdk.a [SDK static library for hosts]
#
# examples/vamp-example-plugins.cat [copy this to your Vamp plugin dir]
# examples/vamp-example-plugins.dll [copy this to your Vamp plugin dir]
#
# host/vamp-simple-host [requires libsndfile to build]
#
# rdf/generator/vamp-rdf-template-generator
# Makefile for the Vamp plugin SDK. This builds the SDK objects,
# libraries, example plugins, and the test host. Please adjust to
# suit your operating system requirements.
APIDIR = vamp
SDKDIR = vamp-sdk
HOSTSDKDIR = vamp-hostsdk
SRCDIR = src
SDKSRCDIR = src/vamp-sdk
HOSTSDKSRCDIR = src/vamp-hostsdk
EXAMPLEDIR = examples
HOSTDIR = host
PCDIR = pkgconfig
LADIR = build
RDFGENDIR = rdf/generator
###
### Start of user-serviceable parts
###
# Default build target (or use "make <target>" to select one).
# Targets are:
# all -- build everything
# sdk -- build all the Vamp SDK libraries for plugins and hosts
# sdkstatic -- build only the static versions of the SDK libraries
# plugins -- build the example plugins (and the SDK if required)
# host -- build the simple Vamp plugin host (and the SDK if required)
# rdfgen -- build the RDF template generator (and the SDK if required)
# test -- build the host and example plugins, and run a quick test
# clean -- remove binary targets
# distclean -- remove all targets
#
default: all
# Tools selection
#
CXX = i586-mingw32msvc-g++
LD = i586-mingw32msvc-g++
AR = i586-mingw32msvc-ar
RANLIB = i586-mingw32msvc-ranlib
# Compile flags
#
CXXFLAGS = -O2 -Wall -I. -I../include
# Libraries required for the plugins.
#
PLUGIN_LIBS = ./libvamp-sdk.a
# File extension for a dynamically loadable object
#
PLUGIN_EXT = .dll
# Libraries required for the host.
#
HOST_LIBS = ./libvamp-hostsdk.a -L../lib -lsndfile
# Libraries required for the RDF template generator.
#
RDFGEN_LIBS = ./libvamp-hostsdk.a
# Flags required to tell the compiler to create a dynamically loadable object
#
DYNAMIC_LDFLAGS = --static-libgcc -shared -Wl,-Bsymbolic
# Flags for building specific plugin and library targets. We need to
# tell the linker the formal name for the library, and for plugins we
# also want to tell the linker to make all symbols in the library
# hidden except for the public entry point (making for a tidier library).
#
PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,--version-script=build/vamp-plugin.map
SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,-soname=$(INSTALL_SDK_LIBNAME)
HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,-soname=$(INSTALL_HOSTSDK_LIBNAME)
### End of user-serviceable parts
API_HEADERS = \
$(APIDIR)/vamp.h
SDK_HEADERS = \
$(SDKDIR)/Plugin.h \
$(SDKDIR)/PluginAdapter.h \
$(SDKDIR)/PluginBase.h \
$(SDKDIR)/RealTime.h \
$(SDKDIR)/FFT.h \
$(SDKDIR)/plugguard.h \
$(SDKDIR)/vamp-sdk.h
HOSTSDK_HEADERS = \
$(HOSTSDKDIR)/Plugin.h \
$(HOSTSDKDIR)/PluginBase.h \
$(HOSTSDKDIR)/PluginHostAdapter.h \
$(HOSTSDKDIR)/RealTime.h \
$(HOSTSDKDIR)/PluginBufferingAdapter.h \
$(HOSTSDKDIR)/PluginChannelAdapter.h \
$(HOSTSDKDIR)/PluginInputDomainAdapter.h \
$(HOSTSDKDIR)/PluginLoader.h \
$(HOSTSDKDIR)/PluginSummarisingAdapter.h \
$(HOSTSDKDIR)/PluginWrapper.h \
$(HOSTSDKDIR)/hostguard.h \
$(HOSTSDKDIR)/vamp-hostsdk.h
SDK_OBJECTS = \
$(SDKSRCDIR)/PluginAdapter.o \
$(SDKSRCDIR)/RealTime.o \
$(SDKSRCDIR)/FFT.o \
$(SDKSRCDIR)/acsymbols.o
HOSTSDK_OBJECTS = \
$(HOSTSDKSRCDIR)/PluginHostAdapter.o \
$(HOSTSDKSRCDIR)/RealTime.o \
$(HOSTSDKSRCDIR)/PluginBufferingAdapter.o \
$(HOSTSDKSRCDIR)/PluginChannelAdapter.o \
$(HOSTSDKSRCDIR)/PluginInputDomainAdapter.o \
$(HOSTSDKSRCDIR)/PluginLoader.o \
$(HOSTSDKSRCDIR)/PluginSummarisingAdapter.o \
$(HOSTSDKSRCDIR)/PluginWrapper.o \
$(HOSTSDKSRCDIR)/acsymbols.o
SDK_STATIC = \
./libvamp-sdk.a
HOSTSDK_STATIC = \
./libvamp-hostsdk.a
SDK_DYNAMIC = \
./libvamp-sdk$(PLUGIN_EXT)
HOSTSDK_DYNAMIC = \
./libvamp-hostsdk$(PLUGIN_EXT)
SDK_LA = \
$(LADIR)/libvamp-sdk.la
HOSTSDK_LA = \
$(LADIR)/libvamp-hostsdk.la
PLUGIN_HEADERS = \
$(EXAMPLEDIR)/SpectralCentroid.h \
$(EXAMPLEDIR)/PowerSpectrum.h \
$(EXAMPLEDIR)/PercussionOnsetDetector.h \
$(EXAMPLEDIR)/FixedTempoEstimator.h \
$(EXAMPLEDIR)/AmplitudeFollower.h \
$(EXAMPLEDIR)/ZeroCrossing.h
PLUGIN_OBJECTS = \
$(EXAMPLEDIR)/SpectralCentroid.o \
$(EXAMPLEDIR)/PowerSpectrum.o \
$(EXAMPLEDIR)/PercussionOnsetDetector.o \
$(EXAMPLEDIR)/FixedTempoEstimator.o \
$(EXAMPLEDIR)/AmplitudeFollower.o \
$(EXAMPLEDIR)/ZeroCrossing.o \
$(EXAMPLEDIR)/plugins.o
PLUGIN_TARGET = \
$(EXAMPLEDIR)/vamp-example-plugins$(PLUGIN_EXT)
HOST_HEADERS = \
$(HOSTDIR)/system.h
HOST_OBJECTS = \
$(HOSTDIR)/vamp-simple-host.o
HOST_TARGET = \
$(HOSTDIR)/vamp-simple-host
RDFGEN_OBJECTS = \
$(RDFGENDIR)/vamp-rdf-template-generator.o
RDFGEN_TARGET = \
$(RDFGENDIR)/vamp-rdf-template-generator
sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC)
sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC)
$(RANLIB) $(SDK_STATIC)
$(RANLIB) $(HOSTSDK_STATIC)
plugins: $(PLUGIN_TARGET)
host: $(HOST_TARGET)
rdfgen: $(RDFGEN_TARGET)
all: sdk plugins host rdfgen test
$(SDK_STATIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
$(AR) r $@ $(SDK_OBJECTS)
$(HOSTSDK_STATIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
$(AR) r $@ $(HOSTSDK_OBJECTS)
$(SDK_DYNAMIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
$(CXX) $(LDFLAGS) $(SDK_DYNAMIC_LDFLAGS) -o $@ $(SDK_OBJECTS)
$(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
$(CXX) $(LDFLAGS) $(HOSTSDK_DYNAMIC_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS)
$(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS)
$(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
$(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS)
$(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS)
$(RDFGEN_TARGET): $(RDFGEN_OBJECTS) $(HOSTSDK_STATIC)
$(CXX) $(LDFLAGS) $(RDFGEN_LDFLAGS) -o $@ $(RDFGEN_OBJECTS) $(RDFGEN_LIBS)
test: plugins host
VAMP_PATH=$(EXAMPLEDIR) $(HOST_TARGET) -l
clean:
rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) $(RDFGEN_OBJECTS)
distclean: clean
rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) $(RDFGEN_TARGET) *~ */*~
# DO NOT DELETE
examples/AmplitudeFollower.o: examples/AmplitudeFollower.h vamp-sdk/Plugin.h
examples/AmplitudeFollower.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/AmplitudeFollower.o: vamp-sdk/RealTime.h
examples/FixedTempoEstimator.o: examples/FixedTempoEstimator.h
examples/FixedTempoEstimator.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
examples/FixedTempoEstimator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
examples/PercussionOnsetDetector.o: examples/PercussionOnsetDetector.h
examples/PercussionOnsetDetector.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
examples/PercussionOnsetDetector.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
examples/SpectralCentroid.o: examples/SpectralCentroid.h vamp-sdk/Plugin.h
examples/SpectralCentroid.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/SpectralCentroid.o: vamp-sdk/RealTime.h
examples/PowerSpectrum.o: examples/PowerSpectrum.h vamp-sdk/Plugin.h
examples/PowerSpectrum.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/PowerSpectrum.o: vamp-sdk/RealTime.h
examples/ZeroCrossing.o: examples/ZeroCrossing.h vamp-sdk/Plugin.h
examples/ZeroCrossing.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/ZeroCrossing.o: vamp-sdk/RealTime.h
examples/plugins.o: vamp/vamp.h vamp-sdk/PluginAdapter.h vamp-sdk/Plugin.h
examples/plugins.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/plugins.o: vamp-sdk/RealTime.h examples/ZeroCrossing.h
examples/plugins.o: vamp-sdk/Plugin.h examples/SpectralCentroid.h
examples/plugins.o: examples/PercussionOnsetDetector.h examples/PowerSpectrum.h
examples/plugins.o: examples/FixedTempoEstimator.h
examples/plugins.o: examples/AmplitudeFollower.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginHostAdapter.h vamp/vamp.h
host/vamp-simple-host.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
host/vamp-simple-host.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginWrapper.h
host/vamp-simple-host.o: ./vamp-hostsdk/Plugin.h ./vamp-hostsdk/hostguard.h
host/vamp-simple-host.o: vamp-sdk/Plugin.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginLoader.h host/system.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginHostAdapter.h
rdf/generator/vamp-rdf-template-generator.o: vamp/vamp.h vamp-sdk/Plugin.h
rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/PluginBase.h
rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginChannelAdapter.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginWrapper.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/Plugin.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/hostguard.h
rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/Plugin.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginLoader.h
src/vamp-hostsdk/PluginHostAdapter.o: ./vamp-hostsdk/PluginHostAdapter.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp/vamp.h vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/RealTime.o: src/vamp-sdk/RealTime.cpp ./vamp-sdk/RealTime.h
src/vamp-hostsdk/RealTime.o: vamp-sdk/plugguard.h
src/vamp-sdk/PluginAdapter.o: vamp-sdk/PluginAdapter.h vamp/vamp.h
src/vamp-sdk/PluginAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
src/vamp-sdk/PluginAdapter.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
src/vamp-sdk/RealTime.o: ./vamp-sdk/RealTime.h vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginBufferingAdapter.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginChannelAdapter.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginHostAdapter.h
src/vamp-hostsdk/PluginLoader.o: vamp/vamp.h vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginLoader.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginChannelAdapter.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginBufferingAdapter.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginSummarisingAdapter.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/RealTime.h

View File

@ -0,0 +1,370 @@
# Makefile for the Vamp plugin SDK. This builds the SDK objects,
# libraries, example plugins, and the test host. Please adjust to
# suit your operating system requirements.
#
# This version of the Makefile is approximately correct for OS/X 10.7.
# Note that it has no "install" target; the following are the
# library and related files that may be of interest resulting from
# the build:
#
# libvamp-sdk.dylib [SDK dynamic library for plugins]
# libvamp-hostsdk.dylib [SDK dynamic library for hosts]
#
# libvamp-sdk.a [SDK static library for plugins]
# libvamp-hostsdk.a [SDK static library for hosts]
#
# examples/vamp-example-plugins.cat [copy this to your Vamp plugin dir]
# examples/vamp-example-plugins.dylib [copy this to your Vamp plugin dir]
#
# host/vamp-simple-host [requires libsndfile to build]
#
# rdf/generator/vamp-rdf-template-generator
# Makefile for the Vamp plugin SDK. This builds the SDK objects,
# libraries, example plugins, and the test host. Please adjust to
# suit your operating system requirements.
APIDIR = vamp
SDKDIR = vamp-sdk
HOSTSDKDIR = vamp-hostsdk
SRCDIR = src
SDKSRCDIR = src/vamp-sdk
HOSTSDKSRCDIR = src/vamp-hostsdk
EXAMPLEDIR = examples
HOSTDIR = host
PCDIR = pkgconfig
LADIR = build
RDFGENDIR = rdf/generator
###
### Start of user-serviceable parts
###
# Default build target (or use "make <target>" to select one).
# Targets are:
# all -- build everything
# sdk -- build all the Vamp SDK libraries for plugins and hosts
# sdkstatic -- build only the static versions of the SDK libraries
# plugins -- build the example plugins (and the SDK if required)
# host -- build the simple Vamp plugin host (and the SDK if required)
# rdfgen -- build the RDF template generator (and the SDK if required)
# test -- build the host and example plugins, and run a quick test
# clean -- remove binary targets
# distclean -- remove all targets
#
default: all
# Minimum version of OS/X to target. This will determine the
# compiler's choice of platform SDK material
MINVERSION := 10.6
# Our default is to try to build for all architectures supported by
# the MINVERSION in a universal binary.
#
ARCHFLAGS = -mmacosx-version-min=$(MINVERSION) -arch x86_64 -arch i386
# Compile flags
#
CFLAGS = $(ARCHFLAGS) -fPIC
CXXFLAGS = $(ARCHFLAGS) -O2 -Wall -I. -I../10.6/inst/include -fPIC
# Link flags common to all link targets
#
LDFLAGS = $(ARCHFLAGS)
# ar, ranlib
#
AR = ar
RANLIB = ranlib
RM_F = rm -f
# Libraries required for the plugins.
#
PLUGIN_LIBS = ./libvamp-sdk.a
# File extension for a dynamically loadable object
#
PLUGIN_EXT = .dylib
# Libraries required for the host.
#
HOST_LIBS = ./libvamp-hostsdk.a -L../10.6/inst/lib -lsndfile -logg -lvorbis -lvorbisenc -lflac -ldl
# Libraries required for the RDF template generator.
#
RDFGEN_LIBS = ./libvamp-hostsdk.a -ldl
# Flags required to tell the compiler to create a dynamically loadable object
#
DYNAMIC_LDFLAGS = $(ARCHFLAGS) -dynamiclib
# Flags for building specific plugin and library targets. We need to
# tell the linker the formal name for the library, and for plugins we
# also want to tell the linker to make all symbols in the library
# hidden except for the public entry point (making for a tidier library).
#
PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) \
-install_name vamp-example-plugins.dylib \
-exported_symbols_list build/vamp-plugin.list
SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name libvamp-sdk.dylib
HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name libvamp-hostsdk.dylib
### End of user-serviceable parts
API_HEADERS = \
$(APIDIR)/vamp.h
SDK_HEADERS = \
$(SDKDIR)/Plugin.h \
$(SDKDIR)/PluginAdapter.h \
$(SDKDIR)/PluginBase.h \
$(SDKDIR)/RealTime.h \
$(SDKDIR)/FFT.h \
$(SDKDIR)/plugguard.h \
$(SDKDIR)/vamp-sdk.h
HOSTSDK_HEADERS = \
$(HOSTSDKDIR)/Plugin.h \
$(HOSTSDKDIR)/PluginBase.h \
$(HOSTSDKDIR)/PluginHostAdapter.h \
$(HOSTSDKDIR)/RealTime.h \
$(HOSTSDKDIR)/PluginBufferingAdapter.h \
$(HOSTSDKDIR)/PluginChannelAdapter.h \
$(HOSTSDKDIR)/PluginInputDomainAdapter.h \
$(HOSTSDKDIR)/PluginLoader.h \
$(HOSTSDKDIR)/PluginSummarisingAdapter.h \
$(HOSTSDKDIR)/PluginWrapper.h \
$(HOSTSDKDIR)/hostguard.h \
$(HOSTSDKDIR)/vamp-hostsdk.h
SDK_OBJECTS = \
$(SDKSRCDIR)/PluginAdapter.o \
$(SDKSRCDIR)/RealTime.o \
$(SDKSRCDIR)/FFT.o \
$(SDKSRCDIR)/acsymbols.o
HOSTSDK_OBJECTS = \
$(HOSTSDKSRCDIR)/PluginHostAdapter.o \
$(HOSTSDKSRCDIR)/RealTime.o \
$(HOSTSDKSRCDIR)/PluginBufferingAdapter.o \
$(HOSTSDKSRCDIR)/PluginChannelAdapter.o \
$(HOSTSDKSRCDIR)/PluginInputDomainAdapter.o \
$(HOSTSDKSRCDIR)/PluginLoader.o \
$(HOSTSDKSRCDIR)/PluginSummarisingAdapter.o \
$(HOSTSDKSRCDIR)/PluginWrapper.o \
$(HOSTSDKSRCDIR)/acsymbols.o
SDK_STATIC = \
./libvamp-sdk.a
HOSTSDK_STATIC = \
./libvamp-hostsdk.a
SDK_DYNAMIC = \
./libvamp-sdk$(PLUGIN_EXT)
HOSTSDK_DYNAMIC = \
./libvamp-hostsdk$(PLUGIN_EXT)
SDK_LA = \
$(LADIR)/libvamp-sdk.la
HOSTSDK_LA = \
$(LADIR)/libvamp-hostsdk.la
PLUGIN_HEADERS = \
$(EXAMPLEDIR)/SpectralCentroid.h \
$(EXAMPLEDIR)/PowerSpectrum.h \
$(EXAMPLEDIR)/PercussionOnsetDetector.h \
$(EXAMPLEDIR)/FixedTempoEstimator.h \
$(EXAMPLEDIR)/AmplitudeFollower.h \
$(EXAMPLEDIR)/ZeroCrossing.h
PLUGIN_OBJECTS = \
$(EXAMPLEDIR)/SpectralCentroid.o \
$(EXAMPLEDIR)/PowerSpectrum.o \
$(EXAMPLEDIR)/PercussionOnsetDetector.o \
$(EXAMPLEDIR)/FixedTempoEstimator.o \
$(EXAMPLEDIR)/AmplitudeFollower.o \
$(EXAMPLEDIR)/ZeroCrossing.o \
$(EXAMPLEDIR)/plugins.o
PLUGIN_TARGET = \
$(EXAMPLEDIR)/vamp-example-plugins$(PLUGIN_EXT)
HOST_HEADERS = \
$(HOSTDIR)/system.h
HOST_OBJECTS = \
$(HOSTDIR)/vamp-simple-host.o
HOST_TARGET = \
$(HOSTDIR)/vamp-simple-host
RDFGEN_OBJECTS = \
$(RDFGENDIR)/vamp-rdf-template-generator.o
RDFGEN_TARGET = \
$(RDFGENDIR)/vamp-rdf-template-generator
sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC)
sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC)
$(RANLIB) $(SDK_STATIC)
$(RANLIB) $(HOSTSDK_STATIC)
plugins: $(PLUGIN_TARGET)
host: $(HOST_TARGET)
rdfgen: $(RDFGEN_TARGET)
all: sdk plugins host rdfgen test
$(SDK_STATIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
$(RM_F) $@
$(AR) r $@ $(SDK_OBJECTS)
$(HOSTSDK_STATIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
$(RM_F) $@
$(AR) r $@ $(HOSTSDK_OBJECTS)
$(SDK_DYNAMIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
$(CXX) $(LDFLAGS) $(SDK_DYNAMIC_LDFLAGS) -o $@ $(SDK_OBJECTS)
$(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
$(CXX) $(LDFLAGS) $(HOSTSDK_DYNAMIC_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS)
$(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS)
$(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
$(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS)
$(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS)
$(RDFGEN_TARGET): $(RDFGEN_OBJECTS) $(HOSTSDK_STATIC)
$(CXX) $(LDFLAGS) $(RDFGEN_LDFLAGS) -o $@ $(RDFGEN_OBJECTS) $(RDFGEN_LIBS)
test: plugins host
VAMP_PATH=$(EXAMPLEDIR) $(HOST_TARGET) -l
clean:
rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) $(RDFGEN_OBJECTS)
distclean: clean
rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) $(RDFGEN_TARGET) *~ */*~
# DO NOT DELETE
examples/AmplitudeFollower.o: examples/AmplitudeFollower.h vamp-sdk/Plugin.h
examples/AmplitudeFollower.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/AmplitudeFollower.o: vamp-sdk/RealTime.h
examples/FixedTempoEstimator.o: examples/FixedTempoEstimator.h
examples/FixedTempoEstimator.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
examples/FixedTempoEstimator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
examples/PercussionOnsetDetector.o: examples/PercussionOnsetDetector.h
examples/PercussionOnsetDetector.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
examples/PercussionOnsetDetector.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
examples/SpectralCentroid.o: examples/SpectralCentroid.h vamp-sdk/Plugin.h
examples/SpectralCentroid.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/SpectralCentroid.o: vamp-sdk/RealTime.h
examples/PowerSpectrum.o: examples/PowerSpectrum.h vamp-sdk/Plugin.h
examples/PowerSpectrum.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/PowerSpectrum.o: vamp-sdk/RealTime.h
examples/ZeroCrossing.o: examples/ZeroCrossing.h vamp-sdk/Plugin.h
examples/ZeroCrossing.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/ZeroCrossing.o: vamp-sdk/RealTime.h
examples/plugins.o: vamp/vamp.h vamp-sdk/PluginAdapter.h vamp-sdk/Plugin.h
examples/plugins.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/plugins.o: vamp-sdk/RealTime.h examples/ZeroCrossing.h
examples/plugins.o: vamp-sdk/Plugin.h examples/SpectralCentroid.h
examples/plugins.o: examples/PercussionOnsetDetector.h examples/PowerSpectrum.h
examples/plugins.o: examples/FixedTempoEstimator.h
examples/plugins.o: examples/AmplitudeFollower.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginHostAdapter.h vamp/vamp.h
host/vamp-simple-host.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
host/vamp-simple-host.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginWrapper.h
host/vamp-simple-host.o: ./vamp-hostsdk/Plugin.h ./vamp-hostsdk/hostguard.h
host/vamp-simple-host.o: vamp-sdk/Plugin.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginLoader.h host/system.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginHostAdapter.h
rdf/generator/vamp-rdf-template-generator.o: vamp/vamp.h vamp-sdk/Plugin.h
rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/PluginBase.h
rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginChannelAdapter.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginWrapper.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/Plugin.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/hostguard.h
rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/Plugin.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginLoader.h
src/vamp-hostsdk/PluginHostAdapter.o: ./vamp-hostsdk/PluginHostAdapter.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp/vamp.h vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/RealTime.o: src/vamp-sdk/RealTime.cpp ./vamp-sdk/RealTime.h
src/vamp-hostsdk/RealTime.o: vamp-sdk/plugguard.h
src/vamp-sdk/PluginAdapter.o: vamp-sdk/PluginAdapter.h vamp/vamp.h
src/vamp-sdk/PluginAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
src/vamp-sdk/PluginAdapter.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
src/vamp-sdk/RealTime.o: ./vamp-sdk/RealTime.h vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginBufferingAdapter.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginChannelAdapter.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginHostAdapter.h
src/vamp-hostsdk/PluginLoader.o: vamp/vamp.h vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginLoader.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginChannelAdapter.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginBufferingAdapter.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginSummarisingAdapter.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/RealTime.h

View File

@ -0,0 +1,397 @@
# Makefile for the Vamp plugin SDK. This builds the SDK objects,
# libraries, example plugins, and the test host. Please adjust to
# suit your operating system requirements.
#
# This version of the Makefile is approximately correct for OS/X.
# Note that it has no "install" target; the following are the
# library and related files that may be of interest resulting from
# the build:
#
# libvamp-sdk.dylib [SDK dynamic library for plugins]
# libvamp-hostsdk.dylib [SDK dynamic library for hosts]
#
# libvamp-sdk.a [SDK static library for plugins]
# libvamp-hostsdk.a [SDK static library for hosts]
#
# examples/vamp-example-plugins.cat [copy this to your Vamp plugin dir]
# examples/vamp-example-plugins.dylib [copy this to your Vamp plugin dir]
#
# host/vamp-simple-host [requires libsndfile to build]
#
# rdf/generator/vamp-rdf-template-generator
# Makefile for the Vamp plugin SDK. This builds the SDK objects,
# libraries, example plugins, and the test host. Please adjust to
# suit your operating system requirements.
APIDIR = vamp
SDKDIR = vamp-sdk
HOSTSDKDIR = vamp-hostsdk
SRCDIR = src
SDKSRCDIR = src/vamp-sdk
HOSTSDKSRCDIR = src/vamp-hostsdk
EXAMPLEDIR = examples
HOSTDIR = host
PCDIR = pkgconfig
LADIR = build
RDFGENDIR = rdf/generator
###
### Start of user-serviceable parts
###
# Default build target (or use "make <target>" to select one).
# Targets are:
# all -- build everything
# sdk -- build all the Vamp SDK libraries for plugins and hosts
# sdkstatic -- build only the static versions of the SDK libraries
# plugins -- build the example plugins (and the SDK if required)
# host -- build the simple Vamp plugin host (and the SDK if required)
# rdfgen -- build the RDF template generator (and the SDK if required)
# test -- build the host and example plugins, and run a quick test
# clean -- remove binary targets
# distclean -- remove all targets
#
default: all
# Architecture and developer SDK selection flags. Change these only
# if you want to select a different OS/X compatibility level from the
# default.
#
# By default, we try to find the oldest available SDK that is newer
# than 10.4.
#
# If you want to override this to select a particular SDK, change
# PREFERRED_SDK to the SDK name (e.g. "10.4u") and PREFERRED_MINVERSION
# to the minimum OS revision (e.g. "10.4"). An example follows this code.
#
SDKPREFIX := /Developer/SDKs/MacOSX
SDKS := $(wildcard $(SDKPREFIX)*.sdk)
SDKVERSIONS := $(patsubst $(SDKPREFIX)%.sdk,%,$(SDKS))
GOOD_SDKS := $(filter-out 10.1%,$(filter-out 10.2%,$(filter-out 10.3%,$(filter-out 10.4%,$(SDKVERSIONS)))))
#
PREFERRED_SDK := $(word 1, $(sort $(GOOD_SDKS)))
PREFERRED_MINVERSION := $(patsubst %u,%,$(PREFERRED_SDK))
#
# Example: to set your own values, uncomment and adjust:
# PREFERRED_SDK := 10.4u
# PREFERRED_MINVERSION := 10.4
SDKFLAGS = -isysroot /Developer/SDKs/MacOSX$(PREFERRED_SDK).sdk -mmacosx-version-min=$(PREFERRED_MINVERSION)
# Our default is to try to build for all available architectures in a
# universal binary.
#
ARCHFLAGS = $(SDKFLAGS) -arch i386 -arch x86_64 -arch ppc
# Compile flags
#
CFLAGS = $(ARCHFLAGS) -fPIC
CXXFLAGS = $(ARCHFLAGS) -O2 -Wall -I. -fPIC
# Link flags common to all link targets
#
LDFLAGS = $(ARCHFLAGS)
# ar, ranlib
#
AR = ar
RANLIB = ranlib
RM_F = rm -f
# Libraries required for the plugins.
#
PLUGIN_LIBS = ./libvamp-sdk.a
# File extension for a dynamically loadable object
#
PLUGIN_EXT = .dylib
# Libraries required for the host.
#
HOST_LIBS = ./libvamp-hostsdk.a -lsndfile -ldl
# Libraries required for the RDF template generator.
#
RDFGEN_LIBS = ./libvamp-hostsdk.a -ldl
# Flags required to tell the compiler to create a dynamically loadable object
#
DYNAMIC_LDFLAGS = $(ARCHFLAGS) -dynamiclib
# Flags for building specific plugin and library targets. We need to
# tell the linker the formal name for the library, and for plugins we
# also want to tell the linker to make all symbols in the library
# hidden except for the public entry point (making for a tidier library).
#
PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) \
-install_name vamp-example-plugins.dylib \
-exported_symbols_list build/vamp-plugin.list
SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name libvamp-sdk.dylib
HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name libvamp-hostsdk.dylib
### End of user-serviceable parts
API_HEADERS = \
$(APIDIR)/vamp.h
SDK_HEADERS = \
$(SDKDIR)/Plugin.h \
$(SDKDIR)/PluginAdapter.h \
$(SDKDIR)/PluginBase.h \
$(SDKDIR)/RealTime.h \
$(SDKDIR)/FFT.h \
$(SDKDIR)/plugguard.h \
$(SDKDIR)/vamp-sdk.h
HOSTSDK_HEADERS = \
$(HOSTSDKDIR)/Plugin.h \
$(HOSTSDKDIR)/PluginBase.h \
$(HOSTSDKDIR)/PluginHostAdapter.h \
$(HOSTSDKDIR)/RealTime.h \
$(HOSTSDKDIR)/PluginBufferingAdapter.h \
$(HOSTSDKDIR)/PluginChannelAdapter.h \
$(HOSTSDKDIR)/PluginInputDomainAdapter.h \
$(HOSTSDKDIR)/PluginLoader.h \
$(HOSTSDKDIR)/PluginSummarisingAdapter.h \
$(HOSTSDKDIR)/PluginWrapper.h \
$(HOSTSDKDIR)/hostguard.h \
$(HOSTSDKDIR)/vamp-hostsdk.h
SDK_OBJECTS = \
$(SDKSRCDIR)/PluginAdapter.o \
$(SDKSRCDIR)/RealTime.o \
$(SDKSRCDIR)/FFT.o \
$(SDKSRCDIR)/acsymbols.o
HOSTSDK_OBJECTS = \
$(HOSTSDKSRCDIR)/PluginHostAdapter.o \
$(HOSTSDKSRCDIR)/RealTime.o \
$(HOSTSDKSRCDIR)/PluginBufferingAdapter.o \
$(HOSTSDKSRCDIR)/PluginChannelAdapter.o \
$(HOSTSDKSRCDIR)/PluginInputDomainAdapter.o \
$(HOSTSDKSRCDIR)/PluginLoader.o \
$(HOSTSDKSRCDIR)/PluginSummarisingAdapter.o \
$(HOSTSDKSRCDIR)/PluginWrapper.o \
$(HOSTSDKSRCDIR)/acsymbols.o
SDK_STATIC = \
./libvamp-sdk.a
HOSTSDK_STATIC = \
./libvamp-hostsdk.a
SDK_DYNAMIC = \
./libvamp-sdk$(PLUGIN_EXT)
HOSTSDK_DYNAMIC = \
./libvamp-hostsdk$(PLUGIN_EXT)
SDK_LA = \
$(LADIR)/libvamp-sdk.la
HOSTSDK_LA = \
$(LADIR)/libvamp-hostsdk.la
PLUGIN_HEADERS = \
$(EXAMPLEDIR)/SpectralCentroid.h \
$(EXAMPLEDIR)/PowerSpectrum.h \
$(EXAMPLEDIR)/PercussionOnsetDetector.h \
$(EXAMPLEDIR)/FixedTempoEstimator.h \
$(EXAMPLEDIR)/AmplitudeFollower.h \
$(EXAMPLEDIR)/ZeroCrossing.h
PLUGIN_OBJECTS = \
$(EXAMPLEDIR)/SpectralCentroid.o \
$(EXAMPLEDIR)/PowerSpectrum.o \
$(EXAMPLEDIR)/PercussionOnsetDetector.o \
$(EXAMPLEDIR)/FixedTempoEstimator.o \
$(EXAMPLEDIR)/AmplitudeFollower.o \
$(EXAMPLEDIR)/ZeroCrossing.o \
$(EXAMPLEDIR)/plugins.o
PLUGIN_TARGET = \
$(EXAMPLEDIR)/vamp-example-plugins$(PLUGIN_EXT)
HOST_HEADERS = \
$(HOSTDIR)/system.h
HOST_OBJECTS = \
$(HOSTDIR)/vamp-simple-host.o
HOST_TARGET = \
$(HOSTDIR)/vamp-simple-host
RDFGEN_OBJECTS = \
$(RDFGENDIR)/vamp-rdf-template-generator.o
RDFGEN_TARGET = \
$(RDFGENDIR)/vamp-rdf-template-generator
show:
@echo " *** Found available SDK versions: $(SDKVERSIONS)"
@test -n "$(PREFERRED_SDK)" || ( echo "Error: Failed to establish preferred SDK version, please ensure at least one Developer SDK is installed" ; exit 1 )
@test -n "$(PREFERRED_MINVERSION)" || ( echo "Error: Failed to establish preferred minimum OS version" ; exit 1 )
@echo " *** Default SDK is $(PREFERRED_SDK) for minimum OS/X version $(PREFERRED_MINVERSION)"
sdk: show sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC)
sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC)
$(RANLIB) $(SDK_STATIC)
$(RANLIB) $(HOSTSDK_STATIC)
plugins: $(PLUGIN_TARGET)
host: $(HOST_TARGET)
rdfgen: $(RDFGEN_TARGET)
all: sdk plugins host rdfgen test
$(SDK_STATIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
$(RM_F) $@
$(AR) r $@ $(SDK_OBJECTS)
$(HOSTSDK_STATIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
$(RM_F) $@
$(AR) r $@ $(HOSTSDK_OBJECTS)
$(SDK_DYNAMIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
$(CXX) $(LDFLAGS) $(SDK_DYNAMIC_LDFLAGS) -o $@ $(SDK_OBJECTS)
$(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
$(CXX) $(LDFLAGS) $(HOSTSDK_DYNAMIC_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS)
$(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS)
$(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
$(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS)
$(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS)
$(RDFGEN_TARGET): $(RDFGEN_OBJECTS) $(HOSTSDK_STATIC)
$(CXX) $(LDFLAGS) $(RDFGEN_LDFLAGS) -o $@ $(RDFGEN_OBJECTS) $(RDFGEN_LIBS)
test: plugins host
VAMP_PATH=$(EXAMPLEDIR) $(HOST_TARGET) -l
clean:
rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) $(RDFGEN_OBJECTS)
distclean: clean
rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) $(RDFGEN_TARGET) *~ */*~
# DO NOT DELETE
examples/AmplitudeFollower.o: examples/AmplitudeFollower.h vamp-sdk/Plugin.h
examples/AmplitudeFollower.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/AmplitudeFollower.o: vamp-sdk/RealTime.h
examples/FixedTempoEstimator.o: examples/FixedTempoEstimator.h
examples/FixedTempoEstimator.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
examples/FixedTempoEstimator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
examples/PercussionOnsetDetector.o: examples/PercussionOnsetDetector.h
examples/PercussionOnsetDetector.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
examples/PercussionOnsetDetector.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
examples/SpectralCentroid.o: examples/SpectralCentroid.h vamp-sdk/Plugin.h
examples/SpectralCentroid.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/SpectralCentroid.o: vamp-sdk/RealTime.h
examples/PowerSpectrum.o: examples/PowerSpectrum.h vamp-sdk/Plugin.h
examples/PowerSpectrum.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/PowerSpectrum.o: vamp-sdk/RealTime.h
examples/ZeroCrossing.o: examples/ZeroCrossing.h vamp-sdk/Plugin.h
examples/ZeroCrossing.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/ZeroCrossing.o: vamp-sdk/RealTime.h
examples/plugins.o: vamp/vamp.h vamp-sdk/PluginAdapter.h vamp-sdk/Plugin.h
examples/plugins.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
examples/plugins.o: vamp-sdk/RealTime.h examples/ZeroCrossing.h
examples/plugins.o: vamp-sdk/Plugin.h examples/SpectralCentroid.h
examples/plugins.o: examples/PercussionOnsetDetector.h examples/PowerSpectrum.h
examples/plugins.o: examples/FixedTempoEstimator.h
examples/plugins.o: examples/AmplitudeFollower.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginHostAdapter.h vamp/vamp.h
host/vamp-simple-host.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
host/vamp-simple-host.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginWrapper.h
host/vamp-simple-host.o: ./vamp-hostsdk/Plugin.h ./vamp-hostsdk/hostguard.h
host/vamp-simple-host.o: vamp-sdk/Plugin.h
host/vamp-simple-host.o: ./vamp-hostsdk/PluginLoader.h host/system.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginHostAdapter.h
rdf/generator/vamp-rdf-template-generator.o: vamp/vamp.h vamp-sdk/Plugin.h
rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/PluginBase.h
rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginChannelAdapter.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginWrapper.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/Plugin.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/hostguard.h
rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/Plugin.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginLoader.h
src/vamp-hostsdk/PluginHostAdapter.o: ./vamp-hostsdk/PluginHostAdapter.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp/vamp.h vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/RealTime.o: src/vamp-sdk/RealTime.cpp ./vamp-sdk/RealTime.h
src/vamp-hostsdk/RealTime.o: vamp-sdk/plugguard.h
src/vamp-sdk/PluginAdapter.o: vamp-sdk/PluginAdapter.h vamp/vamp.h
src/vamp-sdk/PluginAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
src/vamp-sdk/PluginAdapter.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
src/vamp-sdk/RealTime.o: ./vamp-sdk/RealTime.h vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginBufferingAdapter.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginChannelAdapter.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginHostAdapter.h
src/vamp-hostsdk/PluginLoader.o: vamp/vamp.h vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginLoader.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginLoader.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginChannelAdapter.h
src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginBufferingAdapter.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginSummarisingAdapter.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/RealTime.h
src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/PluginWrapper.h
src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/Plugin.h
src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/hostguard.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/Plugin.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/PluginBase.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/plugguard.h
src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/RealTime.h

View File

@ -62,3 +62,13 @@ build/vamp-plugin.map. There are other methods that will work too,
but this one is simple and has the advantage of requiring no changes
to the code.
Test Your Plugins
-----------------
The Vamp Plugin Tester is a vital utility which you can use to test
your plugins for common problems. It can help you if you're having
problems getting your plugin to work at all, and you're strongly
advised to use it before you release anything. Download it from the
Vamp plugins site now!

View File

@ -78,3 +78,13 @@ Using MinGW/Cygwin
Refer to README.linux for build instructions using the GNU toolchain.
Test Your Plugins
-----------------
The Vamp Plugin Tester is a vital utility which you can use to test
your plugins for common problems. It can help you if you're having
problems getting your plugin to work at all, and you're strongly
advised to use it before you release anything. Download it from the
Vamp plugins site now!

View File

@ -2,25 +2,40 @@
The Vamp Plugin SDK -- Platform Notes for OS/X
==============================================
Prerequisites
-------------
You must have Xcode installed, with the command-line build tools.
(If you are using Xcode 4, you may have to go to Preferences ->
Downloads -> Components and install the Command Line Tools component.)
You must have libsndfile (http://www.mega-nerd.com/libsndfile/)
installed in order to build the command-line host successfully. But
you do not need libsndfile if you only want to build plugins.
Building at the command line
----------------------------
To build the SDK, example plugins, and command-line host:
$ make -f Makefile.osx
$ make -f build/Makefile.osx
You must have libsndfile (http://www.mega-nerd.com/libsndfile/)
installed in order to build the command-line host successfully. To
build only the SDK and examples:
To build only the SDK and example plugins (for example if you do not
have libsndfile installed):
$ make -f Makefile.osx sdk examples
$ make -f build/Makefile.osx sdk examples
See the comments at the top of Makefile.osx for more information about
the libraries and other targets that are built in this way.
If you are using an IDE, you may prefer to simply add the vamp-sdk and
src/vamp-sdk (for plugins) or vamp-hostsdk and src/vamp-hostsdk (for
hosts) directories to your existing project.
If you are using an IDE such as Xcode, you may prefer to simply add
the vamp-sdk and src/vamp-sdk (for plugins) or vamp-hostsdk and
src/vamp-hostsdk (for hosts) directories to your existing project.
If you are using OS/X 10.6 or older, use Makefile.osx.106 instead of
Makefile.osx.
Installing the Example Plugins
@ -42,8 +57,14 @@ or
Plugin Linkage
--------------
Vamp plugins are distributed as dynamic libraries (.dylib). A
well-packaged Vamp plugin library should export exactly one public
Vamp plugins are distributed as dynamic libraries (.dylib). An OS/X
dynamic library has a formal installed name, which is recorded in the
library's header: you will need to ensure that this matches the
plugin's filename (e.g. vamp-example-plugins.dylib) by using the
-install_name <name> option at link time. The Makefile.osx provided
with the SDK contains an example of this.
A well-packaged Vamp plugin library should export exactly one public
symbol, namely the Vamp API entry point vampGetPluginDescriptor.
The default for the OS/X linker is to export all of the symbols in the
@ -68,3 +89,13 @@ build/vamp-plugin.list. There are other methods that will work too,
but this one is simple and has the advantage of requiring no changes
to the code.
Test Your Plugins
-----------------
The Vamp Plugin Tester is a vital utility which you can use to test
your plugins for common problems. It can help you if you're having
problems getting your plugin to work at all, and you're strongly
advised to use it before you release anything. Download it from the
Vamp plugins site now!

View File

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VampExamplePlugins", "VampExamplePlugins.vcxproj", "{B3D1F5A4-4571-4D20-B184-8ACD03D6C97A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B3D1F5A4-4571-4D20-B184-8ACD03D6C97A}.Debug|Win32.ActiveCfg = Debug|Win32
{B3D1F5A4-4571-4D20-B184-8ACD03D6C97A}.Debug|Win32.Build.0 = Debug|Win32
{B3D1F5A4-4571-4D20-B184-8ACD03D6C97A}.Release|Win32.ActiveCfg = Release|Win32
{B3D1F5A4-4571-4D20-B184-8ACD03D6C97A}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B3D1F5A4-4571-4D20-B184-8ACD03D6C97A}</ProjectGuid>
<RootNamespace>VampExamplePlugins</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)/..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;VAMPEXAMPLEPLUGINS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalOptions>/EXPORT:vampGetPluginDescriptor %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)vamp-example-plugins.dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)/..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;VAMPEXAMPLEPLUGINS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalOptions>/EXPORT:vampGetPluginDescriptor %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)vamp-example-plugins.dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\examples\AmplitudeFollower.h" />
<ClInclude Include="..\examples\FixedTempoEstimator.h" />
<ClInclude Include="..\examples\PercussionOnsetDetector.h" />
<ClInclude Include="..\vamp-sdk\plugguard.h" />
<ClInclude Include="..\vamp-sdk\Plugin.h" />
<ClInclude Include="..\vamp-sdk\PluginAdapter.h" />
<ClInclude Include="..\vamp-sdk\PluginBase.h" />
<ClInclude Include="..\vamp-sdk\RealTime.h" />
<ClInclude Include="..\examples\SpectralCentroid.h" />
<ClInclude Include="..\examples\PowerSpectrum.h" />
<ClInclude Include="..\examples\ZeroCrossing.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\examples\AmplitudeFollower.cpp" />
<ClCompile Include="..\examples\FixedTempoEstimator.cpp" />
<ClCompile Include="..\examples\PercussionOnsetDetector.cpp" />
<ClCompile Include="..\src\vamp-sdk\PluginAdapter.cpp" />
<ClCompile Include="..\examples\plugins.cpp" />
<ClCompile Include="..\src\vamp-sdk\RealTime.cpp" />
<ClCompile Include="..\examples\SpectralCentroid.cpp" />
<ClCompile Include="..\examples\PowerSpectrum.cpp" />
<ClCompile Include="..\examples\ZeroCrossing.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VampHostSDK", "VampHostSDK.vcxproj", "{3875EF8B-14E8-4825-B2C1-A8B869C336F5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3875EF8B-14E8-4825-B2C1-A8B869C336F5}.Debug|Win32.ActiveCfg = Debug|Win32
{3875EF8B-14E8-4825-B2C1-A8B869C336F5}.Debug|Win32.Build.0 = Debug|Win32
{3875EF8B-14E8-4825-B2C1-A8B869C336F5}.Release|Win32.ActiveCfg = Release|Win32
{3875EF8B-14E8-4825-B2C1-A8B869C336F5}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
@ -41,7 +41,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_USE_MATH_DEFINES"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3875EF8B-14E8-4825-B2C1-A8B869C336F5}</ProjectGuid>
<RootNamespace>VampHostSDK</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level2</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\vamp-hostsdk\hostguard.h" />
<ClInclude Include="..\vamp-hostsdk\Plugin.h" />
<ClInclude Include="..\vamp-hostsdk\PluginBase.h" />
<ClInclude Include="..\vamp-hostsdk\PluginBufferingAdapter.h" />
<ClInclude Include="..\vamp-hostsdk\PluginChannelAdapter.h" />
<ClInclude Include="..\vamp-hostsdk\PluginHostAdapter.h" />
<ClInclude Include="..\vamp-hostsdk\PluginInputDomainAdapter.h" />
<ClInclude Include="..\vamp-hostsdk\PluginLoader.h" />
<ClInclude Include="..\vamp-hostsdk\PluginSummarisingAdapter.h" />
<ClInclude Include="..\vamp-hostsdk\PluginWrapper.h" />
<ClInclude Include="..\vamp-hostsdk\RealTime.h" />
<ClInclude Include="..\vamp-hostsdk\vamp-hostsdk.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\vamp-hostsdk\PluginBufferingAdapter.cpp" />
<ClCompile Include="..\src\vamp-hostsdk\PluginChannelAdapter.cpp" />
<ClCompile Include="..\src\vamp-hostsdk\PluginHostAdapter.cpp" />
<ClCompile Include="..\src\vamp-hostsdk\PluginInputDomainAdapter.cpp" />
<ClCompile Include="..\src\vamp-hostsdk\PluginLoader.cpp" />
<ClCompile Include="..\src\vamp-hostsdk\PluginSummarisingAdapter.cpp" />
<ClCompile Include="..\src\vamp-hostsdk\PluginWrapper.cpp" />
<ClCompile Include="..\src\vamp-hostsdk\RealTime.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VampPluginSDK", "VampPluginSDK.vcxproj", "{65EFA7D7-C3CE-4D29-BE96-E27F2B5979A5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{65EFA7D7-C3CE-4D29-BE96-E27F2B5979A5}.Debug|Win32.ActiveCfg = Debug|Win32
{65EFA7D7-C3CE-4D29-BE96-E27F2B5979A5}.Debug|Win32.Build.0 = Debug|Win32
{65EFA7D7-C3CE-4D29-BE96-E27F2B5979A5}.Release|Win32.ActiveCfg = Release|Win32
{65EFA7D7-C3CE-4D29-BE96-E27F2B5979A5}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
@ -41,7 +41,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_USE_MATH_DEFINES"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@ -102,7 +102,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_USE_MATH_DEFINES"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="2"
@ -162,6 +162,10 @@
RelativePath="..\vamp-sdk\PluginBase.h"
>
</File>
<File
RelativePath="..\vamp-sdk\FFT.h"
>
</File>
<File
RelativePath="..\vamp-sdk\RealTime.h"
>
@ -186,6 +190,10 @@
RelativePath="..\src\vamp-sdk\PluginAdapter.cpp"
>
</File>
<File
RelativePath="..\src\vamp-sdk\FFT.cpp"
>
</File>
<File
RelativePath="..\src\vamp-sdk\RealTime.cpp"
>

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{65EFA7D7-C3CE-4D29-BE96-E27F2B5979A5}</ProjectGuid>
<RootNamespace>VampPluginSDK</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level2</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\vamp-sdk\plugguard.h" />
<ClInclude Include="..\vamp-sdk\Plugin.h" />
<ClInclude Include="..\vamp-sdk\PluginAdapter.h" />
<ClInclude Include="..\vamp-sdk\PluginBase.h" />
<ClInclude Include="..\vamp-sdk\FFT.h" />
<ClInclude Include="..\vamp-sdk\RealTime.h" />
<ClInclude Include="..\vamp-sdk\vamp-sdk.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\vamp-sdk\PluginAdapter.cpp" />
<ClCompile Include="..\src\vamp-sdk\FFT.cpp" />
<ClCompile Include="..\src\vamp-sdk\RealTime.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -3,7 +3,7 @@ library_names='%LIBNAME% %LINK_ABI% %LINK_DEV%'
old_library='%STATIC%'
dependency_libs=''
current=3
age=0
age=5
revision=0
installed=yes
libdir='%LIBS%'

View File

@ -3,7 +3,7 @@ library_names='%LIBNAME% %LINK_ABI% %LINK_DEV%'
old_library='%STATIC%'
dependency_libs=''
current=2
age=0
age=5
revision=0
installed=yes
libdir='%LIBS%'

View File

@ -0,0 +1,117 @@
#!/bin/bash
usage() {
echo "Usage: $0 <version>"
echo " e.g. $0 2.2"
echo " e.g. $0 2.2.1"
exit 2;
}
version=$1
[ -n "$version" ] || usage
major=${version%%.*} # 2.3 -> 2, 2.3.1 -> 2
minor=${version#*.} # 2.3 -> 3, 2.3.1 -> 3.1
minor=${minor%.*} # 3 -> 3, 3.1 -> 3
sdkmajor=$major
sdkminor=$minor
hostmajor=$(($major+1)) # there has been one API change in a minor release
hostminor=$minor
acs="`echo $version | tr '.' '_'`"
echo "Major version = $major, minor version = $minor"
echo "SDK current = $sdkmajor, age = $sdkminor"
echo "Host SDK current = $hostmajor, age = $hostminor"
echo "Version string = $version"
echo "acsymbols string = $acs"
p="perl -i -p -e"
$p 's/(This is version) [^ ]+/$1 '$version'/' \
README
$p 's/(AC_INIT\(vamp-plugin-sdk,) [^,]+,/$1 '$version',/' \
configure.ac
$p 's/(INSTALL_SDK_LIBNAME\s*=\s*libvamp-sdk.so).*/$1.'$sdkmajor'.'$sdkminor'.0/' \
Makefile.in
$p 's/(INSTALL_SDK_LINK_ABI\s*=\s*libvamp-sdk.so).*/$1.'$sdkmajor'/' \
Makefile.in
$p 's/(current)=.*/$1='$sdkmajor'/' \
build/libvamp-sdk.la.in
$p 's/(age)=.*/$1='$sdkminor'/' \
build/libvamp-sdk.la.in
$p 's/(INSTALL_HOSTSDK_LIBNAME\s*=\s*libvamp-hostsdk.so).*/$1.'$hostmajor'.'$hostminor'.0/' \
Makefile.in
$p 's/(INSTALL_HOSTSDK_LINK_ABI\s*=\s*libvamp-hostsdk.so).*/$1.'$hostmajor'/' \
Makefile.in
$p 's/(current)=.*/$1='$hostmajor'/' \
build/libvamp-hostsdk.la.in
$p 's/(age)=.*/$1='$hostminor'/' \
build/libvamp-hostsdk.la.in
$p 's/(PROJECT_NUMBER[^=]*)=.*/$1= '$version'/' \
build/Doxyfile
$p 's/(VAMP_API_VERSION).*/$1 '$major'/' \
vamp/vamp.h
$p 's/(VAMP_SDK_VERSION) +"[^"]*"/$1 "'$version'"/' \
vamp-sdk/plugguard.h
$p 's/(VAMP_SDK_MAJOR_VERSION).*/$1 '$major'/' \
vamp-sdk/plugguard.h
$p 's/(VAMP_SDK_MINOR_VERSION).*/$1 '$minor'/' \
vamp-sdk/plugguard.h
$p 's/(VAMP_SDK_VERSION) +"[^"]*"/$1 "'$version'"/' \
vamp-hostsdk/hostguard.h
$p 's/(VAMP_SDK_MAJOR_VERSION).*/$1 '$major'/' \
vamp-hostsdk/hostguard.h
$p 's/(VAMP_SDK_MINOR_VERSION).*/$1 '$minor'/' \
vamp-hostsdk/hostguard.h
$p 's/(VAMP_SDK_MAJOR_VERSION !=) [\d\.]+/$1 '$major'/' \
src/vamp-sdk/FFT.cpp
$p 's/(VAMP_SDK_MINOR_VERSION !=) [\d\.]+/$1 '$minor'/' \
src/vamp-sdk/FFT.cpp
$p 's/(VAMP_SDK_MAJOR_VERSION !=) [\d\.]+/$1 '$major'/' \
src/vamp-sdk/PluginAdapter.cpp
$p 's/(VAMP_SDK_MINOR_VERSION !=) [\d\.]+/$1 '$minor'/' \
src/vamp-sdk/PluginAdapter.cpp
$p 's/(VAMP_SDK_MAJOR_VERSION !=) [\d\.]+/$1 '$major'/' \
src/vamp-hostsdk/PluginHostAdapter.cpp
$p 's/(VAMP_SDK_MINOR_VERSION !=) [\d\.]+/$1 '$minor'/' \
src/vamp-hostsdk/PluginHostAdapter.cpp
for pc in pkgconfig/*.pc.in ; do
$p 's/(Version:) .*/$1 '$version'/' $pc
done
fgrep -q 'libvampsdk_v_'$acs'_present' src/vamp-sdk/acsymbols.c || \
$p 's/^$/\nextern void libvampsdk_v_'$acs'_present(void) { }/' \
src/vamp-sdk/acsymbols.c
fgrep -q 'libvamphostsdk_v_'$acs'_present' src/vamp-hostsdk/acsymbols.c || \
$p 's/^$/\nextern void libvamphostsdk_v_'$acs'_present(void) { }/' \
src/vamp-hostsdk/acsymbols.c
echo "Done, now check with e.g. hg diff -- and don't forget to update CHANGELOG"

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
AC_INIT(vamp-plugin-sdk, 2.0, cannam@all-day-breakfast.com)
AC_INIT(vamp-plugin-sdk, 2.5, cannam@all-day-breakfast.com)
AC_CONFIG_SRCDIR(vamp/vamp.h)
AC_PROG_CXX
@ -14,67 +14,32 @@ fi
AC_SEARCH_LIBS([dlopen],[dl])
TARGETS="plugins"
dnl to start with, example plug-ins. Next bit will build a list
dnl of other things like static and dynamic SDKs
dnl See if the user wants to build static SDK
AC_ARG_ENABLE(static, [AS_HELP_STRING([--enable-static],
[enable building of static linked vamp SDK [default=no]])],
SSDK_ARGUMENT=$enableval,
SSDK_ARGUMENT="no")
if test "x$SSDK_ARGUMENT" = "xyes" ; then
TARGETS="$TARGETS sdkstatic"
fi
dnl See if the user wants to build shared SDK
AC_ARG_ENABLE(shared, [AS_HELP_STRING([--enable-shared],
[enable building of dynamic linked vamp SDK [default=yes]])],
DSDK_ARGUMENT=$enableval,
DSDK_ARGUMENT="yes")
if test "x$DSDK_ARGUMENT" = "xyes" ; then
TARGETS="$TARGETS sdk"
fi
dnl See if the user wants to build static SDK
AC_ARG_ENABLE(static-sdk, [AS_HELP_STRING([--enable-static-sdk],
[enable building of static linked vamp SDK [default=no]])],
SSDK_ARGUMENT=$enableval,
SSDK_ARGUMENT="no")
if test "x$SSDK_ARGUMENT" = "xyes" ; then
TARGETS="$TARGETS sdkstatic"
fi
dnl See if the user wants to build programs
dnl See if the user wants to build programs, or just the SDK
AC_ARG_ENABLE(programs, [AS_HELP_STRING([--enable-programs],
[enable building of example host and RDF generator [default=yes]])],
PROGS_ARGUMENT=$enableval,
PROGS_ARGUMENT="yes")
dnl if the user wants progs, then we need to check for libsndfile
if test "x$PROGS_ARGUMENT" = "xyes" ; then
PKG_CHECK_MODULES([SNDFILE],[sndfile],
have_sndfile="yes", have_sndfile="no")
PKG_CHECK_MODULES([SNDFILE],[sndfile],have_sndfile="yes",have_sndfile="no")
if test "x$have_sndfile" = "xyes" ; then
dnl all good, build everything (test depends on host)
TARGETS="$TARGETS host rdfgen test"
dnl all good, build everything
TARGETS="sdk plugins host rdfgen test"
else
dnl no libsndfile - can't build host!
AC_MSG_ERROR([libsndfile not found - cannot build example Vamp host!])
AC_MSG_ERROR([libsndfile not found - cannot build example Vamp host!
If you don't want to build the host, configure with --disable-programs.])
fi
else
dnl user didn't want programs - so we won't build them
TARGETS="sdk plugins"
fi
AC_SUBST(SNDFILE_CFLAGS)
AC_SUBST(SNDFILE_LIBS)
AC_SUBST(TARGETS)
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CXXFLAGS " in
@ -84,5 +49,6 @@ if test "x$GCC" = "xyes"; then
fi
changequote([,])dnl
AC_SUBST(CXXFLAGS)
AC_OUTPUT([Makefile])

View File

@ -132,7 +132,7 @@ AmplitudeFollower::getOutputDescriptors() const
OutputDescriptor sca;
sca.identifier = "amplitude";
sca.name = "Amplitude";
sca.description = "";
sca.description = "The peak tracked amplitude for the current processing block";
sca.unit = "V";
sca.hasFixedBinCount = true;
sca.binCount = 1;
@ -152,7 +152,7 @@ AmplitudeFollower::getParameterDescriptors() const
ParameterDescriptor att;
att.identifier = "attack";
att.name = "Attack time";
att.description = "";
att.description = "The 60dB convergence time for an increase in amplitude";
att.unit = "s";
att.minValue = 0.0f;
att.maxValue = 1.f;
@ -164,7 +164,7 @@ AmplitudeFollower::getParameterDescriptors() const
ParameterDescriptor dec;
dec.identifier = "release";
dec.name = "Release time";
dec.description = "";
dec.description = "The 60dB convergence time for a decrease in amplitude";
dec.unit = "s";
dec.minValue = 0.0f;
dec.maxValue = 1.f;

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2008 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@ -44,6 +44,7 @@ using std::endl;
using Vamp::RealTime;
#include <cmath>
#include <cstdio>
class FixedTempoEstimator::D

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2008 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

View File

@ -43,6 +43,11 @@ using std::endl;
#include <math.h>
#ifdef __SUNPRO_CC
#include <ieeefp.h>
#define isinf(x) (!finite(x))
#endif
#ifdef WIN32
#define isnan(x) false
#define isinf(x) false

View File

@ -181,7 +181,7 @@ ZeroCrossing::process(const float *const *inputBuffers,
Feature feature;
feature.hasTimestamp = false;
feature.values.push_back(count);
feature.values.push_back(float(count));
returnFeatures[0].push_back(feature);
return returnFeatures;

View File

@ -71,7 +71,7 @@ using Vamp::HostExt::PluginLoader;
using Vamp::HostExt::PluginWrapper;
using Vamp::HostExt::PluginInputDomainAdapter;
#define HOST_VERSION "1.4"
#define HOST_VERSION "1.5"
enum Verbosity {
PluginIds,
@ -95,7 +95,7 @@ void usage(const char *name)
cerr << "\n"
<< name << ": A command-line host for Vamp audio analysis plugins.\n\n"
"Centre for Digital Music, Queen Mary, University of London.\n"
"Copyright 2006-2008 Chris Cannam and QMUL.\n"
"Copyright 2006-2009 Chris Cannam and QMUL.\n"
"Freely redistributable; published under a BSD-style license.\n\n"
"Usage:\n\n"
" " << name << " [-s] pluginlibrary[." << PLUGIN_SUFFIX << "]:plugin[:output] file.wav [-o out.txt]\n"
@ -276,9 +276,9 @@ int runPlugin(string myname, string soname, string id,
sndfile = sf_open(wavname.c_str(), SFM_READ, &sfinfo);
if (!sndfile) {
cerr << myname << ": ERROR: Failed to open input file \""
cerr << myname << ": ERROR: Failed to open input file \""
<< wavname << "\": " << sf_strerror(sndfile) << endl;
return 1;
return 1;
}
ofstream *out = 0;
@ -339,6 +339,9 @@ int runPlugin(string myname, string soname, string id,
}
cerr << blockSize << endl;
}
int overlapSize = blockSize - stepSize;
sf_count_t currentStep = 0;
int finalStepsRemaining = max(1, (blockSize / stepSize) - 1); // at end of file, this many part-silent frames needed after we hit EOF
int channels = sfinfo.channels;
@ -369,7 +372,7 @@ int runPlugin(string myname, string soname, string id,
RealTime adjustment = RealTime::zeroTime;
if (outputs.empty()) {
cerr << "ERROR: Plugin has no outputs!" << endl;
cerr << "ERROR: Plugin has no outputs!" << endl;
goto done;
}
@ -413,19 +416,28 @@ int runPlugin(string myname, string soname, string id,
wrapper->getWrapper<PluginInputDomainAdapter>();
if (ida) adjustment = ida->getTimestampAdjustment();
}
for (size_t i = 0; i < sfinfo.frames; i += stepSize) {
// Here we iterate over the frames, avoiding asking the numframes in case it's streaming input.
do {
int count;
if (sf_seek(sndfile, i, SEEK_SET) < 0) {
cerr << "ERROR: sf_seek failed: " << sf_strerror(sndfile) << endl;
break;
}
if ((count = sf_readf_float(sndfile, filebuf, blockSize)) < 0) {
cerr << "ERROR: sf_readf_float failed: " << sf_strerror(sndfile) << endl;
break;
if ((blockSize==stepSize) || (currentStep==0)) {
// read a full fresh block
if ((count = sf_readf_float(sndfile, filebuf, blockSize)) < 0) {
cerr << "ERROR: sf_readf_float failed: " << sf_strerror(sndfile) << endl;
break;
}
if (count != blockSize) --finalStepsRemaining;
} else {
// otherwise shunt the existing data down and read the remainder.
memmove(filebuf, filebuf + (stepSize * channels), overlapSize * channels * sizeof(float));
if ((count = sf_readf_float(sndfile, filebuf + (overlapSize * channels), stepSize)) < 0) {
cerr << "ERROR: sf_readf_float failed: " << sf_strerror(sndfile) << endl;
break;
}
if (count != stepSize) --finalStepsRemaining;
count += overlapSize;
}
for (int c = 0; c < channels; ++c) {
@ -440,22 +452,28 @@ int runPlugin(string myname, string soname, string id,
}
}
rt = RealTime::frame2RealTime(i, sfinfo.samplerate);
rt = RealTime::frame2RealTime(currentStep * stepSize, sfinfo.samplerate);
printFeatures
(RealTime::realTime2Frame(rt + adjustment, sfinfo.samplerate),
sfinfo.samplerate, outputNo, plugin->process(plugbuf, rt),
out, useFrames);
int pp = progress;
progress = lrintf((float(i) / sfinfo.frames) * 100.f);
if (progress != pp && out) {
cerr << "\r" << progress << "%";
if (sfinfo.frames > 0){
int pp = progress;
progress = lrintf((float(currentStep * stepSize) / sfinfo.frames) * 100.f);
if (progress != pp && out) {
cerr << "\r" << progress << "%";
}
}
}
++currentStep;
} while (finalStepsRemaining > 0);
if (out) cerr << "\rDone" << endl;
rt = RealTime::frame2RealTime(sfinfo.frames, sfinfo.samplerate);
rt = RealTime::frame2RealTime(currentStep * stepSize, sfinfo.samplerate);
printFeatures(RealTime::realTime2Frame(rt + adjustment, sfinfo.samplerate),
sfinfo.samplerate, outputNo,
@ -519,6 +537,7 @@ printFeatures(int frame, int sr, int output,
for (unsigned int j = 0; j < features[output][i].values.size(); ++j) {
(out ? *out : cout) << " " << features[output][i].values[j];
}
(out ? *out : cout) << " " << features[output][i].label;
(out ? *out : cout) << endl;
}

View File

@ -1,53 +0,0 @@
Index: Makefile.in
===================================================================
RCS file: /cvsroot/audacity/lib-src/libvamp/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- Makefile.in 29 Dec 2008 22:00:31 -0000 1.4
+++ Makefile.in 23 Jan 2009 23:11:52 -0000
@@ -34,7 +34,7 @@
# clean -- remove binary targets
# distclean -- remove all targets
#
-default: all
+default: @TARGETS@
# Compile flags
#
Index: configure.ac
===================================================================
RCS file: /cvsroot/audacity/lib-src/libvamp/configure.ac,v
retrieving revision 1.1
diff -u -r1.1 configure.ac
--- configure.ac 29 Dec 2008 22:00:31 -0000 1.1
+++ configure.ac 23 Jan 2009 23:11:52 -0000
@@ -14,7 +14,28 @@
AC_SEARCH_LIBS([dlopen],[dl])
-PKG_CHECK_MODULES([SNDFILE],[sndfile])
+dnl See if the user wants to build programs, or just the SDK
+AC_ARG_ENABLE(programs, [AS_HELP_STRING([--enable-programs],
+ [enable building of example host and RDF generator [default=yes]])],
+ PROGS_ARGUMENT=$enableval,
+ PROGS_ARGUMENT="yes")
+
+dnl if the user wants progs, then we need to check for libsndfile
+if test "x$PROGS_ARGUMENT" = "xyes" ; then
+ PKG_CHECK_MODULES([SNDFILE],[sndfile],
+ have_sndfile="yes", have_sndfile="no")
+ if test "x$have_sndfile" = "xyes" ; then
+ dnl all good, build everything
+ TARGETS="sdk plugins host rdfgen test"
+ else
+ dnl no libsndfile - can't build host!
+ AC_MSG_ERROR([libsndfile not found - cannot build example Vamp host!])
+ fi
+else
+ dnl user didn't want programs - so we won't build them
+ TARGETS="sdk plugins test"
+fi
+
AC_SUBST(SNDFILE_CFLAGS)
AC_SUBST(SNDFILE_LIBS)

View File

@ -4,7 +4,7 @@ libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: vamp-hostsdk
Version: 2.0.0
Version: 2.5
Description: Development library for Vamp audio analysis plugin hosts
Libs: -L${libdir} -lvamp-hostsdk
Libs: -L${libdir} -lvamp-hostsdk -ldl
Cflags: -I${includedir}

View File

@ -4,7 +4,7 @@ libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: vamp-sdk
Version: 2.0.0
Version: 2.5
Description: Development library for Vamp audio analysis plugins
Libs: -L${libdir} -lvamp-sdk
Cflags: -I${includedir}

View File

@ -4,7 +4,7 @@ libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: vamp
Version: 2.0
Version: 2.5
Description: An API for audio analysis and feature extraction plugins
Libs:
Cflags: -I${includedir}

View File

@ -250,7 +250,7 @@ string describe_output(Plugin *plugin, Plugin::OutputDescriptor o)
res+=" vamp:bin_count "+to_string(o.binCount)+" ;\n";
bool haveBinNames = false;
for (int i=0; i < o.binNames.size(); i++) {
for (unsigned int i=0; i < o.binNames.size(); i++) {
if (o.binNames[i] != "") {
haveBinNames = true;
break;
@ -309,7 +309,7 @@ string describe_output(Plugin *plugin, Plugin::OutputDescriptor o)
res+=" vamp:bin_count "+to_string(o.binCount)+" ;\n";
bool haveBinNames = false;
for (int i=0; i < o.binNames.size(); i++) {
for (unsigned int i=0; i < o.binNames.size(); i++) {
if (o.binNames[i] != "") {
haveBinNames = true;
break;

View File

@ -29,7 +29,7 @@
foaf:maker "Chris Sutton";
foaf:maker "Yves Raimond";
foaf:maker "David Pastor Escuredo";
dc:date "$Date: 2008-12-29 22:00:31 $";
dc:date "$Date: 2008/05/21 17:05:11 $";
.
vs:term_status a owl:AnnotationProperty.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,101 @@
## Skeleton Makefile for Vamp plugin builds using command-line tools.
## This requires GNU make, which is what you get with OS/X, Linux, or
## MinGW/Cygwin on Windows.
##
## Rename this to Makefile, and edit as appropriate.
## This Makefile WILL NOT WORK until you have edited it as described
## below -- the Makefile as supplied does nothing useful at all!
##
## Various sets of options are provided, commented out -- just uncomment
## (remove the '#' characters for) the set that most closely resembles
## your own situation, and adjust to taste. Then run "gmake".
##
## (For Windows builds using MS Visual Studio, start instead with the
## VampExamplePlugins project found in the build directory of the SDK.)
# Edit this to the base name of your plugin library
#
PLUGIN_LIBRARY_NAME := myplugins
# Edit this to list the .cpp or .c files in your plugin project
#
PLUGIN_SOURCES := MyPlugin.cpp plugins.cpp
# Edit this to list the .h files in your plugin project
#
PLUGIN_HEADERS := MyPlugin.h
# Edit this to the location of the Vamp plugin SDK, relative to your
# project directory
#
VAMP_SDK_DIR := ../vamp-plugin-sdk
## Uncomment these for an OS/X universal binary (32- and 64-bit Intel)
## supporting 10.5 or newer. Use this if you have OS/X 10.7 with the
## Xcode 4 command-line tools.
# CXX := g++
# CXXFLAGS := -mmacosx-version-min=10.5 -arch i386 -arch x86_64 -I$(VAMP_SDK_DIR) -Wall -fPIC
# PLUGIN_EXT := .dylib
# LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
## Uncomment these for an OS/X universal binary (PPC and 32- and
## 64-bit Intel) supporting 10.5 or newer. Use this if you have OS/X
## 10.6 with the Xcode 3 command-line tools.
# CXXFLAGS := -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch i386 -arch x86_64 -arch ppc -I$(VAMP_SDK_DIR) -Wall -fPIC
# PLUGIN_EXT := .dylib
# LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
## Uncomment these for an OS/X universal binary (PPC and 32- and
## 64-bit Intel) supporting 10.4 or newer. Use this if you have OS/X
## 10.4, 10.5 or 10.6 and you have the 10.4 SDK installed.
# CXX := g++-4.0
# CXXFLAGS := -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -I$(VAMP_SDK_DIR) -Wall -fPIC
# PLUGIN_EXT := .dylib
# LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
## Uncomment these for Linux using the standard tools:
# CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall -fPIC
# PLUGIN_EXT := .so
# LDFLAGS := -shared -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Wl,--version-script=vamp-plugin.map
## Uncomment these for a cross-compile from Linux to Windows using MinGW:
# CXX := i586-mingw32msvc-g++
# CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall
# PLUGIN_EXT := .dll
# LDFLAGS := --static-libgcc -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) -shared $(VAMP_SDK_DIR)/libvamp-sdk.a
## Uncomment these for OpenSolaris using SunStudio compiler and GNU make:
# CXX := CC
# CXXFLAGS := -G -I$(VAMP_SDK_DIR) +w -KPIC
# PLUGIN_EXT := .so
# LDFLAGS := -G -h$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Qoption ld -Mvamp-plugin.map
## All of the above
PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o)
PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o)
$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT): $(PLUGIN_OBJECTS)
$(CXX) -o $@ $^ $(LDFLAGS)
$(PLUGIN_OBJECTS): $(PLUGIN_HEADERS)
clean:
rm -f *.o

View File

@ -0,0 +1,220 @@
// This is a skeleton file for use in creating your own plugin
// libraries. Replace MyPlugin and myPlugin throughout with the name
// of your first plugin class, and fill in the gaps as appropriate.
#include "MyPlugin.h"
MyPlugin::MyPlugin(float inputSampleRate) :
Plugin(inputSampleRate)
// Also be sure to set your plugin parameters (presumably stored
// in member variables) to their default values here -- the host
// will not do that for you
{
}
MyPlugin::~MyPlugin()
{
}
string
MyPlugin::getIdentifier() const
{
return "myplugin";
}
string
MyPlugin::getName() const
{
return "My Plugin";
}
string
MyPlugin::getDescription() const
{
// Return something helpful here!
return "";
}
string
MyPlugin::getMaker() const
{
// Your name here
return "";
}
int
MyPlugin::getPluginVersion() const
{
// Increment this each time you release a version that behaves
// differently from the previous one
return 1;
}
string
MyPlugin::getCopyright() const
{
// This function is not ideally named. It does not necessarily
// need to say who made the plugin -- getMaker does that -- but it
// should indicate the terms under which it is distributed. For
// example, "Copyright (year). All Rights Reserved", or "GPL"
return "";
}
MyPlugin::InputDomain
MyPlugin::getInputDomain() const
{
return TimeDomain;
}
size_t
MyPlugin::getPreferredBlockSize() const
{
return 0; // 0 means "I can handle any block size"
}
size_t
MyPlugin::getPreferredStepSize() const
{
return 0; // 0 means "anything sensible"; in practice this
// means the same as the block size for TimeDomain
// plugins, or half of it for FrequencyDomain plugins
}
size_t
MyPlugin::getMinChannelCount() const
{
return 1;
}
size_t
MyPlugin::getMaxChannelCount() const
{
return 1;
}
MyPlugin::ParameterList
MyPlugin::getParameterDescriptors() const
{
ParameterList list;
// If the plugin has no adjustable parameters, return an empty
// list here (and there's no need to provide implementations of
// getParameter and setParameter in that case either).
// Note that it is your responsibility to make sure the parameters
// start off having their default values (e.g. in the constructor
// above). The host needs to know the default value so it can do
// things like provide a "reset to default" function, but it will
// not explicitly set your parameters to their defaults for you if
// they have not changed in the mean time.
ParameterDescriptor d;
d.identifier = "parameter";
d.name = "Some Parameter";
d.description = "";
d.unit = "";
d.minValue = 0;
d.maxValue = 10;
d.defaultValue = 5;
d.isQuantized = false;
list.push_back(d);
return list;
}
float
MyPlugin::getParameter(string identifier) const
{
if (identifier == "parameter") {
return 5; // return the ACTUAL current value of your parameter here!
}
return 0;
}
void
MyPlugin::setParameter(string identifier, float value)
{
if (identifier == "parameter") {
// set the actual value of your parameter
}
}
MyPlugin::ProgramList
MyPlugin::getPrograms() const
{
ProgramList list;
// If you have no programs, return an empty list (or simply don't
// implement this function or getCurrentProgram/selectProgram)
return list;
}
string
MyPlugin::getCurrentProgram() const
{
return ""; // no programs
}
void
MyPlugin::selectProgram(string name)
{
}
MyPlugin::OutputList
MyPlugin::getOutputDescriptors() const
{
OutputList list;
// See OutputDescriptor documentation for the possibilities here.
// Every plugin must have at least one output.
OutputDescriptor d;
d.identifier = "output";
d.name = "My Output";
d.description = "";
d.unit = "";
d.hasFixedBinCount = true;
d.binCount = 1;
d.hasKnownExtents = false;
d.isQuantized = false;
d.sampleType = OutputDescriptor::OneSamplePerStep;
d.hasDuration = false;
list.push_back(d);
return list;
}
bool
MyPlugin::initialise(size_t channels, size_t stepSize, size_t blockSize)
{
if (channels < getMinChannelCount() ||
channels > getMaxChannelCount()) return false;
// Real initialisation work goes here!
return true;
}
void
MyPlugin::reset()
{
// Clear buffers, reset stored values, etc
}
MyPlugin::FeatureSet
MyPlugin::process(const float *const *inputBuffers, Vamp::RealTime timestamp)
{
// Do actual work!
return FeatureSet();
}
MyPlugin::FeatureSet
MyPlugin::getRemainingFeatures()
{
return FeatureSet();
}

View File

@ -0,0 +1,59 @@
// This is a skeleton file for use in creating your own plugin
// libraries. Replace MyPlugin and myPlugin throughout with the name
// of your first plugin class, and fill in the gaps as appropriate.
// Remember to use a different guard symbol in each header!
#ifndef _MY_PLUGIN_H_
#define _MY_PLUGIN_H_
#include <vamp-sdk/Plugin.h>
using std::string;
class MyPlugin : public Vamp::Plugin
{
public:
MyPlugin(float inputSampleRate);
virtual ~MyPlugin();
string getIdentifier() const;
string getName() const;
string getDescription() const;
string getMaker() const;
int getPluginVersion() const;
string getCopyright() const;
InputDomain getInputDomain() const;
size_t getPreferredBlockSize() const;
size_t getPreferredStepSize() const;
size_t getMinChannelCount() const;
size_t getMaxChannelCount() const;
ParameterList getParameterDescriptors() const;
float getParameter(string identifier) const;
void setParameter(string identifier, float value);
ProgramList getPrograms() const;
string getCurrentProgram() const;
void selectProgram(string name);
OutputList getOutputDescriptors() const;
bool initialise(size_t channels, size_t stepSize, size_t blockSize);
void reset();
FeatureSet process(const float *const *inputBuffers,
Vamp::RealTime timestamp);
FeatureSet getRemainingFeatures();
protected:
// plugin-specific data and methods go here
};
#endif

View File

@ -0,0 +1,37 @@
// This is a skeleton file for use in creating your own plugin
// libraries. Replace MyPlugin and myPlugin throughout with the name
// of your first plugin class, and fill in the gaps as appropriate.
#include <vamp/vamp.h>
#include <vamp-sdk/PluginAdapter.h>
#include "MyPlugin.h"
// Declare one static adapter here for each plugin class in this library.
static Vamp::PluginAdapter<MyPlugin> myPluginAdapter;
// This is the entry-point for the library, and the only function that
// needs to be publicly exported.
const VampPluginDescriptor *
vampGetPluginDescriptor(unsigned int version, unsigned int index)
{
if (version < 1) return 0;
// Return a different plugin adaptor's descriptor for each index,
// and return 0 for the first index after you run out of plugins.
// (That's how the host finds out how many plugins are in this
// library.)
switch (index) {
case 0: return myPluginAdapter.getDescriptor();
default: return 0;
}
}

View File

@ -0,0 +1 @@
_vampGetPluginDescriptor

View File

@ -0,0 +1,4 @@
{
global: vampGetPluginDescriptor;
local: *;
};

View File

@ -62,6 +62,9 @@ whether proprietary or open-source.
results used in the calculation, and may be a useful example of a
plugin having several outputs with varying feature structures.
Plugin authors should also read the Programmer's Guide at
http://vamp-plugins.org/guide.pdf .
\section hosts For Hosts
Hosts will normally use a Vamp::PluginHostAdapter to convert each

View File

@ -6,8 +6,8 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2007 Chris Cannam and QMUL.
This file by Mark Levy and Chris Cannam, Copyright 2007-2008 QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
This file by Mark Levy and Chris Cannam, Copyright 2007-2009 QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@ -39,6 +39,7 @@
#include <map>
#include <vamp-hostsdk/PluginBufferingAdapter.h>
#include <vamp-hostsdk/PluginInputDomainAdapter.h>
using std::vector;
using std::map;
@ -243,8 +244,10 @@ protected:
bool m_unrun;
mutable OutputList m_outputs;
mutable std::map<int, bool> m_rewriteOutputTimes;
std::map<int, int> m_fixedRateFeatureNos; // output no -> feature no
void processBlock(FeatureSet& allFeatureSets);
void adjustFixedRateFeatureTime(int outputNo, Feature &);
};
PluginBufferingAdapter::PluginBufferingAdapter(Plugin *plugin) :
@ -468,8 +471,8 @@ PluginBufferingAdapter::Impl::initialise(size_t channels, size_t stepSize, size_
m_blockSize = newBlockSize;
}
std::cerr << "PluginBufferingAdapter::initialise: NOTE: stepSize " << m_inputStepSize << " -> " << m_stepSize
<< ", blockSize " << m_inputBlockSize << " -> " << m_blockSize << std::endl;
// std::cerr << "PluginBufferingAdapter::initialise: NOTE: stepSize " << m_inputStepSize << " -> " << m_stepSize
// << ", blockSize " << m_inputBlockSize << " -> " << m_blockSize << std::endl;
m_buffers = new float *[m_channels];
@ -606,6 +609,25 @@ PluginBufferingAdapter::Impl::process(const float *const *inputBuffers,
return allFeatureSets;
}
void
PluginBufferingAdapter::Impl::adjustFixedRateFeatureTime(int outputNo,
Feature &feature)
{
if (feature.hasTimestamp) {
double secs = feature.timestamp.sec;
secs += feature.timestamp.nsec / 1e9;
m_fixedRateFeatureNos[outputNo] =
int(secs * double(m_outputs[outputNo].sampleRate) + 0.5);
}
feature.timestamp = RealTime::fromSeconds
(m_fixedRateFeatureNos[outputNo] / double(m_outputs[outputNo].sampleRate));
feature.hasTimestamp = true;
m_fixedRateFeatureNos[outputNo] = m_fixedRateFeatureNos[outputNo] + 1;
}
PluginBufferingAdapter::FeatureSet
PluginBufferingAdapter::Impl::getRemainingFeatures()
{
@ -630,9 +652,18 @@ PluginBufferingAdapter::Impl::getRemainingFeatures()
for (map<int, FeatureList>::iterator iter = featureSet.begin();
iter != featureSet.end(); ++iter) {
int outputNo = iter->first;
FeatureList featureList = iter->second;
for (size_t i = 0; i < featureList.size(); ++i) {
allFeatureSets[iter->first].push_back(featureList[i]);
if (m_outputs[outputNo].sampleType ==
OutputDescriptor::FixedSampleRate) {
adjustFixedRateFeatureTime(outputNo, featureList[i]);
}
allFeatureSets[outputNo].push_back(featureList[i]);
}
}
@ -652,6 +683,14 @@ PluginBufferingAdapter::Impl::processBlock(FeatureSet& allFeatureSets)
FeatureSet featureSet = m_plugin->process(m_buffers, timestamp);
PluginWrapper *wrapper = dynamic_cast<PluginWrapper *>(m_plugin);
RealTime adjustment;
if (wrapper) {
PluginInputDomainAdapter *ida =
wrapper->getWrapper<PluginInputDomainAdapter>();
if (ida) adjustment = ida->getTimestampAdjustment();
}
for (FeatureSet::iterator iter = featureSet.begin();
iter != featureSet.end(); ++iter) {
@ -667,20 +706,17 @@ PluginBufferingAdapter::Impl::processBlock(FeatureSet& allFeatureSets)
case OutputDescriptor::OneSamplePerStep:
// use our internal timestamp, always
featureList[i].timestamp = timestamp;
featureList[i].timestamp = timestamp + adjustment;
featureList[i].hasTimestamp = true;
break;
case OutputDescriptor::FixedSampleRate:
// use our internal timestamp if feature lacks one
if (!featureList[i].hasTimestamp) {
featureList[i].timestamp = timestamp;
featureList[i].hasTimestamp = true;
}
adjustFixedRateFeatureTime(outputNo, featureList[i]);
break;
case OutputDescriptor::VariableSampleRate:
break; // plugin must set timestamp
// plugin must set timestamp
break;
default:
break;

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2007 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@ -163,7 +163,7 @@ PluginChannelAdapter::Impl::initialise(size_t channels, size_t stepSize, size_t
m_pluginChannels = minch;
std::cerr << "PluginChannelAdapter::initialise: expanding " << m_inputChannels << " to " << m_pluginChannels << " for plugin" << std::endl;
// std::cerr << "PluginChannelAdapter::initialise: expanding " << m_inputChannels << " to " << m_pluginChannels << " for plugin" << std::endl;
} else if (m_inputChannels > maxch) {
@ -175,18 +175,18 @@ PluginChannelAdapter::Impl::initialise(size_t channels, size_t stepSize, size_t
m_buffer = new float *[1];
m_buffer[0] = new float[blockSize];
std::cerr << "PluginChannelAdapter::initialise: mixing " << m_inputChannels << " to mono for plugin" << std::endl;
// std::cerr << "PluginChannelAdapter::initialise: mixing " << m_inputChannels << " to mono for plugin" << std::endl;
} else {
std::cerr << "PluginChannelAdapter::initialise: reducing " << m_inputChannels << " to " << m_pluginChannels << " for plugin" << std::endl;
// std::cerr << "PluginChannelAdapter::initialise: reducing " << m_inputChannels << " to " << m_pluginChannels << " for plugin" << std::endl;
}
m_pluginChannels = maxch;
} else {
std::cerr << "PluginChannelAdapter::initialise: accepting given number of channels (" << m_inputChannels << ")" << std::endl;
// std::cerr << "PluginChannelAdapter::initialise: accepting given number of channels (" << m_inputChannels << ")" << std::endl;
m_pluginChannels = m_inputChannels;
}

View File

@ -37,8 +37,8 @@
#include <vamp-hostsdk/PluginHostAdapter.h>
#include <cstdlib>
#if ( VAMP_SDK_MAJOR_VERSION != 2 || VAMP_SDK_MINOR_VERSION != 0 )
#error Incorrect Vamp SDK header included (not the expected 2.0 SDK)
#if ( VAMP_SDK_MAJOR_VERSION != 2 || VAMP_SDK_MINOR_VERSION != 5 )
#error Unexpected version of Vamp SDK header included
#endif
_VAMP_SDK_HOSTSPACE_BEGIN(PluginHostAdapter.cpp)
@ -265,7 +265,11 @@ PluginHostAdapter::getCurrentProgram() const
if (!m_handle) return "";
int pn = m_descriptor->getCurrentProgram(m_handle);
return m_descriptor->programs[pn];
if (pn < (int)m_descriptor->programCount) {
return m_descriptor->programs[pn];
} else {
return "";
}
}
void

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2007 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
This file is based in part on Don Cross's public domain FFT
implementation.
@ -41,6 +41,8 @@
#include <cmath>
#include "Window.h"
/**
* If you want to compile using FFTW instead of the built-in FFT
@ -67,6 +69,9 @@
*/
#ifdef HAVE_FFTW3
#include <fftw3.h>
#warning "Compiling with FFTW3 support will result in a GPL binary"
#else
#include "../vamp-sdk/FFTimpl.cpp"
#endif
@ -83,23 +88,37 @@ public:
~Impl();
bool initialise(size_t channels, size_t stepSize, size_t blockSize);
void reset();
size_t getPreferredStepSize() const;
size_t getPreferredBlockSize() const;
FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
void setProcessTimestampMethod(ProcessTimestampMethod m);
ProcessTimestampMethod getProcessTimestampMethod() const;
RealTime getTimestampAdjustment() const;
WindowType getWindowType() const;
void setWindowType(WindowType type);
protected:
Plugin *m_plugin;
float m_inputSampleRate;
int m_channels;
int m_stepSize;
int m_blockSize;
float **m_freqbuf;
double *m_ri;
double *m_window;
WindowType m_windowType;
Window<double> *m_window;
ProcessTimestampMethod m_method;
int m_processCount;
float **m_shiftBuffers;
#ifdef HAVE_FFTW3
fftw_plan m_plan;
@ -107,11 +126,14 @@ protected:
#else
double *m_ro;
double *m_io;
void fft(unsigned int n, bool inverse,
double *ri, double *ii, double *ro, double *io);
#endif
FeatureSet processShiftingTimestamp(const float *const *inputBuffers, RealTime timestamp);
FeatureSet processShiftingData(const float *const *inputBuffers, RealTime timestamp);
size_t makeBlockSizeAcceptable(size_t) const;
Window<double>::WindowType convertType(WindowType t) const;
};
PluginInputDomainAdapter::PluginInputDomainAdapter(Plugin *plugin) :
@ -131,6 +153,12 @@ PluginInputDomainAdapter::initialise(size_t channels, size_t stepSize, size_t bl
return m_impl->initialise(channels, stepSize, blockSize);
}
void
PluginInputDomainAdapter::reset()
{
m_impl->reset();
}
Plugin::InputDomain
PluginInputDomainAdapter::getInputDomain() const
{
@ -155,21 +183,50 @@ PluginInputDomainAdapter::process(const float *const *inputBuffers, RealTime tim
return m_impl->process(inputBuffers, timestamp);
}
void
PluginInputDomainAdapter::setProcessTimestampMethod(ProcessTimestampMethod m)
{
m_impl->setProcessTimestampMethod(m);
}
PluginInputDomainAdapter::ProcessTimestampMethod
PluginInputDomainAdapter::getProcessTimestampMethod() const
{
return m_impl->getProcessTimestampMethod();
}
RealTime
PluginInputDomainAdapter::getTimestampAdjustment() const
{
return m_impl->getTimestampAdjustment();
}
PluginInputDomainAdapter::WindowType
PluginInputDomainAdapter::getWindowType() const
{
return m_impl->getWindowType();
}
void
PluginInputDomainAdapter::setWindowType(WindowType w)
{
m_impl->setWindowType(w);
}
PluginInputDomainAdapter::Impl::Impl(Plugin *plugin, float inputSampleRate) :
m_plugin(plugin),
m_inputSampleRate(inputSampleRate),
m_channels(0),
m_stepSize(0),
m_blockSize(0),
m_freqbuf(0),
m_ri(0),
m_windowType(HanningWindow),
m_window(0),
m_method(ShiftTimestamp),
m_processCount(0),
m_shiftBuffers(0),
#ifdef HAVE_FFTW3
m_plan(0),
m_cbuf(0)
@ -184,6 +241,13 @@ PluginInputDomainAdapter::Impl::~Impl()
{
// the adapter will delete the plugin
if (m_shiftBuffers) {
for (int c = 0; c < m_channels; ++c) {
delete[] m_shiftBuffers[c];
}
delete[] m_shiftBuffers;
}
if (m_channels > 0) {
for (int c = 0; c < m_channels; ++c) {
delete[] m_freqbuf[c];
@ -201,7 +265,8 @@ PluginInputDomainAdapter::Impl::~Impl()
delete[] m_ro;
delete[] m_io;
#endif
delete[] m_window;
delete m_window;
}
}
@ -215,6 +280,7 @@ PluginInputDomainAdapter::Impl::initialise(size_t channels, size_t stepSize, siz
{
if (m_plugin->getInputDomain() == TimeDomain) {
m_stepSize = int(stepSize);
m_blockSize = int(blockSize);
m_channels = int(channels);
@ -222,12 +288,12 @@ PluginInputDomainAdapter::Impl::initialise(size_t channels, size_t stepSize, siz
}
if (blockSize < 2) {
std::cerr << "ERROR: Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise: blocksize < 2 not supported" << std::endl;
std::cerr << "ERROR: PluginInputDomainAdapter::initialise: blocksize < 2 not supported" << std::endl;
return false;
}
if (blockSize & (blockSize-1)) {
std::cerr << "ERROR: Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise: non-power-of-two\nblocksize " << blockSize << " not supported" << std::endl;
std::cerr << "ERROR: PluginInputDomainAdapter::initialise: non-power-of-two\nblocksize " << blockSize << " not supported" << std::endl;
return false;
}
@ -248,9 +314,10 @@ PluginInputDomainAdapter::Impl::initialise(size_t channels, size_t stepSize, siz
delete[] m_ro;
delete[] m_io;
#endif
delete[] m_window;
delete m_window;
}
m_stepSize = int(stepSize);
m_blockSize = int(blockSize);
m_channels = int(channels);
@ -258,12 +325,8 @@ PluginInputDomainAdapter::Impl::initialise(size_t channels, size_t stepSize, siz
for (int c = 0; c < m_channels; ++c) {
m_freqbuf[c] = new float[m_blockSize + 2];
}
m_window = new double[m_blockSize];
for (int i = 0; i < m_blockSize; ++i) {
// Hanning window
m_window[i] = (0.50 - 0.50 * cos((2.0 * M_PI * i) / m_blockSize));
}
m_window = new Window<double>(convertType(m_windowType), m_blockSize);
#ifdef HAVE_FFTW3
m_ri = (double *)fftw_malloc(blockSize * sizeof(double));
@ -275,9 +338,18 @@ PluginInputDomainAdapter::Impl::initialise(size_t channels, size_t stepSize, siz
m_io = new double[m_blockSize];
#endif
m_processCount = 0;
return m_plugin->initialise(channels, stepSize, blockSize);
}
void
PluginInputDomainAdapter::Impl::reset()
{
m_processCount = 0;
m_plugin->reset();
}
size_t
PluginInputDomainAdapter::Impl::getPreferredStepSize() const
{
@ -311,7 +383,7 @@ PluginInputDomainAdapter::Impl::makeBlockSizeAcceptable(size_t blockSize) const
{
if (blockSize < 2) {
std::cerr << "WARNING: Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise: blocksize < 2 not" << std::endl
std::cerr << "WARNING: PluginInputDomainAdapter::initialise: blocksize < 2 not" << std::endl
<< "supported, increasing from " << blockSize << " to 2" << std::endl;
blockSize = 2;
@ -340,7 +412,7 @@ PluginInputDomainAdapter::Impl::makeBlockSizeAcceptable(size_t blockSize) const
nearest = nearest*2;
}
std::cerr << "WARNING: Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise: non-power-of-two\nblocksize " << blockSize << " not supported, using blocksize " << nearest << " instead" << std::endl;
std::cerr << "WARNING: PluginInputDomainAdapter::initialise: non-power-of-two\nblocksize " << blockSize << " not supported, using blocksize " << nearest << " instead" << std::endl;
blockSize = nearest;
#endif
@ -354,12 +426,66 @@ PluginInputDomainAdapter::Impl::getTimestampAdjustment() const
{
if (m_plugin->getInputDomain() == TimeDomain) {
return RealTime::zeroTime;
} else if (m_method == ShiftData || m_method == NoShift) {
return RealTime::zeroTime;
} else {
return RealTime::frame2RealTime
(m_blockSize/2, int(m_inputSampleRate + 0.5));
}
}
void
PluginInputDomainAdapter::Impl::setProcessTimestampMethod(ProcessTimestampMethod m)
{
m_method = m;
}
PluginInputDomainAdapter::ProcessTimestampMethod
PluginInputDomainAdapter::Impl::getProcessTimestampMethod() const
{
return m_method;
}
void
PluginInputDomainAdapter::Impl::setWindowType(WindowType t)
{
if (m_windowType == t) return;
m_windowType = t;
if (m_window) {
delete m_window;
m_window = new Window<double>(convertType(m_windowType), m_blockSize);
}
}
PluginInputDomainAdapter::WindowType
PluginInputDomainAdapter::Impl::getWindowType() const
{
return m_windowType;
}
Window<double>::WindowType
PluginInputDomainAdapter::Impl::convertType(WindowType t) const
{
switch (t) {
case RectangularWindow:
return Window<double>::RectangularWindow;
case BartlettWindow:
return Window<double>::BartlettWindow;
case HammingWindow:
return Window<double>::HammingWindow;
case HanningWindow:
return Window<double>::HanningWindow;
case BlackmanWindow:
return Window<double>::BlackmanWindow;
case NuttallWindow:
return Window<double>::NuttallWindow;
case BlackmanHarrisWindow:
return Window<double>::BlackmanHarrisWindow;
default:
return Window<double>::HanningWindow;
}
}
Plugin::FeatureSet
PluginInputDomainAdapter::Impl::process(const float *const *inputBuffers,
RealTime timestamp)
@ -368,59 +494,24 @@ PluginInputDomainAdapter::Impl::process(const float *const *inputBuffers,
return m_plugin->process(inputBuffers, timestamp);
}
// The timestamp supplied should be (according to the Vamp::Plugin
// spec) the time of the start of the time-domain input block.
// However, we want to pass to the plugin an FFT output calculated
// from the block of samples _centred_ on that timestamp.
//
// We have two options:
//
// 1. Buffer the input, calculating the fft of the values at the
// passed-in block minus blockSize/2 rather than starting at the
// passed-in block. So each time we call process on the plugin,
// we are passing in the same timestamp as was passed to our own
// process plugin, but not (the frequency domain representation
// of) the same set of samples. Advantages: avoids confusion in
// the host by ensuring the returned values have timestamps
// comparable with that passed in to this function (in fact this
// is pretty much essential for one-value-per-block outputs);
// consistent with hosts such as SV that deal with the
// frequency-domain transform themselves. Disadvantages: means
// making the not necessarily correct assumption that the samples
// preceding the first official block are all zero (or some other
// known value).
//
// 2. Increase the passed-in timestamps by half the blocksize. So
// when we call process, we are passing in the frequency domain
// representation of the same set of samples as passed to us, but
// with a different timestamp. Advantages: simplicity; avoids
// iffy assumption mentioned above. Disadvantages: inconsistency
// with SV in cases where stepSize != blockSize/2; potential
// confusion arising from returned timestamps being calculated
// from the adjusted input timestamps rather than the original
// ones (and inaccuracy where the returned timestamp is implied,
// as in one-value-per-block).
//
// Neither way is ideal, but I don't think either is strictly
// incorrect either. I think this is just a case where the same
// plugin can legitimately produce differing results from the same
// input data, depending on how that data is packaged.
//
// We'll go for option 2, adjusting the timestamps. Note in
// particular that this means some results can differ from those
// produced by SV.
if (m_method == ShiftTimestamp || m_method == NoShift) {
return processShiftingTimestamp(inputBuffers, timestamp);
} else {
return processShiftingData(inputBuffers, timestamp);
}
}
// std::cerr << "PluginInputDomainAdapter: sampleRate " << m_inputSampleRate << ", blocksize " << m_blockSize << ", adjusting time from " << timestamp;
timestamp = timestamp + getTimestampAdjustment();
// std::cerr << " to " << timestamp << std::endl;
Plugin::FeatureSet
PluginInputDomainAdapter::Impl::processShiftingTimestamp(const float *const *inputBuffers,
RealTime timestamp)
{
if (m_method == ShiftTimestamp) {
timestamp = timestamp + getTimestampAdjustment();
}
for (int c = 0; c < m_channels; ++c) {
for (int i = 0; i < m_blockSize; ++i) {
m_ri[i] = double(inputBuffers[c][i]) * m_window[i];
}
m_window->cut(inputBuffers[c], m_ri);
for (int i = 0; i < m_blockSize/2; ++i) {
// FFT shift
@ -430,148 +521,87 @@ PluginInputDomainAdapter::Impl::process(const float *const *inputBuffers,
}
#ifdef HAVE_FFTW3
fftw_execute(m_plan);
for (int i = 0; i <= m_blockSize/2; ++i) {
m_freqbuf[c][i * 2] = float(m_cbuf[i][0]);
m_freqbuf[c][i * 2 + 1] = float(m_cbuf[i][1]);
}
#else
fft(m_blockSize, false, m_ri, 0, m_ro, m_io);
for (int i = 0; i <= m_blockSize/2; ++i) {
m_freqbuf[c][i * 2] = float(m_ro[i]);
m_freqbuf[c][i * 2 + 1] = float(m_io[i]);
}
#endif
}
return m_plugin->process(m_freqbuf, timestamp);
}
#ifndef HAVE_FFTW3
void
PluginInputDomainAdapter::Impl::fft(unsigned int n, bool inverse,
double *ri, double *ii, double *ro, double *io)
Plugin::FeatureSet
PluginInputDomainAdapter::Impl::processShiftingData(const float *const *inputBuffers,
RealTime timestamp)
{
if (!ri || !ro || !io) return;
unsigned int bits;
unsigned int i, j, k, m;
unsigned int blockSize, blockEnd;
double tr, ti;
if (n < 2) return;
if (n & (n-1)) return;
double angle = 2.0 * M_PI;
if (inverse) angle = -angle;
for (i = 0; ; ++i) {
if (n & (1 << i)) {
bits = i;
break;
}
if (m_processCount == 0) {
if (!m_shiftBuffers) {
m_shiftBuffers = new float *[m_channels];
for (int c = 0; c < m_channels; ++c) {
m_shiftBuffers[c] = new float[m_blockSize + m_blockSize/2];
}
}
for (int c = 0; c < m_channels; ++c) {
for (int i = 0; i < m_blockSize + m_blockSize/2; ++i) {
m_shiftBuffers[c][i] = 0.f;
}
}
}
static unsigned int tableSize = 0;
static int *table = 0;
if (tableSize != n) {
delete[] table;
table = new int[n];
for (i = 0; i < n; ++i) {
m = i;
for (j = k = 0; j < bits; ++j) {
k = (k << 1) | (m & 1);
m >>= 1;
}
table[i] = k;
}
tableSize = n;
for (int c = 0; c < m_channels; ++c) {
for (int i = m_stepSize; i < m_blockSize + m_blockSize/2; ++i) {
m_shiftBuffers[c][i - m_stepSize] = m_shiftBuffers[c][i];
}
for (int i = 0; i < m_blockSize; ++i) {
m_shiftBuffers[c][i + m_blockSize/2] = inputBuffers[c][i];
}
}
if (ii) {
for (i = 0; i < n; ++i) {
ro[table[i]] = ri[i];
io[table[i]] = ii[i];
}
} else {
for (i = 0; i < n; ++i) {
ro[table[i]] = ri[i];
io[table[i]] = 0.0;
}
for (int c = 0; c < m_channels; ++c) {
m_window->cut(m_shiftBuffers[c], m_ri);
for (int i = 0; i < m_blockSize/2; ++i) {
// FFT shift
double value = m_ri[i];
m_ri[i] = m_ri[i + m_blockSize/2];
m_ri[i + m_blockSize/2] = value;
}
#ifdef HAVE_FFTW3
fftw_execute(m_plan);
for (int i = 0; i <= m_blockSize/2; ++i) {
m_freqbuf[c][i * 2] = float(m_cbuf[i][0]);
m_freqbuf[c][i * 2 + 1] = float(m_cbuf[i][1]);
}
#else
fft(m_blockSize, false, m_ri, 0, m_ro, m_io);
for (int i = 0; i <= m_blockSize/2; ++i) {
m_freqbuf[c][i * 2] = float(m_ro[i]);
m_freqbuf[c][i * 2 + 1] = float(m_io[i]);
}
#endif
}
blockEnd = 1;
++m_processCount;
for (blockSize = 2; blockSize <= n; blockSize <<= 1) {
double delta = angle / (double)blockSize;
double sm2 = -sin(-2 * delta);
double sm1 = -sin(-delta);
double cm2 = cos(-2 * delta);
double cm1 = cos(-delta);
double w = 2 * cm1;
double ar[3], ai[3];
for (i = 0; i < n; i += blockSize) {
ar[2] = cm2;
ar[1] = cm1;
ai[2] = sm2;
ai[1] = sm1;
for (j = i, m = 0; m < blockEnd; j++, m++) {
ar[0] = w * ar[1] - ar[2];
ar[2] = ar[1];
ar[1] = ar[0];
ai[0] = w * ai[1] - ai[2];
ai[2] = ai[1];
ai[1] = ai[0];
k = j + blockEnd;
tr = ar[0] * ro[k] - ai[0] * io[k];
ti = ar[0] * io[k] + ai[0] * ro[k];
ro[k] = ro[j] - tr;
io[k] = io[j] - ti;
ro[j] += tr;
io[j] += ti;
}
}
blockEnd = blockSize;
}
if (inverse) {
double denom = (double)n;
for (i = 0; i < n; i++) {
ro[i] /= denom;
io[i] /= denom;
}
}
return m_plugin->process(m_freqbuf, timestamp);
}
#ifndef HAVE_FFTW3
#endif
}

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2007 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@ -270,18 +270,24 @@ PluginLoader::Impl::enumeratePlugins(PluginKey forPlugin)
(handle, "vampGetPluginDescriptor");
if (!fn) {
if (forPlugin != "") {
cerr << "Vamp::HostExt::PluginLoader: No vampGetPluginDescriptor function found in library \""
<< fullPath << "\"" << endl;
}
unloadLibrary(handle);
continue;
}
int index = 0;
const VampPluginDescriptor *descriptor = 0;
bool found = false;
while ((descriptor = fn(VAMP_API_VERSION, index))) {
++index;
if (identifier != "") {
if (descriptor->identifier != identifier) continue;
}
found = true;
PluginKey key = composePluginKey(*fi, descriptor->identifier);
// std::cerr << "enumerate: " << key << " (path: " << fullPath << ")" << std::endl;
if (m_pluginLibraryNameMap.find(key) ==
@ -289,6 +295,12 @@ PluginLoader::Impl::enumeratePlugins(PluginKey forPlugin)
m_pluginLibraryNameMap[key] = fullPath;
}
}
if (!found && forPlugin != "") {
cerr << "Vamp::HostExt::PluginLoader: Plugin \""
<< identifier << "\" not found in library \""
<< fullPath << "\"" << endl;
}
unloadLibrary(handle);
}
@ -365,7 +377,10 @@ PluginLoader::Impl::loadPlugin(PluginKey key,
}
string fullPath = getLibraryPathForPlugin(key);
if (fullPath == "") return 0;
if (fullPath == "") {
std::cerr << "Vamp::HostExt::PluginLoader: No library found in Vamp path for plugin \"" << key << "\"" << std::endl;
return 0;
}
void *handle = loadLibrary(fullPath);
if (!handle) return 0;
@ -375,6 +390,8 @@ PluginLoader::Impl::loadPlugin(PluginKey key,
(handle, "vampGetPluginDescriptor");
if (!fn) {
cerr << "Vamp::HostExt::PluginLoader: No vampGetPluginDescriptor function found in library \""
<< fullPath << "\"" << endl;
unloadLibrary(handle);
return 0;
}
@ -513,7 +530,21 @@ PluginLoader::Impl::loadLibrary(string path)
{
void *handle = 0;
#ifdef _WIN32
#ifdef UNICODE
int len = path.length() + 1; // cannot be more wchars than length in bytes of utf8 string
wchar_t *buffer = new wchar_t[len];
int rv = MultiByteToWideChar(CP_UTF8, 0, path.c_str(), len, buffer, len);
if (rv <= 0) {
cerr << "Vamp::HostExt::PluginLoader: Unable to convert library path \""
<< path << "\" to wide characters " << endl;
delete[] buffer;
return handle;
}
handle = LoadLibrary(buffer);
delete[] buffer;
#else
handle = LoadLibrary(path.c_str());
#endif
if (!handle) {
cerr << "Vamp::HostExt::PluginLoader: Unable to load library \""
<< path << "\"" << endl;
@ -564,8 +595,41 @@ PluginLoader::Impl::listFiles(string dir, string extension)
vector<string> files;
#ifdef _WIN32
string expression = dir + "\\*." + extension;
#ifdef UNICODE
int len = expression.length() + 1; // cannot be more wchars than length in bytes of utf8 string
wchar_t *buffer = new wchar_t[len];
int rv = MultiByteToWideChar(CP_UTF8, 0, expression.c_str(), len, buffer, len);
if (rv <= 0) {
cerr << "Vamp::HostExt::PluginLoader: Unable to convert wildcard path \""
<< expression << "\" to wide characters" << endl;
delete[] buffer;
return files;
}
WIN32_FIND_DATA data;
HANDLE fh = FindFirstFile(buffer, &data);
if (fh == INVALID_HANDLE_VALUE) {
delete[] buffer;
return files;
}
bool ok = true;
while (ok) {
wchar_t *fn = data.cFileName;
int wlen = wcslen(fn) + 1;
int maxlen = wlen * 6;
char *conv = new char[maxlen];
int rv = WideCharToMultiByte(CP_UTF8, 0, fn, wlen, conv, maxlen, 0, 0);
if (rv > 0) {
files.push_back(conv);
}
delete[] conv;
ok = FindNextFile(fh, &data);
}
FindClose(fh);
delete[] buffer;
#else
WIN32_FIND_DATA data;
HANDLE fh = FindFirstFile(expression.c_str(), &data);
if (fh == INVALID_HANDLE_VALUE) return files;
@ -577,7 +641,7 @@ PluginLoader::Impl::listFiles(string dir, string extension)
}
FindClose(fh);
#endif
#else
size_t extlen = extension.length();

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2008 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@ -58,6 +58,8 @@ public:
bool initialise(size_t channels, size_t stepSize, size_t blockSize);
void reset();
FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
FeatureSet getRemainingFeatures();
@ -167,6 +169,12 @@ PluginSummarisingAdapter::initialise(size_t channels,
m_impl->initialise(channels, stepSize, blockSize);
}
void
PluginSummarisingAdapter::reset()
{
m_impl->reset();
}
Plugin::FeatureSet
PluginSummarisingAdapter::process(const float *const *inputBuffers, RealTime timestamp)
{
@ -220,6 +228,19 @@ PluginSummarisingAdapter::Impl::initialise(size_t channels,
return true;
}
void
PluginSummarisingAdapter::Impl::reset()
{
m_accumulators.clear();
m_segmentedAccumulators.clear();
m_prevTimestamps.clear();
m_prevDurations.clear();
m_summaries.clear();
m_reduced = false;
m_endTime = RealTime();
m_plugin->reset();
}
Plugin::FeatureSet
PluginSummarisingAdapter::Impl::process(const float *const *inputBuffers,
RealTime timestamp)
@ -545,8 +566,6 @@ PluginSummarisingAdapter::Impl::accumulateFinalDurations()
if (acount == 0) continue;
RealTime prevTimestamp = i->second;
#ifdef DEBUG_PLUGIN_SUMMARISING_ADAPTER
std::cerr << "output " << output << ": ";
#endif
@ -611,8 +630,11 @@ void
PluginSummarisingAdapter::Impl::segment()
{
SegmentBoundaries::iterator boundaryitr = m_boundaries.begin();
RealTime segmentStart = RealTime::zeroTime;
#ifdef DEBUG_PLUGIN_SUMMARISING_ADAPTER_SEGMENT
std::cerr << "segment: starting" << std::endl;
#endif
for (OutputAccumulatorMap::iterator i = m_accumulators.begin();
i != m_accumulators.end(); ++i) {
@ -645,9 +667,24 @@ PluginSummarisingAdapter::Impl::segment()
RealTime segmentStart = RealTime::zeroTime;
RealTime segmentEnd = resultEnd - RealTime(1, 0);
RealTime prevSegmentStart = segmentStart - RealTime(1, 0);
while (segmentEnd < resultEnd) {
#ifdef DEBUG_PLUGIN_SUMMARISING_ADAPTER_SEGMENT
std::cerr << "segment end " << segmentEnd << " < result end "
<< resultEnd << " (with result start " << resultStart << ")" << std::endl;
#endif
findSegmentBounds(resultStart, segmentStart, segmentEnd);
if (segmentStart == prevSegmentStart) {
// This can happen when we reach the end of the
// input, if a feature's end time overruns the
// input audio end time
break;
}
prevSegmentStart = segmentStart;
RealTime chunkStart = resultStart;
if (chunkStart < segmentStart) chunkStart = segmentStart;

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2007 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

View File

@ -0,0 +1,167 @@
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
/*
Vamp
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2011 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the names of the Centre for
Digital Music; Queen Mary, University of London; and Chris Cannam
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in this Software without prior written
authorization.
*/
#ifndef _WINDOW_H_
#define _WINDOW_H_
#include <vamp-hostsdk/hostguard.h>
#include <cmath>
#include <cstdlib>
_VAMP_SDK_HOSTSPACE_BEGIN(Window.h)
template <typename T>
class Window
{
public:
enum WindowType {
RectangularWindow,
BartlettWindow,
HammingWindow,
HanningWindow,
BlackmanWindow,
NuttallWindow,
BlackmanHarrisWindow
};
/**
* Construct a windower of the given type.
*/
Window(WindowType type, size_t size) : m_type(type), m_size(size) { encache(); }
Window(const Window &w) : m_type(w.m_type), m_size(w.m_size) { encache(); }
Window &operator=(const Window &w) {
if (&w == this) return *this;
m_type = w.m_type;
m_size = w.m_size;
encache();
return *this;
}
virtual ~Window() { delete[] m_cache; }
void cut(T *src) const { cut(src, src); }
void cut(T *src, T *dst) const {
for (size_t i = 0; i < m_size; ++i) dst[i] = src[i] * m_cache[i];
}
template <typename T0>
void cut(T0 *src, T *dst) const {
for (size_t i = 0; i < m_size; ++i) dst[i] = src[i] * m_cache[i];
}
T getArea() { return m_area; }
T getValue(size_t i) { return m_cache[i]; }
WindowType getType() const { return m_type; }
size_t getSize() const { return m_size; }
protected:
WindowType m_type;
size_t m_size;
T *m_cache;
T m_area;
void encache();
void cosinewin(T *, T, T, T, T);
};
template <typename T>
void Window<T>::encache()
{
int n = int(m_size);
T *mult = new T[n];
int i;
for (i = 0; i < n; ++i) mult[i] = 1.0;
switch (m_type) {
case RectangularWindow:
for (i = 0; i < n; ++i) {
mult[i] *= 0.5;
}
break;
case BartlettWindow:
for (i = 0; i < n/2; ++i) {
mult[i] *= (i / T(n/2));
mult[i + n/2] *= (1.0 - (i / T(n/2)));
}
break;
case HammingWindow:
cosinewin(mult, 0.54, 0.46, 0.0, 0.0);
break;
case HanningWindow:
cosinewin(mult, 0.50, 0.50, 0.0, 0.0);
break;
case BlackmanWindow:
cosinewin(mult, 0.42, 0.50, 0.08, 0.0);
break;
case NuttallWindow:
cosinewin(mult, 0.3635819, 0.4891775, 0.1365995, 0.0106411);
break;
case BlackmanHarrisWindow:
cosinewin(mult, 0.35875, 0.48829, 0.14128, 0.01168);
break;
}
m_cache = mult;
m_area = 0;
for (int i = 0; i < n; ++i) {
m_area += m_cache[i];
}
m_area /= n;
}
template <typename T>
void Window<T>::cosinewin(T *mult, T a0, T a1, T a2, T a3)
{
int n = int(m_size);
for (int i = 0; i < n; ++i) {
mult[i] *= (a0
- a1 * cos((2 * M_PI * i) / n)
+ a2 * cos((4 * M_PI * i) / n)
- a3 * cos((6 * M_PI * i) / n));
}
}
_VAMP_SDK_HOSTSPACE_END(Window.h)
#endif

View File

@ -0,0 +1,11 @@
/* These stubs are provided so that autoconf can check library
* versions using C symbols only */
extern void libvamphostsdk_v_2_5_present(void) { }
extern void libvamphostsdk_v_2_4_present(void) { }
extern void libvamphostsdk_v_2_3_1_present(void) { }
extern void libvamphostsdk_v_2_3_present(void) { }
extern void libvamphostsdk_v_2_2_1_present(void) { }
extern void libvamphostsdk_v_2_2_present(void) { }
extern void libvamphostsdk_v_2_1_present(void) { }
extern void libvamphostsdk_v_2_0_present(void) { }

View File

@ -0,0 +1,75 @@
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
/*
Vamp
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2012 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the names of the Centre for
Digital Music; Queen Mary, University of London; and Chris Cannam
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in this Software without prior written
authorization.
*/
#include <vamp-sdk/FFT.h>
#include <cmath>
#if ( VAMP_SDK_MAJOR_VERSION != 2 || VAMP_SDK_MINOR_VERSION != 5 )
#error Unexpected version of Vamp SDK header included
#endif
#ifdef _MSC_VER
#include <stdlib.h>
#include <malloc.h>
#endif
_VAMP_SDK_PLUGSPACE_BEGIN(FFT.cpp)
namespace Vamp {
#include "FFTimpl.cpp"
void
FFT::forward(unsigned int n,
const double *ri, const double *ii,
double *ro, double *io)
{
fft(n, false, ri, ii, ro, io);
}
void
FFT::inverse(unsigned int n,
const double *ri, const double *ii,
double *ro, double *io)
{
fft(n, true, ri, ii, ro, io);
}
}
_VAMP_SDK_PLUGSPACE_END(FFT.cpp)

View File

@ -0,0 +1,116 @@
/* Public domain FFT implementation from Don Cross. */
static void
fft(unsigned int n, bool inverse,
const double *ri, const double *ii,
double *ro, double *io)
{
if (!ri || !ro || !io) return;
unsigned int bits;
unsigned int i, j, k, m;
unsigned int blockSize, blockEnd;
double tr, ti;
if (n < 2) return;
if (n & (n-1)) return;
double angle = 2.0 * M_PI;
if (inverse) angle = -angle;
for (i = 0; ; ++i) {
if (n & (1 << i)) {
bits = i;
break;
}
}
#ifdef _MSC_VER
int *table = (int *)_malloca(n * sizeof(int));
#else
int table[n];
#endif
for (i = 0; i < n; ++i) {
m = i;
for (j = k = 0; j < bits; ++j) {
k = (k << 1) | (m & 1);
m >>= 1;
}
table[i] = k;
}
if (ii) {
for (i = 0; i < n; ++i) {
ro[table[i]] = ri[i];
io[table[i]] = ii[i];
}
} else {
for (i = 0; i < n; ++i) {
ro[table[i]] = ri[i];
io[table[i]] = 0.0;
}
}
blockEnd = 1;
for (blockSize = 2; blockSize <= n; blockSize <<= 1) {
double delta = angle / (double)blockSize;
double sm2 = -sin(-2 * delta);
double sm1 = -sin(-delta);
double cm2 = cos(-2 * delta);
double cm1 = cos(-delta);
double w = 2 * cm1;
double ar[3], ai[3];
for (i = 0; i < n; i += blockSize) {
ar[2] = cm2;
ar[1] = cm1;
ai[2] = sm2;
ai[1] = sm1;
for (j = i, m = 0; m < blockEnd; j++, m++) {
ar[0] = w * ar[1] - ar[2];
ar[2] = ar[1];
ar[1] = ar[0];
ai[0] = w * ai[1] - ai[2];
ai[2] = ai[1];
ai[1] = ai[0];
k = j + blockEnd;
tr = ar[0] * ro[k] - ai[0] * io[k];
ti = ar[0] * io[k] + ai[0] * ro[k];
ro[k] = ro[j] - tr;
io[k] = io[j] - ti;
ro[j] += tr;
io[j] += ti;
}
}
blockEnd = blockSize;
}
if (inverse) {
double denom = (double)n;
for (i = 0; i < n; i++) {
ro[i] /= denom;
io[i] /= denom;
}
}
#ifdef _MSC_VER
_freea(table);
#endif
}

View File

@ -39,8 +39,8 @@
#include <cstring>
#include <cstdlib>
#if ( VAMP_SDK_MAJOR_VERSION != 2 || VAMP_SDK_MINOR_VERSION != 0 )
#error Incorrect Vamp SDK header included (not the expected 2.0 SDK)
#if ( VAMP_SDK_MAJOR_VERSION != 2 || VAMP_SDK_MINOR_VERSION != 5 )
#error Unexpected version of Vamp SDK header included
#endif
@ -168,6 +168,11 @@ PluginAdapterBase::Impl::getDescriptor()
if (m_populated) return &m_descriptor;
Plugin *plugin = m_base->createPlugin(48000);
if (!plugin) {
std::cerr << "PluginAdapterBase::Impl::getDescriptor: Failed to create plugin" << std::endl;
return 0;
}
if (plugin->getVampApiVersion() != VAMP_API_VERSION) {
std::cerr << "Vamp::PluginAdapterBase::Impl::getDescriptor: ERROR: "

View File

@ -0,0 +1,11 @@
/* These stubs are provided so that autoconf can check library
* versions using C symbols only */
extern void libvampsdk_v_2_5_present(void) { }
extern void libvampsdk_v_2_4_present(void) { }
extern void libvampsdk_v_2_3_1_present(void) { }
extern void libvampsdk_v_2_3_present(void) { }
extern void libvampsdk_v_2_2_1_present(void) { }
extern void libvampsdk_v_2_2_present(void) { }
extern void libvampsdk_v_2_1_present(void) { }
extern void libvampsdk_v_2_0_present(void) { }

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2007 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
This file by Mark Levy and Chris Cannam, Copyright 2007-2008 QMUL.
Permission is hereby granted, free of charge, to any person

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2007 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2007 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@ -54,13 +54,14 @@ namespace HostExt {
* it. This permits a host to use time- and frequency-domain plugins
* interchangeably without needing to handle the conversion itself.
*
* This adapter uses a basic Hanning windowed FFT that supports
* power-of-two block sizes only. If a frequency domain plugin
* requests a non-power-of-two blocksize, the adapter will adjust it
* to a nearby power of two instead. Thus, getPreferredBlockSize()
* will always return a power of two if the wrapped plugin is a
* frequency domain one. If the plugin doesn't accept the adjusted
* power of two block size, initialise() will fail.
* This adapter uses a basic windowed FFT (using Hann window by
* default) that supports power-of-two block sizes only. If a
* frequency domain plugin requests a non-power-of-two blocksize, the
* adapter will adjust it to a nearby power of two instead. Thus,
* getPreferredBlockSize() will always return a power of two if the
* wrapped plugin is a frequency domain one. If the plugin doesn't
* accept the adjusted power of two block size, initialise() will
* fail.
*
* The adapter provides no way for the host to discover whether the
* underlying plugin is actually a time or frequency domain plugin
@ -71,6 +72,10 @@ namespace HostExt {
* to be the fastest available: a host can usually do better if it
* cares enough.
*
* The window shape for the FFT frame can be set using setWindowType
* and the current shape retrieved using getWindowType. (This was
* added in v2.3 of the SDK.)
*
* In every respect other than its input domain handling, the
* PluginInputDomainAdapter behaves identically to the plugin that it
* wraps. The wrapped plugin will be deleted when the wrapper is
@ -91,6 +96,7 @@ public:
virtual ~PluginInputDomainAdapter();
bool initialise(size_t channels, size_t stepSize, size_t blockSize);
void reset();
InputDomain getInputDomain() const;
@ -99,6 +105,63 @@ public:
FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
/**
* ProcessTimestampMethod determines how the
* PluginInputDomainAdapter handles timestamps for the data passed
* to the process() function of the plugin it wraps, in the case
* where the plugin is expecting frequency-domain data.
*
* The Vamp specification requires that the timestamp passed to
* the plugin for frequency-domain input should be that of the
* centre of the processing block, rather than the start as is the
* case for time-domain input.
*
* Since PluginInputDomainAdapter aims to be transparent in use,
* it needs to handle this timestamp adjustment itself. However,
* some control is available over the method used for adjustment,
* by means of the ProcessTimestampMethod setting.
*
* If ProcessTimestampMethod is set to ShiftTimestamp (the
* default), then the data passed to the wrapped plugin will be
* calculated from the same input data block as passed to the
* wrapper, but the timestamp passed to the plugin will be
* advanced by half of the window size.
*
* If ProcessTimestampMethod is set to ShiftData, then the
* timestamp passed to the wrapped plugin will be the same as that
* passed to the process call of the wrapper, but the data block
* used to calculate the input will be shifted back (earlier) by
* half of the window size, with half a block of zero padding at
* the start of the first process call. This has the advantage of
* preserving the first half block of audio without any
* deterioration from window shaping.
*
* If ProcessTimestampMethod is set to NoShift, then no adjustment
* will be made and the timestamps will be incorrect.
*/
enum ProcessTimestampMethod {
ShiftTimestamp,
ShiftData,
NoShift
};
/**
* Set the method used for timestamp adjustment in plugins taking
* frequency-domain input. See the ProcessTimestampMethod
* documentation for details.
*
* This function must be called before the first call to
* process().
*/
void setProcessTimestampMethod(ProcessTimestampMethod);
/**
* Retrieve the method used for timestamp adjustment in plugins
* taking frequency-domain input. See the ProcessTimestampMethod
* documentation for details.
*/
ProcessTimestampMethod getProcessTimestampMethod() const;
/**
* Return the amount by which the timestamps supplied to process()
* are being incremented when they are passed to the plugin's own
@ -116,12 +179,49 @@ public:
* timestamps) the host may need to be aware that this adjustment
* is taking place.
*
* If the plugin requires time-domain input, this function will
* return zero. The result of calling this function before
* initialise() has been called is undefined.
* If the plugin requires time-domain input or the
* PluginInputDomainAdapter is configured with its
* ProcessTimestampMethod set to ShiftData instead of
* ShiftTimestamp, then this function will return zero.
*
* The result of calling this function before initialise() has
* been called is undefined.
*/
RealTime getTimestampAdjustment() const;
/**
* The set of supported window shapes.
*/
enum WindowType {
RectangularWindow = 0,
BartlettWindow = 1, /// synonym for RectangularWindow
TriangularWindow = 1, /// synonym for BartlettWindow
HammingWindow = 2,
HanningWindow = 3, /// synonym for HannWindow
HannWindow = 3, /// synonym for HanningWindow
BlackmanWindow = 4,
NuttallWindow = 7,
BlackmanHarrisWindow = 8
};
/**
* Return the current window shape. The default is HanningWindow.
*/
WindowType getWindowType() const;
/**
* Set the current window shape.
*/
void setWindowType(WindowType type);
protected:
class Impl;
Impl *m_impl;

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2007 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2008 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@ -96,6 +96,8 @@ public:
bool initialise(size_t channels, size_t stepSize, size_t blockSize);
void reset();
FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
FeatureSet getRemainingFeatures();
@ -154,7 +156,7 @@ public:
*/
enum AveragingMethod {
SampleAverage = 0,
ContinuousTimeAverage = 1,
ContinuousTimeAverage = 1
};
/**

View File

@ -6,7 +6,7 @@
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2007 Chris Cannam and QMUL.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

View File

@ -43,6 +43,10 @@
#define _VAMP_IN_HOSTSDK
#define VAMP_SDK_VERSION "2.5"
#define VAMP_SDK_MAJOR_VERSION 2
#define VAMP_SDK_MINOR_VERSION 5
#ifdef _VAMP_NO_HOST_NAMESPACE
#define _VAMP_SDK_HOSTSPACE_BEGIN(h)
#define _VAMP_SDK_HOSTSPACE_END(h)

View File

@ -0,0 +1,98 @@
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
/*
Vamp
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2012 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the names of the Centre for
Digital Music; Queen Mary, University of London; and Chris Cannam
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in this Software without prior written
authorization.
*/
#ifndef _VAMP_FFT_H_
#define _VAMP_FFT_H_
#include "plugguard.h"
_VAMP_SDK_PLUGSPACE_BEGIN(FFT.h)
namespace Vamp {
/**
* A simple FFT implementation provided for convenience of plugin
* authors.
*
* This class provides double-precision FFTs in power-of-two sizes
* only. It is slower than more sophisticated library
* implementations. If these requirements aren't suitable, make other
* arrangements.
*
* The inverse transform is scaled by 1/n.
*
* The implementation is from Don Cross's public domain FFT code.
*/
class FFT
{
public:
/**
* Calculate a forward transform of size n.
*
* ri and ii must point to the real and imaginary component arrays
* of the input. For real input, ii may be NULL.
*
* ro and io must point to enough space to receive the real and
* imaginary component arrays of the output.
*
* All input and output arrays are of size n.
*/
static void forward(unsigned int n,
const double *ri, const double *ii,
double *ro, double *io);
/**
* Calculate an inverse transform of size n.
*
* ri and ii must point to the real and imaginary component arrays
* of the input. For real input, ii may be NULL.
*
* ro and io must point to enough space to receive the real and
* imaginary component arrays of the output. The output is scaled
* by 1/n. The output pointers may not be NULL, even if the output
* is expected to be real.
*
* All input and output arrays are of size n.
*/
static void inverse(unsigned int n,
const double *ri, const double *ii,
double *ro, double *io);
};
}
_VAMP_SDK_PLUGSPACE_END(FFT.h)
#endif

View File

@ -152,12 +152,17 @@ public:
enum InputDomain { TimeDomain, FrequencyDomain };
/**
* Get the plugin's required input domain. If this is TimeDomain,
* the samples provided to the process() function (below) will be
* in the time domain, as for a traditional audio processing
* plugin. If this is FrequencyDomain, the host will carry out a
* windowed FFT of size equal to the negotiated block size on the
* data before passing the frequency bin data in to process().
* Get the plugin's required input domain.
*
* If this is TimeDomain, the samples provided to the process()
* function (below) will be in the time domain, as for a
* traditional audio processing plugin.
*
* If this is FrequencyDomain, the host will carry out a windowed
* FFT of size equal to the negotiated block size on the data
* before passing the frequency bin data in to process(). The
* input data for the FFT will be rotated so as to place the
* origin in the centre of the block.
* The plugin does not get to choose the window type -- the host
* will either let the user do so, or will use a Hanning window.
*/
@ -316,7 +321,7 @@ public:
OutputDescriptor() : // defaults for mandatory non-class-type members
hasFixedBinCount(false), hasKnownExtents(false), isQuantized(false),
sampleType(OneSamplePerStep), hasDuration(false) { }
sampleType(OneSamplePerStep), sampleRate(0), hasDuration(false) { }
};
typedef std::vector<OutputDescriptor> OutputList;

View File

@ -40,10 +40,6 @@
#include <string>
#include <vector>
#define VAMP_SDK_VERSION "2.0"
#define VAMP_SDK_MAJOR_VERSION 2
#define VAMP_SDK_MINOR_VERSION 0
#include "plugguard.h"
_VAMP_SDK_PLUGSPACE_BEGIN(PluginBase.h)

View File

@ -71,6 +71,10 @@
#define _VAMP_IN_PLUGINSDK 1
#define VAMP_SDK_VERSION "2.5"
#define VAMP_SDK_MAJOR_VERSION 2
#define VAMP_SDK_MINOR_VERSION 5
#ifdef _VAMP_NO_PLUGIN_NAMESPACE
#define _VAMP_SDK_PLUGSPACE_BEGIN(h)
#define _VAMP_SDK_PLUGSPACE_END(h)

View File

@ -40,6 +40,7 @@
#include "PluginBase.h"
#include "Plugin.h"
#include "RealTime.h"
#include "FFT.h"
#endif

View File

@ -1,624 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="libvamp"
ProjectGUID="{A61E2BF1-21AA-4118-B0D8-FD3D53DB892E}"
RootNamespace="libnyquist"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/O2"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=".;.."
PreprocessorDefinitions="NDEBUG;WIN32;_LIB"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\$(ConfigurationName)/libvamp.pch"
AssemblerListingLocation=".\$(ConfigurationName)/"
ObjectFile=".\$(ConfigurationName)/"
ProgramDataBaseFileName=".\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;.."
PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\$(ConfigurationName)/libvamp.pch"
AssemblerListingLocation=".\$(ConfigurationName)/"
ObjectFile=".\$(ConfigurationName)/"
ProgramDataBaseFileName=".\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
CompileAs="0"
DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Unicode_Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;.."
PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\$(ConfigurationName)/libvamp.pch"
AssemblerListingLocation=".\$(ConfigurationName)/"
ObjectFile=".\$(ConfigurationName)/"
ProgramDataBaseFileName=".\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
CompileAs="0"
DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Unicode_Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/O2"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=".;.."
PreprocessorDefinitions="NDEBUG;WIN32;_LIB"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\$(ConfigurationName)/libvamp.pch"
AssemblerListingLocation=".\$(ConfigurationName)/"
ObjectFile=".\$(ConfigurationName)/"
ProgramDataBaseFileName=".\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug DLL|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;.."
PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=".\$(ConfigurationName)/libvamp.pch"
AssemblerListingLocation=".\$(ConfigurationName)/"
ObjectFile=".\$(ConfigurationName)/"
ProgramDataBaseFileName=".\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
CompileAs="0"
DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug wx284|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;.."
PreprocessorDefinitions="_DEBUG;WIN32;_WIN32;_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=".\$(ConfigurationName)/libvamp.pch"
AssemblerListingLocation=".\$(ConfigurationName)/"
ObjectFile=".\$(ConfigurationName)/"
ProgramDataBaseFileName=".\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
CompileAs="0"
DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Modular_Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/O2"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=".;.."
PreprocessorDefinitions="NDEBUG;WIN32;_LIB"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\$(ConfigurationName)/libvamp.pch"
AssemblerListingLocation=".\$(ConfigurationName)/"
ObjectFile=".\$(ConfigurationName)/"
ProgramDataBaseFileName=".\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="src"
>
<File
RelativePath="..\vamp-sdk\Plugin.h"
>
</File>
<File
RelativePath="..\vamp-sdk\PluginAdapter.cpp"
>
</File>
<File
RelativePath="..\vamp-sdk\PluginAdapter.h"
>
</File>
<File
RelativePath="..\vamp-sdk\PluginBase.h"
>
</File>
<File
RelativePath="..\vamp-sdk\PluginHostAdapter.cpp"
>
</File>
<File
RelativePath="..\vamp-sdk\PluginHostAdapter.h"
>
</File>
<File
RelativePath="..\vamp-sdk\RealTime.cpp"
>
</File>
<File
RelativePath="..\vamp-sdk\RealTime.h"
>
</File>
</Filter>
<Filter
Name="src/hostext"
>
<File
RelativePath="..\vamp-sdk\hostext\PluginBufferingAdapter.cpp"
>
</File>
<File
RelativePath="..\vamp-sdk\hostext\PluginBufferingAdapter.h"
>
</File>
<File
RelativePath="..\vamp-sdk\hostext\PluginChannelAdapter.cpp"
>
</File>
<File
RelativePath="..\vamp-sdk\hostext\PluginChannelAdapter.h"
>
</File>
<File
RelativePath="..\vamp-sdk\hostext\PluginInputDomainAdapter.cpp"
>
</File>
<File
RelativePath="..\vamp-sdk\hostext\PluginInputDomainAdapter.h"
>
</File>
<File
RelativePath="..\vamp-sdk\hostext\PluginLoader.cpp"
>
</File>
<File
RelativePath="..\vamp-sdk\hostext\PluginLoader.h"
>
</File>
<File
RelativePath="..\vamp-sdk\hostext\PluginWrapper.cpp"
>
</File>
<File
RelativePath="..\vamp-sdk\hostext\PluginWrapper.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories="..\..\..\lib-src\libvamp"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;_USE_MATH_DEFINES"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
@ -106,7 +106,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\lib-src\libvamp"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;_USE_MATH_DEFINES"
StringPooling="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"

View File

@ -52,7 +52,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\..\lib-src\libvamp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@ -66,7 +66,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\lib-src\libvamp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;WIN32;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>