Crack this Glitch Open Again

Blowing the dust of the Infinite Glitch codebase again. It’s been a long time and I’ve been spending most of the programming time in php, javascript, jQuery, Sass-land.

Back to lovely Python again and it seems last time I was developing this Codebase it was with Docker as opposed to VirtualEnv.

Hmmm. Basic Docker commands.

Running docker ps -a shows the installed containers and what they were last up to.

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                    PORTS               NAMES
91f43bb6d0ce        a217e6f4fe58        "/bin/sh -c 'apt-get "   11 weeks ago        Exited (0) 11 weeks ago                       mad_kalam
814e544e9952        362f93ba627c        "/bin/sh -c 'apt-get "   11 weeks ago        Exited (0) 11 weeks ago                       agitated_meninsky
3592821d3b22        362f93ba627c        "/bin/sh -c 'update &"   11 weeks ago        Exited (0) 11 weeks ago                       serene_gates
f327b50f5d4f        80bb585d9218        "/bin/sh -c 'pip inst"   11 weeks ago        Exited (0) 11 weeks ago                       focused_meninsky
707f0af272b0        training/webapp     "/bin/bash"              11 weeks ago        Exited (0) 11 weeks ago                       loving_jang
95ddbdbf0347        training/webapp     "python app.py"          11 weeks ago        Exited (0) 11 weeks ago                       adoring_euclid

Let’s look at the size of these containers or more specifically their underlying images…

docker images -a
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
<none>              <none>              a217e6f4fe58        11 weeks ago        125.1 MB
<none>              <none>              7266057497e3        11 weeks ago        125.1 MB
<none>              <none>              322355eb5316        11 weeks ago        125.1 MB
<none>              <none>              ac3bd01cd24e        11 weeks ago        125.1 MB
<none>              <none>              db820ad00128        11 weeks ago        125.1 MB
<none>              <none>              669f6d4078b2        11 weeks ago        125.1 MB
<none>              <none>              80bb585d9218        11 weeks ago        134.9 MB
<none>              <none>              362f93ba627c        11 weeks ago        125.1 MB
postgres            latest              6f86882e145d        3 months ago        265.9 MB
debian              latest              031143c1c662        3 months ago        125.1 MB
training/webapp     latest              6fae60ef3446        18 months ago       348.8 MB

I think I need a refresh on how these docker containers work. Right. The Dockerfile. And here’s a Dockerfile in the Glitch project directory. I bet I created all those images trying to build from my Dockerfile while developing it.

Can remove images like:

docker rmi 707f0af272b0

And even get protected from removing images that a container depends on:

Error response from daemon: conflict: unable to delete 6fae60ef3446 (must be forced) - image is being used by stopped container 707f0af272b0

I think we can also say goodbye to some of these containers:

docker rm 95ddbdbf0347
95ddbdbf0347

Now there’s one container left and two images which are exactly the same size, the first of which is the one my container is using:

docker rmi a217e6f4fe58
Error response from daemon: conflict: unable to delete a217e6f4fe58 (must be forced) - image is being used by stopped container 91f43bb6d0ce
mikekilmer@jamaaladeen-2:~/Docker/Glitch/appension$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
<none>              <none>              a217e6f4fe58        11 weeks ago        125.1 MB
debian              latest              031143c1c662        3 months ago        125.1 MB

Looks like the container was in the middle of an apt-get command:

docker start <ID>
docker attach <ID>
Get:79 http://httpredir.debian.org/debian/ jessie/main exim4 all 4.84.2-2+deb8u1 [8544 B]
Get:80 http://httpredir.debian.org/debian/ jessie/main file amd64 1:5.22+15-2+deb8u2 [60.4 kB]
# abbreviated
Processing triggers for systemd (215-17+deb8u4) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
Processing triggers for ca-certificates (20141019+deb8u1) ...
Updating certificates in /etc/ssl/certs... 174 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....done.
Processing triggers for python-support (1.0.15) ...

OK. I’m not sure how much of the following Dockerfile actually worked, but may just do the rest manually.

FROM debian:latest

MAINTAINER Mike iLL <mike@mzoo.org>

USER root

RUN apt-get update && apt-get install -y \
  adduser \
    debianutils \
    fortune-mod \
    fortunes-min \
    lame \
    python-pip \
    python-numpy \ 
    python-scipy \ 
    python-matplotlib \
    ipython \
    ipython-notebook \
    python-pandas \
    python-sympy \
    python-nose \
    vim \
    wget 

RUN wget https://code.soundsoftware.ac.uk/attachments/download/1602/qm-vamp-plugins-linux64-v1.7.1.tar.bz2 \
 && tar xvjf qm-vamp-plugins-linux64-v1.7.1.tar.bz2

CMD cd qm-vamp-plugins-linux64-v1.7.1 && \
    mkdir /usr/lib/vamp && \
    cp qm-* /usr/lib/vamp && \
    cp qm-* /usr/lib/vamp/ && \ 
        cd ../

RUN wget http://code.soundsoftware.ac.uk/attachments/download/670/vampy-2.0-amd64-linux.tar.bz2 \
 && tar xvjf vampy-2.0-amd64-linux.tar.bz2

CMD cd vampy-2.0-amd64-linux

CMD echo "Maybe that worked."


Copy qm-vamp-plugins.so, qm-vamp-plugins.cat and
               qm-vamp-plugins.n3 to $HOME/vamp/ or /usr/local/lib/vamp/
               or /usr/lib/vamp/

Most of installing the pip-installed requirements worked (pip install -r requirements.txt).
The remix library requires, numpy, though:

Collecting remix (from -r requirements.txt (line 29))
  Downloading remix-2.4.0.tar.gz (38.3MB)
    100% |████████████████████████████████| 38.3MB 27kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/xw/kyk5pnw55xg2k8z5bbc4p_g40000gn/T/pip-build-MtANpy/remix/setup.py", line 20, in <module>
        import numpy
    ImportError: No module named numpy

So

pip install numpy
Collecting numpy
  Using cached numpy-1.11.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: numpy
Successfully installed numpy-1.11.2
pip install -r requirements.txt

Pip wants to be upgraded. pip install --upgrade pip.

And getting a permission issue so think I need to run the pip install command as a Super User.

sudo pip install -r requirements.txt

OK. Now we can finally run the original version of the script without getting any complaints!

$ sudo python -m fore.server
2016-12-03 17:59:26,957:INFO:__main__:Starting fore...
2016-12-03 17:59:26,958:INFO:__main__:Initializing read queue to hold 20.00 seconds of audio.
2016-12-03 17:59:27,002:INFO:fore.info:Info generator waiting on first frame...
2016-12-03 17:59:27,011:INFO:__main__:Running as UID/GID 501/20 501/20
2016-12-03 17:59:28,147:INFO:fore.mixer:Using 'ffmpeg' for audio conversion.
2016-12-03 17:59:28,280:INFO:fore.mixer:Waiting for a new track.
2016-12-03 17:59:28,349:INFO:fore.database:Rendering Track(51, u'51 Track10.mp3', u'The Know-It-All Boyfriends', u'The Devil Glitch', 217.756734693878, 1, u"A physicist is an atom's way of knowing about atoms.  -- George Wald\nAs we let our own light shine, we give others permission to do the same.\n", u'', 0, 0.0, 0.0)
2016-12-03 17:59:28,350:INFO:fore.database:Automatically picking track 51.
2016-12-03 17:59:28,351:INFO:fore.mixer:Grabbing stream [51]...
2016-12-03 17:59:28,368:INFO:fore.mixer:Audio Stream Init

Running on port 8888 so url is http://localhost:8888/.

Infinite Glitch Demo Site

So we’re replacing the (significantly abandoned — thank you Spotify) Echonest API with Vamp and it’s Pythonic sister Vampy.

Next step is to install the Vamp plugins and get a test working.

The Dockerfile has some commands that are supposed to install Vamp and Vampy:

wget https://code.soundsoftware.ac.uk/attachments/download/1602/qm-vamp-plugins-linux64-v1.7.1.tar.bz2 \
 && tar xvjf qm-vamp-plugins-linux64-v1.7.1.tar.bz2

CMD cd qm-vamp-plugins-linux64-v1.7.1 && \
    mkdir /usr/lib/vamp && \
    cp qm-* /usr/lib/vamp && \
    cp qm-* /usr/lib/vamp/ && \ 
        cd ../

RUN wget http://code.soundsoftware.ac.uk/attachments/download/670/vampy-2.0-amd64-linux.tar.bz2 \
 && tar xvjf vampy-2.0-amd64-linux.tar.bz2

CMD cd vampy-2.0-amd64-linux

But it doesn’t look like they ever ran and since it doesn’t really matter if we have a complete Dockerfile I’m just going to do it manually.

The Vampy readme refers to a “Vamp plugin host application (eg Sonic Visualizer)”. Huh? OK.

wget https://code.soundsoftware.ac.uk/attachments/download/1708/sonic-visualiser_2.5cc1-2_amd64.deb

Wait! I’ve been running all of these commands on the local machine! Let’s rename the container to something more meaningful:

docker rename mad_kalam glitchy

And apparently I want to use docker’s exec command to do things on the server.

docker start glitchy
docker exec -it glitchy sh

Now let’s install Sonic Visualizer for Debian Jessie.

Wait — again — Docker container keeps stopping. Because docker containers stop unless there’s a process running. So you need to run the container in daemon mode if you want it to keep running.

They’re recommending you just run some arbitrary command and route the output to /dev/null in order to keep the container running:

docker run -d a217e6f4fe58 tail -f /dev/null
docker ps
CONTAINER ID        IMAGE               COMMAND               CREATED             STATUS              PORTS               NAMES
954819e63dd6        a217e6f4fe58        "tail -f /dev/null"   11 seconds ago      Up 10 seconds                           tender_meitner

WTF is tender_meitner? Now we’ve got glitchy not running and some other container running.

docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS               NAMES
954819e63dd6        a217e6f4fe58        "tail -f /dev/null"      3 minutes ago       Up 3 minutes                                   tender_meitner
91f43bb6d0ce        a217e6f4fe58        "/bin/sh -c 'apt-get "   11 weeks ago        Exited (0) 6 minutes ago                       glitchy

OK. Back to the drawing board for a minute. ‘Cause at this point I’m considering bypassing docker altogether as the final python code should be the same for OSX as well as Debian and I’ve been Yak Shaving for over 3 hours already. What is this damn docker file doing?

Start by cleaning it up a bit:

FROM debian:latest

MAINTAINER Mike iLL <mike@mzoo.org>

USER root

RUN apt-get update && apt-get install -y \
  adduser \
    debianutils \
    fortune-mod \
    fortunes-min \
    lame \
    python-pip \
    python-numpy \ 
    python-scipy \ 
    python-matplotlib \
    ipython \
    ipython-notebook \
    python-pandas \
    python-sympy \
    python-nose \
    sudo \
    vim \
    wget \
    sonic-visualiser

RUN wget https://code.soundsoftware.ac.uk/attachments/download/1602/qm-vamp-plugins-linux64-v1.7.1.tar.bz2 \
 && tar xvjf qm-vamp-plugins-linux64-v1.7.1.tar.bz2

CMD cd qm-vamp-plugins-linux64-v1.7.1 && \
    mkdir /usr/lib/vamp && \
    cp qm-* /usr/lib/vamp && \
        cd ../

RUN wget http://code.soundsoftware.ac.uk/attachments/download/670/vampy-2.0-amd64-linux.tar.bz2 \
 && tar xvjf vampy-2.0-amd64-linux.tar.bz2

CMD cd vampy-2.0-amd64-linux

CMD echo "Maybe that worked."

CMD cp -r Example\ VamPy\ plugins/ /usr/lib/vamp

# Copy qm-vamp-plugins.so, qm-vamp-plugins.cat and
#               qm-vamp-plugins.n3 to $HOME/vamp/ or /usr/local/lib/vamp/
#               or /usr/lib/vamp/
docker build -t glitch .

This is taking forever. It seems like it’s installing everything apt-get has ever heard of. Tex-Live??? Isn’t that huge?

Grabbed some other Dockerfile code to also install and run postgres 9.2 as well as cloning the git repository and shit. While this runs I’m going to start developing right on the OSX system.

FROM fike/debian:jessie.en_US
# https://github.com/fike/dockerfiles/blob/master/postgres/9.2/Dockerfile
MAINTAINER Mike iLL <mike@mzoo.org>

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update -qq &&       apt-get upgrade -y

RUN apt-get install --no-install-recommends wget -y

RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main 9.2" > /etc/apt/sources.list.d/pgdg.list

RUN gpg --keyserver keys.gnupg.net --recv-keys ACCC4CF8

RUN gpg --export --armor ACCC4CF8|apt-key add -

RUN apt-get update -qq &&       apt-get upgrade -y

RUN apt-get install --no-install-recommends -y \ 
      postgresql-9.2       postgresql-client-9.2 

RUN apt-get clean &&       apt-get autoremove --purge -y &&       rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

USER root

RUN apt-get update && apt-get install -y \
  adduser \
    debianutils \
    fortune-mod \
    fortunes-min \
    git \ 
    lame \
    python-pip \
    python-numpy \ 
    python-scipy \ 
    python-matplotlib \
    ipython \
    ipython-notebook \
    python-pandas \
    python-sympy \
    python-nose \
    sudo \
    vim \
    wget \
    sonic-visualiser

# Make ssh dir
RUN mkdir /root/.ssh/

# Copy over private key, and set permissions
ADD id_rsa /root/.ssh/id_rsa

# Create known_hosts
RUN touch /root/.ssh/known_hosts
# Add bitbuckets key
RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts

RUN wget https://code.soundsoftware.ac.uk/attachments/download/1602/qm-vamp-plugins-linux64-v1.7.1.tar.bz2 \
 && tar xvjf qm-vamp-plugins-linux64-v1.7.1.tar.bz2

CMD cd qm-vamp-plugins-linux64-v1.7.1 && \
    mkdir /usr/lib/vamp && \
    cp qm-* /usr/lib/vamp && \
        cd ../

RUN wget http://code.soundsoftware.ac.uk/attachments/download/670/vampy-2.0-amd64-linux.tar.bz2 \
 && tar xvjf vampy-2.0-amd64-linux.tar.bz2

CMD cd vampy-2.0-amd64-linux

CMD echo "Maybe that worked."

CMD cp -r Example\ VamPy\ plugins/ /usr/lib/vamp

# Clone the repo into the docker container
RUN git clone git@github.com:MikeiLL/appension.git

# Enter the repo directory
CMD cd appension

# Install requirements with pip
RUN pip install -r requirements.txt

# Copy qm-vamp-plugins.so, qm-vamp-plugins.cat and
#               qm-vamp-plugins.n3 to $HOME/vamp/ or /usr/local/lib/vamp/
#               or /usr/lib/vamp/

RUN /etc/init.d/postgresql start &&       su postgres -c "psql --command \"ALTER USER postgres with password 'foobar';\" "

RUN echo "host all  all    0.0.0.0/0  md5" >> /etc/postgresql/9.2/main/pg_hba.conf

RUN echo "listen_addresses='*'" >> /etc/postgresql/9.2/main/postgresql.conf

EXPOSE 5432

VOLUME  ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]

CMD ["/usr/lib/postgresql/9.2/bin/postgres", "-D", "/var/lib/postgresql/9.2/main", "-c", "config_file=/etc/postgresql/9.2/main/postgresql.conf"]

# Run the server
python -m fore.server

Apt is stalling out in the container. At any rate. Made some headway with Vamp.

Some instructions.

Download VAMP for OSX and installed it in the /Library/Audio/Plug-Ins (on OS X).
Download Vampy it’s files and the Example Plugins into /Library/Audio/Plug-Ins/Vamp
Download sonic-annotator and put the binary somewhere in the PATH (echo $PATH displays choices)
In the CMD run sonic-annotator -l and see the plugins.

Or not.

$ sonic-annotator -l
isPluginLibraryLoadable: Failed to find plugin descriptor function "vampGetPluginDescriptor" in library "/Library/Audio/Plug-Ins/Vamp/libvamp-hostsdk.dylib": dlsym(0x7ff153e09230, vampGetPluginDescriptor): symbol not found
isPluginLibraryLoadable: Failed to find plugin descriptor function "vampGetPluginDescriptor" in library "/Library/Audio/Plug-Ins/Vamp/libvamp-sdk.dylib": dlsym(0x7ff153e09230, vampGetPluginDescriptor): symbol not found

Added the Vamp plugins location to the $PATH and ran vamp-simple-host -l which returns

dyld: Library not loaded: /usr/local/lib/libsndfile.1.dylib
  Referenced from: /Library/Audio/Plug-Ins/Vamp/vamp-simple-host
  Reason: image not found
Trace/BPT trap: 5

Reinstall libsndfile? brew install libsndfile.

Now I can successfully run vamp-simple-host -l. Damn that’s a lot of output:

Vamp plugin search path: [/Users/mikekilmer/Library/Audio/Plug-Ins/Vamp][/Library/Audio/Plug-Ins/Vamp]

Vamp plugin libraries found in search path:
Creating extension manager.
# isPythonInitialized: 0
# haveScannedPlugins: 0
Short version: 2.7
Python exec prefix: /usr/local/bin/../Cellar/python/2.7.11/bin/../Frameworks/Python.framework/Versions/2.7
Preloaded Python from /usr/local/bin/../Cellar/python/2.7.11/bin/../Frameworks/Python.framework/Versions/2.7/Python
Numpy build information: ABI level: 16777225 Numpy version: 1.1
Numpy runtime version: 1.11
Vampy: extension module initialised.
# isPythonInitialized after initialize: 1
Scanning Vampy Plugins
Found 4 Scripts.
Found 4 Classes.
PyPluginAdapter:ctor:0: /Library/Audio/Plug-Ins/Vamp/PyMFCC.py:PyMFCC
PyPluginAdapter:ctor:1: /Library/Audio/Plug-Ins/Vamp/PySpectralCentroid.py:PySpectralCentroid
PyPluginAdapter:ctor:2: /Library/Audio/Plug-Ins/Vamp/PySpectralFeatures.py:PySpectralFeatures
PyPluginAdapter:ctor:3: /Library/Audio/Plug-Ins/Vamp/PyZeroCrossing.py:PyZeroCrossing
Initialising extension module.
Vampy: extension module initialised.
Vampy: Extension namespaces updated.
Accessing adapter index: 0 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PyMFCC.py:PyMFCC
Debug messages ON for Vampy plugin: PyMFCC
[Vampy::call] PyMFCC::getParameterDescriptors 
[Vampy::call] PyMFCC::getIdentifier 
[Vampy::call] PyMFCC::getName 
[Vampy::call] PyMFCC::getDescription 
[Vampy::call] PyMFCC::getMaker 
[Vampy::call] PyMFCC::getPluginVersion 
Method [PyMFCC::getPluginVersion] is not implemented. Returning default value.
[Vampy::call] PyMFCC::getCopyright 
[Vampy::call] PyMFCC::getInputDomain 
PyPlugin::PyPlugin:PyMFCC instance 0 deleted.
# isPythonInitialized: 1
# haveScannedPlugins: 1
Accessing adapter index: 1 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PySpectralCentroid.py:PySpectralCentroid
Debug messages OFF for Vampy plugin: PySpectralCentroid
PyPlugin::PyPlugin:PySpectralCentroid instance 0 deleted.
# isPythonInitialized: 1
# haveScannedPlugins: 1
Accessing adapter index: 2 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PySpectralFeatures.py:PySpectralFeatures
Debug messages ON for Vampy plugin: PySpectralFeatures
[Vampy::call] PySpectralFeatures::getParameterDescriptors 
[Vampy::call] PySpectralFeatures::getIdentifier 
[Vampy::call] PySpectralFeatures::getName 
[Vampy::call] PySpectralFeatures::getDescription 
[Vampy::call] PySpectralFeatures::getMaker 
[Vampy::call] PySpectralFeatures::getPluginVersion 
Method [PySpectralFeatures::getPluginVersion] is not implemented. Returning default value.
[Vampy::call] PySpectralFeatures::getCopyright 
Method [PySpectralFeatures::getCopyright] is not implemented. Returning default value.
[Vampy::call] PySpectralFeatures::getInputDomain 
PyPlugin::PyPlugin:PySpectralFeatures instance 0 deleted.
# isPythonInitialized: 1
# haveScannedPlugins: 1
Accessing adapter index: 3 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PyZeroCrossing.py:PyZeroCrossing
Debug messages OFF for Vampy plugin: PyZeroCrossing
PyPlugin::PyPlugin:PyZeroCrossing instance 0 deleted.
# isPythonInitialized: 1
# haveScannedPlugins: 1
Accessing adapter index: 4 (adapters: 4)
Cleaning locals...
Cleaning module...
Vampy::PyExtensionManager::cleanModule: Size of module dict = 28
Vampy::PyExtensionManager::cleanModule: Size of module dict (cleaned) = 1
Vampy::~PyExtensionManager: Extension module cleaned.

  /Library/Audio/Plug-Ins/Vamp/nnls-chroma.dylib:
    [A] [v2] Chordino, "chordino" [Matthias Mauch]
       > Notes
        - Chordino provides a simple chord transcription based on NNLS Chroma (as in the NNLS Chroma plugin). Chord profiles given by the user in the file chord.dict are used to calculate frame-wise chord similarities. A simple (non-state-of-the-art!) algorithm smoothes these to provide a chord transcription using a standard HMM/Viterbi approach.
         (0) Chord Estimate, "simplechord"
             - Estimated chord times and labels.
         (1) Note Representation of Chord Estimate, "chordnotes"
             - A simple representation of the estimated chord with bass note (if applicable) and chord notes.
         (2) Harmonic Change Value, "harmonicchange"
             - An indication of the likelihood of harmonic change. Depends on the chord dictionary. Calculation is different depending on whether the Viterbi algorithm is used for chord estimation, or the simple chord estimate.
         (3) Log-Likelihood of Chord Estimate, "loglikelihood"
             - Logarithm of the likelihood value of the simple chord estimate.
    [B] [v2] NNLS Chroma, "nnls-chroma" [Matthias Mauch]
       > Visualisation
        - This plugin provides a number of features derived from a DFT-based log-frequency amplitude spectrum: some variants of the log-frequency spectrum, including a semitone spectrum derived from approximate transcription using the NNLS algorithm; and based on this semitone spectrum, different chroma features.
         (0) Log-Frequency Spectrum, "logfreqspec"
             - A Log-Frequency Spectrum (constant Q) that is obtained by cosine filter mapping.
         (1) Tuned Log-Frequency Spectrum, "tunedlogfreqspec"
             - A Log-Frequency Spectrum (constant Q) that is obtained by cosine filter mapping, then its tuned using the estimated tuning frequency.
         (2) Semitone Spectrum, "semitonespectrum"
             - A semitone-spaced log-frequency spectrum derived from the third-of-a-semitone-spaced tuned log-frequency spectrum.
         (3) Chromagram, "chroma"
             - Tuning-adjusted chromagram from NNLS approximate transcription, with an emphasis on the medium note range.
         (4) Bass Chromagram, "basschroma"
             - Tuning-adjusted bass chromagram from NNLS approximate transcription, with an emphasis on the bass note range.
         (5) Chromagram and Bass Chromagram, "bothchroma"
             - Tuning-adjusted chromagram and bass chromagram (stacked on top of each other) from NNLS approximate transcription.
    [C] [v2] Tuning, "tuning" [Matthias Mauch]
       > Key and Tonality
        - The tuning plugin can estimate the local and global tuning of piece. The same tuning method is used for the NNLS Chroma and Chordino plugins.
         (0) Tuning, "tuning"
             - Returns a single label (at time 0 seconds) containing an estimate of the concert pitch in Hz.
         (1) Local Tuning, "localtuning"
             - Returns a tuning estimate at every analysis frame, an average of the (recent) previous frame-wise estimates of the concert pitch in Hz.

  /Library/Audio/Plug-Ins/Vamp/vampy.dylib:
Creating extension manager.
# isPythonInitialized: 1
# haveScannedPlugins: 0
Scanning Vampy Plugins
Found 4 Scripts.
Found 4 Classes.
PyPluginAdapter:ctor:0: /Library/Audio/Plug-Ins/Vamp/PyMFCC.py:PyMFCC
PyPluginAdapter:ctor:1: /Library/Audio/Plug-Ins/Vamp/PySpectralCentroid.py:PySpectralCentroid
PyPluginAdapter:ctor:2: /Library/Audio/Plug-Ins/Vamp/PySpectralFeatures.py:PySpectralFeatures
PyPluginAdapter:ctor:3: /Library/Audio/Plug-Ins/Vamp/PyZeroCrossing.py:PyZeroCrossing
Initialising extension module.
Vampy: extension module initialised.
Vampy: Extension namespaces updated.
Numpy build information: ABI level: 16777225 Numpy version: 1.1
Numpy runtime version: 1.11
Accessing adapter index: 0 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PyMFCC.py:PyMFCC
Debug messages ON for Vampy plugin: PyMFCC
[Vampy::call] PyMFCC::getParameterDescriptors 
[Vampy::call] PyMFCC::getIdentifier 
[Vampy::call] PyMFCC::getName 
[Vampy::call] PyMFCC::getDescription 
[Vampy::call] PyMFCC::getMaker 
[Vampy::call] PyMFCC::getPluginVersion 
Method [PyMFCC::getPluginVersion] is not implemented. Returning default value.
[Vampy::call] PyMFCC::getCopyright 
[Vampy::call] PyMFCC::getInputDomain 
PyPlugin::PyPlugin:PyMFCC instance 0 deleted.
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PyMFCC.py:PyMFCC
Debug messages ON for Vampy plugin: PyMFCC
    [A] [v2] Vampy MFCC Plugin, "vampy-mfcc" [Vampy Example Plugins]
        - A simple MFCC plugin
[Vampy::call] PyMFCC::getOutputDescriptors 
         (0) MFCCs, "mfccs"
             - MFCC Coefficients
         (1) Mel Scaled Spectrum, "warped-fft"
             - Mel Scaled Magnitide Spectrum
         (2) Mel Filter Matrix, "mel-filter-matrix"
             - Returns the created filter matrix in getRemainingFeatures.
PyPlugin::PyPlugin:PyMFCC instance 0 deleted.
Cleaning locals...
Cleaning module...
Vampy::PyExtensionManager::cleanModule: Size of module dict = 26
Vampy::PyExtensionManager::cleanModule: Size of module dict (cleaned) = 1
Vampy::~PyExtensionManager: Extension module cleaned.
Creating extension manager.
# isPythonInitialized: 1
# haveScannedPlugins: 0
Scanning Vampy Plugins
Found 4 Scripts.
Found 4 Classes.
PyPluginAdapter:ctor:0: /Library/Audio/Plug-Ins/Vamp/PyMFCC.py:PyMFCC
PyPluginAdapter:ctor:1: /Library/Audio/Plug-Ins/Vamp/PySpectralCentroid.py:PySpectralCentroid
PyPluginAdapter:ctor:2: /Library/Audio/Plug-Ins/Vamp/PySpectralFeatures.py:PySpectralFeatures
PyPluginAdapter:ctor:3: /Library/Audio/Plug-Ins/Vamp/PyZeroCrossing.py:PyZeroCrossing
Initialising extension module.
Vampy: extension module initialised.
Vampy: Extension namespaces updated.
Numpy build information: ABI level: 16777225 Numpy version: 1.1
Numpy runtime version: 1.11
Accessing adapter index: 0 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PyMFCC.py:PyMFCC
Debug messages ON for Vampy plugin: PyMFCC
[Vampy::call] PyMFCC::getParameterDescriptors 
[Vampy::call] PyMFCC::getIdentifier 
[Vampy::call] PyMFCC::getName 
[Vampy::call] PyMFCC::getDescription 
[Vampy::call] PyMFCC::getMaker 
[Vampy::call] PyMFCC::getPluginVersion 
Method [PyMFCC::getPluginVersion] is not implemented. Returning default value.
[Vampy::call] PyMFCC::getCopyright 
[Vampy::call] PyMFCC::getInputDomain 
PyPlugin::PyPlugin:PyMFCC instance 0 deleted.
# isPythonInitialized: 1
# haveScannedPlugins: 1
Accessing adapter index: 1 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PySpectralCentroid.py:PySpectralCentroid
Debug messages OFF for Vampy plugin: PySpectralCentroid
PyPlugin::PyPlugin:PySpectralCentroid instance 0 deleted.
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PySpectralCentroid.py:PySpectralCentroid
Debug messages OFF for Vampy plugin: PySpectralCentroid
    [B] [v2] Spectral Centroid (using legacy process interface), "vampy-sc3" [Vampy Example Plugins]
        - Not given. (Hint: Implement getDescription method.)
PyPlugin::PyPlugin:PySpectralCentroid instance 0 deleted.
Cleaning locals...
Cleaning module...
Vampy::PyExtensionManager::cleanModule: Size of module dict = 26
Vampy::PyExtensionManager::cleanModule: Size of module dict (cleaned) = 1
Vampy::~PyExtensionManager: Extension module cleaned.
Creating extension manager.
# isPythonInitialized: 1
# haveScannedPlugins: 0
Scanning Vampy Plugins
Found 4 Scripts.
Found 4 Classes.
PyPluginAdapter:ctor:0: /Library/Audio/Plug-Ins/Vamp/PyMFCC.py:PyMFCC
PyPluginAdapter:ctor:1: /Library/Audio/Plug-Ins/Vamp/PySpectralCentroid.py:PySpectralCentroid
PyPluginAdapter:ctor:2: /Library/Audio/Plug-Ins/Vamp/PySpectralFeatures.py:PySpectralFeatures
PyPluginAdapter:ctor:3: /Library/Audio/Plug-Ins/Vamp/PyZeroCrossing.py:PyZeroCrossing
Initialising extension module.
Vampy: extension module initialised.
Vampy: Extension namespaces updated.
Numpy build information: ABI level: 16777225 Numpy version: 1.1
Numpy runtime version: 1.11
Accessing adapter index: 0 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PyMFCC.py:PyMFCC
Debug messages ON for Vampy plugin: PyMFCC
[Vampy::call] PyMFCC::getParameterDescriptors 
[Vampy::call] PyMFCC::getIdentifier 
[Vampy::call] PyMFCC::getName 
[Vampy::call] PyMFCC::getDescription 
[Vampy::call] PyMFCC::getMaker 
[Vampy::call] PyMFCC::getPluginVersion 
Method [PyMFCC::getPluginVersion] is not implemented. Returning default value.
[Vampy::call] PyMFCC::getCopyright 
[Vampy::call] PyMFCC::getInputDomain 
PyPlugin::PyPlugin:PyMFCC instance 0 deleted.
# isPythonInitialized: 1
# haveScannedPlugins: 1
Accessing adapter index: 1 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PySpectralCentroid.py:PySpectralCentroid
Debug messages OFF for Vampy plugin: PySpectralCentroid
PyPlugin::PyPlugin:PySpectralCentroid instance 0 deleted.
# isPythonInitialized: 1
# haveScannedPlugins: 1
Accessing adapter index: 2 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PySpectralFeatures.py:PySpectralFeatures
Debug messages ON for Vampy plugin: PySpectralFeatures
[Vampy::call] PySpectralFeatures::getParameterDescriptors 
[Vampy::call] PySpectralFeatures::getIdentifier 
[Vampy::call] PySpectralFeatures::getName 
[Vampy::call] PySpectralFeatures::getDescription 
[Vampy::call] PySpectralFeatures::getMaker 
[Vampy::call] PySpectralFeatures::getPluginVersion 
Method [PySpectralFeatures::getPluginVersion] is not implemented. Returning default value.
[Vampy::call] PySpectralFeatures::getCopyright 
Method [PySpectralFeatures::getCopyright] is not implemented. Returning default value.
[Vampy::call] PySpectralFeatures::getInputDomain 
PyPlugin::PyPlugin:PySpectralFeatures instance 0 deleted.
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PySpectralFeatures.py:PySpectralFeatures
Debug messages ON for Vampy plugin: PySpectralFeatures
    [C] [v2] Vampy Spectral Features, "vampy-sf3" [Vampy Example Plugins]
        - A collection of low-level spectral descriptors.
[Vampy::call] PySpectralFeatures::getOutputDescriptors 
         (0) Spectral Centroid, "vampy-sc"
             - Spectral Centroid (Brightness)
         (1) Spectral Crest Factor, "vampy-scf"
             - Spectral Crest (Tonality)
         (2) Band Width, "vampy-bw"
             - Spectral Band Width
         (3) Spectral Difference, "vampy-sd"
             - Eucledian distance of successive magnitude spectra.
PyPlugin::PyPlugin:PySpectralFeatures instance 0 deleted.
Cleaning locals...
Cleaning module...
Vampy::PyExtensionManager::cleanModule: Size of module dict = 26
Vampy::PyExtensionManager::cleanModule: Size of module dict (cleaned) = 1
Vampy::~PyExtensionManager: Extension module cleaned.
Creating extension manager.
# isPythonInitialized: 1
# haveScannedPlugins: 0
Scanning Vampy Plugins
Found 4 Scripts.
Found 4 Classes.
PyPluginAdapter:ctor:0: /Library/Audio/Plug-Ins/Vamp/PyMFCC.py:PyMFCC
PyPluginAdapter:ctor:1: /Library/Audio/Plug-Ins/Vamp/PySpectralCentroid.py:PySpectralCentroid
PyPluginAdapter:ctor:2: /Library/Audio/Plug-Ins/Vamp/PySpectralFeatures.py:PySpectralFeatures
PyPluginAdapter:ctor:3: /Library/Audio/Plug-Ins/Vamp/PyZeroCrossing.py:PyZeroCrossing
Initialising extension module.
Vampy: extension module initialised.
Vampy: Extension namespaces updated.
Numpy build information: ABI level: 16777225 Numpy version: 1.1
Numpy runtime version: 1.11
Accessing adapter index: 0 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PyMFCC.py:PyMFCC
Debug messages ON for Vampy plugin: PyMFCC
[Vampy::call] PyMFCC::getParameterDescriptors 
[Vampy::call] PyMFCC::getIdentifier 
[Vampy::call] PyMFCC::getName 
[Vampy::call] PyMFCC::getDescription 
[Vampy::call] PyMFCC::getMaker 
[Vampy::call] PyMFCC::getPluginVersion 
Method [PyMFCC::getPluginVersion] is not implemented. Returning default value.
[Vampy::call] PyMFCC::getCopyright 
[Vampy::call] PyMFCC::getInputDomain 
PyPlugin::PyPlugin:PyMFCC instance 0 deleted.
# isPythonInitialized: 1
# haveScannedPlugins: 1
Accessing adapter index: 1 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PySpectralCentroid.py:PySpectralCentroid
Debug messages OFF for Vampy plugin: PySpectralCentroid
PyPlugin::PyPlugin:PySpectralCentroid instance 0 deleted.
# isPythonInitialized: 1
# haveScannedPlugins: 1
Accessing adapter index: 2 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PySpectralFeatures.py:PySpectralFeatures
Debug messages ON for Vampy plugin: PySpectralFeatures
[Vampy::call] PySpectralFeatures::getParameterDescriptors 
[Vampy::call] PySpectralFeatures::getIdentifier 
[Vampy::call] PySpectralFeatures::getName 
[Vampy::call] PySpectralFeatures::getDescription 
[Vampy::call] PySpectralFeatures::getMaker 
[Vampy::call] PySpectralFeatures::getPluginVersion 
Method [PySpectralFeatures::getPluginVersion] is not implemented. Returning default value.
[Vampy::call] PySpectralFeatures::getCopyright 
Method [PySpectralFeatures::getCopyright] is not implemented. Returning default value.
[Vampy::call] PySpectralFeatures::getInputDomain 
PyPlugin::PyPlugin:PySpectralFeatures instance 0 deleted.
# isPythonInitialized: 1
# haveScannedPlugins: 1
Accessing adapter index: 3 (adapters: 4)
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PyZeroCrossing.py:PyZeroCrossing
Debug messages OFF for Vampy plugin: PyZeroCrossing
PyPlugin::PyPlugin:PyZeroCrossing instance 0 deleted.
Creating instance 0 of /Library/Audio/Plug-Ins/Vamp/PyZeroCrossing.py:PyZeroCrossing
Debug messages OFF for Vampy plugin: PyZeroCrossing
    [D] [v2] Vampy Zero Crossings, "vampy-zc2" [Vampy Example Plugins]
        - Not given. (Hint: Implement getDescription method.)
         (0) Number of Zero Crossings, "vampy-counts"
             - Number of zero crossings per audio frame
         (1) Zero Crossing Locations, "vampy-crossings"
             - The locations of zero crossing points
PyPlugin::PyPlugin:PyZeroCrossing instance 0 deleted.
Cleaning locals...
Cleaning module...
Vampy::PyExtensionManager::cleanModule: Size of module dict = 26
Vampy::PyExtensionManager::cleanModule: Size of module dict (cleaned) = 1
Vampy::~PyExtensionManager: Extension module cleaned.

Looks like it scans the local system for all Vamp plugins and does some reporting on each. Cool. Specifically

    -- List the plugin libraries and Vamp plugins in the library search path
       in a verbose human-readable format.

Looking at the result of just running the library name:

vamp-simple-host: A command-line host for Vamp audio analysis plugins.

Installed another Vamp plugin (BeatRoot) and it doesn’t return an error and am thinking the errors on sonic-annotator -l are because I don’t have the Vamp SDK installed. So am going to install it. It’s possible that just removing the two files that reference it would suffice, I’m also NOT seeing any of the Vampy plugins listed so maybe the SDK is necessary for Vampy to work.

Nope. Download the Vamp Plugin Tester.

Made some progress and hit a wall documented here on SO.

But maybe we don’t need to make a plugin. Maybe one already exists that does what we want. Aubio!

Leave a Reply

Your email address will not be published. Required fields are marked *