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@161
|
35 static const int templateNoteCount;
|
Chris@161
|
36 static const int templateHeight;
|
Chris@161
|
37 static const int templateMaxShift;
|
Chris@161
|
38 static const int templateSize;
|
Chris@161
|
39
|
Chris@161
|
40 int lowestNote;
|
Chris@161
|
41 int highestNote;
|
Chris@161
|
42 std::string name;
|
Chris@161
|
43
|
Chris@161
|
44 struct Templates {
|
Chris@161
|
45 int lowestNote;
|
Chris@161
|
46 int highestNote;
|
Chris@161
|
47 // templateNoteCount * templateSize
|
Chris@161
|
48 std::vector<std::vector<float> > data;
|
Chris@161
|
49 };
|
Chris@161
|
50
|
Chris@161
|
51 std::vector<Templates> templates;
|
Chris@161
|
52
|
Chris@161
|
53 static std::vector<InstrumentPack> listInstrumentPacks();
|
Chris@161
|
54
|
Chris@161
|
55 private:
|
Chris@161
|
56 InstrumentPack(int lowest, int highest, std::string n,
|
Chris@161
|
57 std::vector<Templates> tt) :
|
Chris@161
|
58 lowestNote(lowest),
|
Chris@161
|
59 highestNote(highest),
|
Chris@161
|
60 name(n),
|
Chris@161
|
61 templates(tt) { }
|
Chris@161
|
62 };
|
Chris@161
|
63
|
Chris@161
|
64 #endif
|