Chris@161: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@161: Chris@161: /* Chris@161: Silvet Chris@161: Chris@161: A Vamp plugin for note transcription. Chris@161: Centre for Digital Music, Queen Mary University of London. Chris@161: Chris@161: This program is free software; you can redistribute it and/or Chris@161: modify it under the terms of the GNU General Public License as Chris@161: published by the Free Software Foundation; either version 2 of the Chris@161: License, or (at your option) any later version. See the file Chris@161: COPYING included with this distribution for more information. Chris@161: */ Chris@161: Chris@161: #include Chris@161: #include Chris@161: Chris@161: #ifndef SILVET_INSTRUMENTS_H Chris@161: #define SILVET_INSTRUMENTS_H Chris@161: Chris@161: /** Chris@161: * Define an instrument pack, i.e. a group of templates that are made Chris@161: * available as a single preset at the user interface level. A pack Chris@161: * might contain only a single instrument template (e.g. bassoon), or Chris@161: * it may be a compound of several templates (e.g. different piano Chris@161: * recordings forming a single piano pack), or it may be a group of Chris@161: * distinct instrument templates (e.g. a pack containing all supported Chris@161: * instruments, or potentially groupings such as string quartet or Chris@161: * rock band). Chris@161: */ Chris@161: class InstrumentPack Chris@161: { Chris@161: public: Chris@161: static const int templateNoteCount; Chris@161: static const int templateHeight; Chris@161: static const int templateMaxShift; Chris@161: static const int templateSize; Chris@161: Chris@161: int lowestNote; Chris@161: int highestNote; Chris@183: Chris@183: int maxPolyphony; // realistic practical limit, not a theoretical one Chris@183: float pitchSparsity; Chris@213: float sourceSparsity; Chris@183: float levelThreshold; Chris@183: Chris@161: std::string name; Chris@161: Chris@161: struct Templates { Chris@161: int lowestNote; Chris@161: int highestNote; Chris@161: // templateNoteCount * templateSize Chris@161: std::vector > data; Chris@161: }; Chris@161: Chris@161: std::vector templates; Chris@161: Chris@161: static std::vector listInstrumentPacks(); Chris@161: Chris@161: private: Chris@161: InstrumentPack(int lowest, int highest, std::string n, Chris@161: std::vector tt) : Chris@161: lowestNote(lowest), Chris@161: highestNote(highest), Chris@183: maxPolyphony(5), Chris@183: pitchSparsity(1.1), Chris@213: sourceSparsity(1.2), Chris@183: levelThreshold(5), Chris@161: name(n), Chris@161: templates(tt) { } Chris@161: }; Chris@161: Chris@161: #endif