Mercurial > hg > pyin
annotate libmain.cpp @ 31:c0763eed48f0 tony
new plugin -- working towards local candidate PYIN
author | matthiasm |
---|---|
date | Thu, 23 Jan 2014 18:58:50 +0000 |
parents | 5945b8905d1f |
children | 8e50e88417e6 |
rev | line source |
---|---|
matthiasm@0 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@9 | 2 |
matthiasm@0 | 3 /* |
Chris@9 | 4 pYIN - A fundamental frequency estimator for monophonic audio |
Chris@9 | 5 Centre for Digital Music, Queen Mary, University of London. |
Chris@9 | 6 |
Chris@9 | 7 This program is free software; you can redistribute it and/or |
Chris@9 | 8 modify it under the terms of the GNU General Public License as |
Chris@9 | 9 published by the Free Software Foundation; either version 2 of the |
Chris@9 | 10 License, or (at your option) any later version. See the file |
Chris@9 | 11 COPYING included with this distribution for more information. |
matthiasm@0 | 12 */ |
matthiasm@0 | 13 |
matthiasm@0 | 14 #include <vamp/vamp.h> |
matthiasm@0 | 15 #include <vamp-sdk/PluginAdapter.h> |
matthiasm@0 | 16 |
matthiasm@0 | 17 #include "PYIN.h" |
matthiasm@0 | 18 #include "VampYin.h" |
matthiasm@31 | 19 #include "LocalCandidatePYIN.h" |
matthiasm@0 | 20 |
matthiasm@1 | 21 static Vamp::PluginAdapter<PYIN> pyinPluginAdapter; |
matthiasm@0 | 22 static Vamp::PluginAdapter<VampYin> vampyinPluginAdapter; |
matthiasm@31 | 23 static Vamp::PluginAdapter<LocalCandidatePYIN> localCandidatePYINPluginAdapter; |
matthiasm@0 | 24 |
matthiasm@0 | 25 const VampPluginDescriptor * |
matthiasm@0 | 26 vampGetPluginDescriptor(unsigned int version, unsigned int index) |
matthiasm@0 | 27 { |
matthiasm@0 | 28 if (version < 1) return 0; |
matthiasm@0 | 29 |
matthiasm@0 | 30 switch (index) { |
matthiasm@1 | 31 case 0: return pyinPluginAdapter.getDescriptor(); |
matthiasm@0 | 32 case 1: return vampyinPluginAdapter.getDescriptor(); |
matthiasm@31 | 33 case 2: return localCandidatePYINPluginAdapter.getDescriptor(); |
matthiasm@0 | 34 default: return 0; |
matthiasm@0 | 35 } |
matthiasm@0 | 36 } |
matthiasm@0 | 37 |
matthiasm@0 | 38 |