Author Topic: Mean of a feature  (Read 5818 times)

sandoval31

  • Newbie
  • *
  • Posts: 3
    • View Profile
Mean of a feature
« on: April 15, 2011, 08:37:45 »
Hello
 :D

I'd like to implement some process above the extraction of a feature.
For example the mean (or the minimum) of the feature on a window larger than the window used to process the calculation.
Is it possible ?
I saw somewhere that plugin chaining is not possible  :'(
Is there an another do process this ?

Thanks a lot
 ;)

cannam

  • Administrator
  • Sr. Member
  • *****
  • Posts: 273
    • View Profile
Re: Mean of a feature
« Reply #1 on: April 15, 2011, 09:15:54 »
Well, it's obviously possible in code to take some features and calculate their mean!  So I suppose your question is either about doing this within a plugin, or about whether any hosts have this feature already.

Plugin chaining is not something that's supported in the Vamp API, although you could write a Vamp plugin that was also a Vamp host and that loaded its own plugins.   The Vamp API won't go out of its way to help you if you try to do this but I don't think it will stand in your way.

At the host level, you could also look at the batch host Sonic Annotator (http://omras2.org/SonicAnnotator) which includes various averaging/summarising options.


Chris

sandoval31

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Mean of a feature
« Reply #2 on: April 15, 2011, 11:00:59 »
Hi Chris

Thanks for your answer. Actually I've already build all the chain (feature extraction + mean + segmentation with a threshold) in another language, and I use Sonic Vizualiser to watch the results ( that I export in .txt).
I came to Wamp plugin only to have one step less. (feature extraction + segmentation+ visualisation directly in sonic vizualiser)
I've just miss the mean step !

Sonic Annotator seems interesting for other points, but for my need it seems if I use it, that I would have to process several step (in command lines) before to view my feature in sonic visualizer.
What do you think ?

About your other proposition :
"Plugin chaining is not something that's supported in the Vamp API, although you could write a Vamp plugin that was also a Vamp host and that loaded its own plugins.   The Vamp API won't go out of its way to help you if you try to do this but I don't think it will stand in your way."

I don't realy understand your second sentence. ??? What do you mean ? (that's the topic :P). Is it possible (and relatively easy, as I'm not a c++ crack) to do it in a host plugin ?

Thanks
« Last Edit: April 15, 2011, 11:03:47 by sandoval31 »

sandoval31

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Mean of a feature
« Reply #3 on: April 18, 2011, 13:43:18 »
no answer ? :-[

cannam

  • Administrator
  • Sr. Member
  • *****
  • Posts: 273
    • View Profile
Re: Mean of a feature
« Reply #4 on: April 26, 2011, 16:15:36 »
"Plugin chaining is not something that's supported in the Vamp API, although you could write a Vamp plugin that was also a Vamp host and that loaded its own plugins.   The Vamp API won't go out of its way to help you if you try to do this but I don't think it will stand in your way."

I don't realy understand your second sentence. ??? What do you mean ? (that's the topic :P). Is it possible (and relatively easy, as I'm not a c++ crack) to do it in a host plugin ?

Sorry to take a while to come back to you on this (I've been on holiday).

All I meant was that the Vamp SDK does not contain any facility that is intended to support the development of plugins that are also hosts -- you would essentially have to write a Vamp host for yourself, using the Vamp Host SDK, within your plugin.

It should be possible to use the Vamp Host SDK from within a plugin, there certainly has never been any intention to prevent this from working.  But I don't know of any existing plugin that does it, and I don't have any example code to offer.

Essentially you would probably want to take the example host code from something like vamp-simple-host in the SDK distribution, and add a plugin load scan into your plugin at the constructor or initialise phase, storing a pointer to your loaded plugin within the "wrapper" plugin, and then delete it in the destructor.

I suspect there may be details that would get fiddly enough to make this a job for the more experienced C++ developer, but I'm not certain (I haven't tried it myself either).  I would in principle be interested in trying this myself, but time is too limited for me to be able to offer to do so.


Chris