Chris@161
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@161
|
2
|
Chris@161
|
3 /*
|
Chris@161
|
4 Silvet
|
Chris@161
|
5
|
Chris@161
|
6 A Vamp plugin for note transcription.
|
Chris@161
|
7 Centre for Digital Music, Queen Mary University of London.
|
Chris@161
|
8
|
Chris@161
|
9 This program is free software; you can redistribute it and/or
|
Chris@161
|
10 modify it under the terms of the GNU General Public License as
|
Chris@161
|
11 published by the Free Software Foundation; either version 2 of the
|
Chris@161
|
12 License, or (at your option) any later version. See the file
|
Chris@161
|
13 COPYING included with this distribution for more information.
|
Chris@161
|
14 */
|
Chris@161
|
15
|
Chris@161
|
16 #include <vector>
|
Chris@161
|
17 #include <string>
|
Chris@161
|
18
|
Chris@161
|
19 #ifndef SILVET_INSTRUMENTS_H
|
Chris@161
|
20 #define SILVET_INSTRUMENTS_H
|
Chris@161
|
21
|
Chris@161
|
22 /**
|
Chris@161
|
23 * Define an instrument pack, i.e. a group of templates that are made
|
Chris@161
|
24 * available as a single preset at the user interface level. A pack
|
Chris@161
|
25 * might contain only a single instrument template (e.g. bassoon), or
|
Chris@161
|
26 * it may be a compound of several templates (e.g. different piano
|
Chris@161
|
27 * recordings forming a single piano pack), or it may be a group of
|
Chris@161
|
28 * distinct instrument templates (e.g. a pack containing all supported
|
Chris@161
|
29 * instruments, or potentially groupings such as string quartet or
|
Chris@161
|
30 * rock band).
|
Chris@161
|
31 */
|
Chris@161
|
32 class InstrumentPack
|
Chris@161
|
33 {
|
Chris@161
|
34 public:
|
Chris@298
|
35 int templateNoteCount;
|
Chris@298
|
36 int templateHeight;
|
Chris@298
|
37 int templateMaxShift;
|
Chris@298
|
38 int templateSize;
|
Chris@161
|
39
|
Chris@161
|
40 int lowestNote;
|
Chris@161
|
41 int highestNote;
|
Chris@183
|
42
|
Chris@183
|
43 int maxPolyphony; // realistic practical limit, not a theoretical one
|
Chris@183
|
44 float pitchSparsity;
|
Chris@213
|
45 float sourceSparsity;
|
Chris@183
|
46 float levelThreshold;
|
Chris@183
|
47
|
Chris@161
|
48 std::string name;
|
Chris@161
|
49
|
Chris@161
|
50 struct Templates {
|
Chris@161
|
51 int lowestNote;
|
Chris@161
|
52 int highestNote;
|
Chris@161
|
53 // templateNoteCount * templateSize
|
Chris@161
|
54 std::vector<std::vector<float> > data;
|
Chris@161
|
55 };
|
Chris@161
|
56
|
Chris@161
|
57 std::vector<Templates> templates;
|
Chris@161
|
58
|
Chris@161
|
59 static std::vector<InstrumentPack> listInstrumentPacks();
|
Chris@161
|
60
|
Chris@161
|
61 private:
|
Chris@161
|
62 InstrumentPack(int lowest, int highest, std::string n,
|
Chris@298
|
63 std::vector<Templates> tt);
|
Chris@298
|
64
|
Chris@298
|
65 friend class LiveAdapter;
|
Chris@161
|
66 };
|
Chris@161
|
67
|
Chris@161
|
68 #endif
|