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@298: int templateNoteCount; Chris@298: int templateHeight; Chris@298: int templateMaxShift; Chris@298: 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@298: std::vector tt); Chris@298: Chris@298: friend class LiveAdapter; Chris@161: }; Chris@161: Chris@161: #endif