Author Topic: VamPy: Vamp plugins in Python  (Read 14423 times)

cannam

  • Administrator
  • Sr. Member
  • *****
  • Posts: 273
    • View Profile
VamPy: Vamp plugins in Python
« on: October 28, 2009, 15:07:07 »
VamPy, a Python wrapper for the Vamp plugin API, is now available.

Using VamPy you can write audio analysis or visualisation plugins for use in Vamp hosts with a quick and dynamic environment that is somewhat like working in Matlab or other high-level modelling environments.  VamPy has full two-way support for NumPy, an efficient numerical library for Python, and for the dynamic typing of Python.

You can download VamPy from :
http://www.vamp-plugins.org/vampy.html
« Last Edit: November 08, 2009, 22:25:32 by cannam »

endolith

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: VamPy: Vamp plugins in Python
« Reply #1 on: May 16, 2012, 16:30:27 »
So this isn't compatible with Python 2.7?

How would I view Python error messages on a Windows system?  Running Sonic Visualiser from the command line doesn't print anything.
« Last Edit: May 16, 2012, 16:32:55 by endolith »

endolith

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: VamPy: Vamp plugins in Python
« Reply #2 on: May 24, 2012, 03:21:44 »
Ok, I used sonic annotator instead and it gives a bunch of errors

Code: [Select]
'import site' failed; use -v for traceback
Numpy build information: ABI level: 16777225 Numpy version: 1.3
Vampy was compiled with Numpy support but Numpy does not seem to be installed.

Code: [Select]
Traceback (most recent call last):
  File "C:\Program Files (x86)\Vamp Plugins\PySpectralFeatures.py", line 17, in <module>
    from numpy import *
ImportError: No module named numpy
Warning: Syntax error in VamPy plugin:  PySpectralFeatures. Avoiding plugin.

etc.  Is there a way to steer this to my C:\Python27 folder, or is it just not compatible with 2.7?  Will there be a version that's compatible soon?

endolith

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: VamPy: Vamp plugins in Python
« Reply #3 on: May 24, 2012, 14:36:55 »
Even with python26 installed, it doesn't work.

Code: [Select]
---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Runtime Error!

Program: C:\Users\...

R6034

An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.


---------------------------
OK  
---------------------------

Even with nothing in the plugins folder except vampy.dll, it still pops up a long list of errors if I do "sonic-annotator -l":

Code: [Select]
ERROR: error importing source: PySpectralFeatures
Traceback (most recent call last):
  File "C:\Program Files (x86)\Vamp Plugins\PySpectralFeatures.py", line 17, in <module>
    from numpy import *
  File "C:\Python26\Lib\site-packages\numpy\__init__.py", line 137, in <module>
    import add_newdocs
  File "C:\Python26\Lib\site-packages\numpy\add_newdocs.py", line 9, in <module>
    from numpy.lib import add_newdoc
  File "C:\Python26\Lib\site-packages\numpy\lib\__init__.py", line 4, in <module>
    from type_check import *
  File "C:\Python26\Lib\site-packages\numpy\lib\type_check.py", line 8, in <module>
    import numpy.core.numeric as _nx
  File "C:\Python26\Lib\site-packages\numpy\core\__init__.py", line 5, in <module>
    import multiarray
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
Warning: Syntax error in VamPy plugin:  PySpectralFeatures. Avoiding plugin.

Is there any way to get this working?  Does anyone even use this?  The forum looks abandoned.
« Last Edit: May 24, 2012, 14:38:57 by endolith »

cannam

  • Administrator
  • Sr. Member
  • *****
  • Posts: 273
    • View Profile
Re: VamPy: Vamp plugins in Python
« Reply #4 on: July 11, 2012, 12:00:57 »
Hi there --

The forum is not abandoned exactly, but it is certainly a bit... sleepy.

It's become quite hard to maintain because most of the monitoring work goes into eliminating spam registrations (there is a ratio of at least 100 to 1 of spam to non-spam registration attempts). This also means new registrants can take a long time to be approved, contributing to the general lack of liveliness -- I suspect quite a few people have registered but forgotten what they were going to ask by the time their registrations were approved.

In this case, also, I am not sure whether the main VamPy developer reads the forum -- I will forward these questions.


Chris

fazekasgy

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: VamPy: Vamp plugins in Python
« Reply #5 on: July 11, 2012, 15:15:27 »
Sorry, I don't actively read the forum, thanks for Chris for reminding me.

From both traces it seems you have a problem with importing numpy itself. Sorry for the trivial question, but did you try to import numpy and do something with it from the python command prompt?

Maybe you have multiple python versions installed, and vampy recognises one for which you don't have numpy installed properly. You can try to make Vampy load Python from a particular location (see ENVIRONMENT VARIABLES section in the readme file). I'm not sure however if this is needed (or indeed works) on Windows.

Let me know how you're getting on.