Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cannam

Pages: 1 ... 6 7 [8] 9 10 ... 19
106
Plugin Development / Re: About debugging a plug-in
« on: December 14, 2010, 18:13:51 »

Hello again.

Some of this, including perhaps the bit about output descriptors, is either explicitly documented or at least "implied" by the Vamp plugins programmers' guide (http://vamp-plugins.org/guide.pdf) in the section "What can depend on a parameter?"  But this doesn't cover most of your questions.

First, you're right that the default parameter values need to be set twice -- or else you need a separate variable for the default value, which you assign the parameter variable from.  This is something of a deficiency in the specification, as it makes hosts easier to write but plugins harder, which is the wrong way around.

For memory checks, I would certainly use valgrind, assuming you are on a platform on which it is supported.  Just stick the valgrind command at the start of your vamp-plugin-tester command line ("valgrind vamp-plugin-tester [options...]")  The default behaviour of valgrind, with no fancy options, will show you most of what you need to know, though it's also worth trying the --leak-check=full option to valgrind to find memory leaks for you.

As for plugin lifecycle, Sonic Visualiser generally calls the constructor and destructor quite often -- for example when scanning plugins on startup it will construct each, query its outputs (but _not_ call initialise: the idea is that construction should be cheap and initialise should do the real work) and then destroy the plugin again.  SV will also generally destroy and recreate at times when you might expect reset() to be used, as in your example with multiple layers -- the plugin will be destroyed there rather than simply reset.  In fact I have a suspicion that SV never calls reset() at all, although some hosts will.  Your plugin will need to behave the same in either situation.


Chris

107
Plugin Development / Re: Licensing a Vamp plug-in
« on: December 14, 2010, 18:02:04 »
Hello!

The entire Vamp SDK, including the skeleton code, is under a very liberal BSD-style license.  You may use it in any project commercial or free, open-source or closed.

I think you're right about FFTW -- if you want to use it in closed-source software (even if it's free) you would need to approach MIT for a commercial license.


Chris

108
Hm, interesting.

Can you try out this build, please? --

http://sonicvisualiser.org/pre/sonic-visualiser-win32-test-20101025.zip


Chris

109
Getting and Using Vamp Plugins / Re: install MATCH plugin
« on: November 19, 2010, 18:37:55 »
Yes, from the description it sounds as if this is simply the wrong file -- perhaps the Vamp SDK or another source code package rather than the MATCH plugin for Windows package.


Chris

110
Plugin Development / Re: Visualisation plug-in development
« on: November 19, 2010, 18:35:53 »
Quote
Now another trickier problem: do you think it could be possible to compile a DLL for windows, knowing that I use ATLAS and FFTW within my program? I checked a bit Cygwin and MingW, without much success so far... I saw in the plug-in skeleton Makefile some instructions to use mingw, but that did not help much.

Cygwin is an environment for running Unixy programs on Windows -- it's not relevant for building Windows native binaries.

MinGW is probably what you want.  It provides the basic set of GNU compiler tools, with Windows as its native target.  You can either use it on Windows, or install on something like Linux and cross-compile -- look to the mingw32 packages in Ubuntu for example.  The results are the same either way, for a given version of MinGW.

The instructions in the skeleton Makefile are, I believe, the actual commands needed to build a simple plugin using the MinGW32 packages in Ubuntu.  Of course, you'll first need to build the Vamp SDK itself -- you can find a Makefile.mingw in the build/ directory.  The same goes for any other dependencies, generally you'll need to build them afresh for MinGW.


Chris

111
Plugin Development / Re: Get the length of audio file
« on: November 19, 2010, 14:31:56 »
Hello there.

You can't get the length of the audio file ahead of processing it -- apart from anything else, the host does not necessarily know it (it could be reading from a stream, though most existing hosts use files).

You therefore need to take option (b), and work out the length of the file yourself by counting the frames that are passed to process() calls.


Chris

112
Plugin Development / Re: Visualisation plug-in development
« on: November 15, 2010, 16:33:35 »
Hello!  I'm sorry to take so long to reply, it's been a busy few weeks.

I'm afraid that, at the moment there is no way to do either of the things you request, at least not when SV is the host.  A possibility for the second one (clipping the colour range) might be to have thresholds provided as parameters to the plugin, though I can understand that you might not be keen to clutter up the plugin's own interface and the user might not know in advance what values to use.  A general colour-range editing function would be a very handy addition to SV, in fact...

With regard to compiling for distribution, I think the problem is that you can't build a dynamic object completely statically.  What you can do is enable static linking for the libraries that are not part of the standard runtime.  Something like:

Code: [Select]
g++ -o f0salience.so f0Salience.o plugins.o -Wl,-Bstatic -Wl,-soname=f0salience.so /usr/lib//libvamp-sdk.a \
  --version-script=vamp-plugin.map -llapack -lcblas -latlas -lfftw3 -Wl,-Bdynamic -lm

which switches static linkage on at the start of the library list and off again before the end of the library list and the (implicit) standard C and C++ runtimes.  That means your plugin will still link dynamically against libstdc++, but that is probably OK in practice.


Chris

113
Sorry to take so long to reply to this.

Is it possible that you could send me a copy of the .sv file?  (To cannam at all-day-breakfast.com)  I may well be able to discover what's wrong with it.

Also -- which version of SV are you using?

Thanks.


Chris

114
Plugin Development / Vamp plugin SDK v2.2 now available
« on: August 26, 2010, 11:49:22 »
Vamp SDK version 2.2 is now available

Version 2.2 of the Vamp plugin SDK is now available.

   http://www.vamp-plugins.org/

Vamp is a plugin API for audio analysis and feature extraction plugins written in C or C++.  Its SDK features an easy-to-use set of C++ classes for plugin and host developers, a reference host implementation, example plugins, and documentation.  It is supported across Linux, OS/X, Windows, and Solaris/x86.

A documentation guide to writing plugins using the Vamp SDK can be found at http://www.vamp-plugins.org/guide.pdf.

Version 2.2 is a maintenance release which simply updates the build procedure for OS/X so as to build three-way universal binaries (PPC, i386, x86_64) by default.  The code is unchanged from version 2.1.

Credits

This work was carried out at the Centre for Digital Music, Queen Mary, University of London.  It was funded by the EPSRC through the OMRAS2 project EP/E017614/1.  See http://omras2.org/ for more information.


Chris

115
Host Forum: Sonic Visualiser / Re: files ".sv"
« on: August 25, 2010, 20:58:51 »
I'm not sure what exactly you are asking here -- of course ".sv" files are Sonic Visualiser session files.  You must be asking about a specific file or set of files -- where exactly have you found these?

There may be temporary files stored under an ".sv1" directory in your local home directory... but it doesn't sound like this what you are asking about?


Chris

116
Sorry to have taken so long to reply to this -- this is the sort of question that makes me really want to go back and review the behaviour of the program carefully, and take a look at the source code, and I'm afraid I haven't had time during the last month to do any of that having been somewhat swamped with other things.

In a 1024-point spectrogram with zero overlap, you should find that column N that is aligned with samples N*1024 to (N+1)*1024-1 in the audio waveform contains the data calculated from samples N*1024 and (N+1)*1024.

With overlap, the intention is to centre the displayed column on the centre sample of the source frame.  That is, given a 1024-point spectrogram with 50% overlap, the column N aligned with samples N*512 to (N+1)*512-1 should contain the data calculated from samples (N*512)-256 to (N+1)*512+255.


Chris

117

The problem here is that starting with 10.6, the default compiler mode in OS/X is now to produce 64-bit rather than 32-bit binaries.

All of the publicly distributed Vamp plugins and hosts (at least the ones that we know about and refer to on the Vamp plugins website) are 32-bit only.  But when you compile your own host and your own plugins on 10.6 using the default compiler flags, the results are 64-bit.  Although OS/X 10.5 and 10.6 will happily run either 32- or 64-bit binaries, you can't load a 64-bit plugin into a 32-bit host or vice versa.  Consequently the publicly available plugins will not work in your host and the publicly available hosts will not load your plugin.

The short-term fix is to compile your host in 32-bit mode, and if you are compiling plugins also, to do so either in 32-bit mode or as 32- and 64-bit universal binaries (or even 32-bit and 64-bit Intel plus 32-bit PPC).

To do this, use the flags "-arch i386" when compiling and linking a host; and either "-arch i386", "-arch i386 -arch x86_64", or "-arch i386 -arch x86_64 -arch ppc" when compiling and linking a plugin.

(The long-term solution is for us first to ensure that all plugins being distributed are compiled as 32- and 64-bit universal binaries, and then to do the same for the hosts.  But until the plugins all support 64-bit architectures,
the hosts must remain 32-bit only because otherwise OS/X will run them in 64-bit mode and they'll be unable to load 32-bit plugins.)

This change caught us somewhat by surprise (stupidly perhaps) and although work is now under way to improve the way the default SDK handles and documents this situation, this work is not quite done yet.  I'm sorry about all the inconvenience.


Chris

118
Getting and Using Vamp Plugins / Re: plugins Vamp
« on: July 21, 2010, 10:15:41 »

Vamp plugins need to be installed in a specific location -- you can't just add them to wherever you installed Sonic Visualiser.

The install location depends on what operating system you are using.  You can find details at the bottom of the Vamp plugins download page at http://vamp-plugins.org/download.html .


Chris

119
Host Forum: Sonic Visualiser / Re: Linux build of 1.7.2 ?
« on: June 07, 2010, 16:13:23 »
Sorry to take so long about this -- I've been a bit swamped with a number of other things, one of which is an effort to make this sort of package update simpler!  But that isn't in place yet... I'll try to get packages built and put up tomorrow.


Chris

120
Plugin Development / Re: Parameters and Inputs
« on: May 17, 2010, 12:01:09 »
No, I'm afraid there is no support for this at all in Vamp as it currently stands.

One possible workaround for some situations may be for the plugin to scan a location in which configuration files are to be stored (e.g. a special directory) and then offer the configuration files found in there as named programs using the getPrograms/getCurrentProgram/selectProgram mechanism in PluginBase.


Chris

Pages: 1 ... 6 7 [8] 9 10 ... 19