Ardour  9.0-pre0-582-g084a23a80d
midnam_patch.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2012 Hans Baier <hansfbaier@googlemail.com>
3  * Copyright (C) 2008-2014 David Robillard <d@drobilla.net>
4  * Copyright (C) 2008-2015 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
6  * Copyright (C) 2014-2018 Robin Gareus <robin@gareus.org>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #ifndef MIDNAM_PATCH_H_
24 #define MIDNAM_PATCH_H_
25 
26 #include <algorithm>
27 #include <cassert>
28 #include <iostream>
29 #include <string>
30 #include <list>
31 #include <set>
32 #include <map>
33 #include <vector>
34 
35 #include <stdint.h>
36 
38 #include "pbd/xml++.h"
39 
40 namespace MIDI
41 {
42 
43 namespace Name
44 {
45 
47 {
48 public:
49  PatchPrimaryKey (int program_num = 0, int bank_num = 0)
50  : _bank(std::max(0, std::min(bank_num, 16383)))
51  , _program(std::max(0, std::min(program_num, 127)))
52  {}
53 
54  inline PatchPrimaryKey(const PatchPrimaryKey& id)
55  : _bank(id._bank)
56  , _program(id._program)
57  {}
58 
60  _bank = id._bank;
61  _program = id._program;
62  return *this;
63  }
64 
65  inline bool operator==(const PatchPrimaryKey& id) const {
66  return (_bank == id._bank &&
67  _program == id._program);
68  }
69 
71  inline bool operator<(const PatchPrimaryKey& id) const {
72  if (_bank < id._bank) {
73  return true;
74  } else if (_bank == id._bank && _program < id._program) {
75  return true;
76  }
77  return false;
78  }
79 
80  void set_bank(int bank) { _bank = std::max(0, std::min(bank, 16383)); }
81  void set_program(int program) { _program = std::max(0, std::min(program, 127)); }
82 
83  inline uint16_t bank() const { return _bank; }
84  inline uint8_t program() const { return _program; }
85 
86 private:
87  uint16_t _bank;
88  uint8_t _program;
89 };
90 
91 class PatchBank;
92 
94 {
95 public:
96 
97  Patch (std::string a_name = std::string(), uint8_t a_number = 0, uint16_t bank_number = 0);
98  virtual ~Patch() {};
99 
100  const std::string& name() const { return _name; }
101  void set_name(const std::string& name) { _name = name; }
102 
103  const std::string& note_list_name() const { return _note_list_name; }
104 
105  uint8_t program_number() const { return _id.program(); }
106  void set_program_number(uint8_t n) { _id.set_program(n); }
107 
108  uint16_t bank_number() const { return _id.bank(); }
109  void set_bank_number (uint16_t n) { _id.set_bank(n); }
110 
111  const PatchPrimaryKey& patch_primary_key() const { return _id; }
112 
113  XMLNode& get_state () const;
114  int set_state (const XMLTree&, const XMLNode&);
115 
116 private:
117  std::string _name;
119  std::string _note_list_name;
120 };
121 
122 typedef std::list<std::shared_ptr<Patch> > PatchNameList;
123 
125 {
126 public:
127  PatchBank (uint16_t n = UINT16_MAX, std::string a_name = std::string()) : _name(a_name), _number (n) {};
128  virtual ~PatchBank() { }
129 
130  const std::string& name() const { return _name; }
131  void set_name(const std::string& a_name) { _name = a_name; }
132 
133  int number() const { return _number; }
134 
135  const PatchNameList& patch_name_list() const { return _patch_name_list; }
136  const std::string& patch_list_name() const { return _patch_list_name; }
137 
139 
140  XMLNode& get_state () const;
141  int set_state (const XMLTree&, const XMLNode&);
142 
143 private:
144  std::string _name;
145  uint16_t _number;
147  std::string _patch_list_name;
148 };
149 
151 {
152 public:
153  typedef std::set<uint8_t> AvailableForChannels;
154  typedef std::list<std::shared_ptr<PatchBank> > PatchBanks;
155  typedef std::map<PatchPrimaryKey, std::shared_ptr<Patch> > PatchMap;
156  typedef std::list<PatchPrimaryKey> PatchList;
157 
159  virtual ~ChannelNameSet() {};
160  ChannelNameSet(std::string& name) : _name(name) {};
161 
162  const std::string& name() const { return _name; }
163  void set_name(const std::string& name) { _name = name; }
164 
165  const PatchBanks& patch_banks() const { return _patch_banks; }
166 
167  bool available_for_channel(uint8_t channel) const {
168  return _available_for_channels.find(channel) != _available_for_channels.end();
169  }
170 
171  std::shared_ptr<Patch> find_patch(const PatchPrimaryKey& key) {
172  return _patch_map[key];
173  }
174 
175  std::shared_ptr<Patch> previous_patch(const PatchPrimaryKey& key) {
176  for (PatchList::const_iterator i = _patch_list.begin();
177  i != _patch_list.end();
178  ++i) {
179  if ((*i) == key) {
180  if (i != _patch_list.begin()) {
181  --i;
182  return _patch_map[*i];
183  }
184  }
185  }
186 
187  return std::shared_ptr<Patch>();
188  }
189 
190  std::shared_ptr<Patch> next_patch(const PatchPrimaryKey& key) {
191  for (PatchList::const_iterator i = _patch_list.begin();
192  i != _patch_list.end();
193  ++i) {
194  if ((*i) == key) {
195  if (++i != _patch_list.end()) {
196  return _patch_map[*i];
197  } else {
198  --i;
199  }
200  }
201  }
202 
203  return std::shared_ptr<Patch>();
204  }
205 
206  const std::string& note_list_name() const { return _note_list_name; }
207  const std::string& control_list_name() const { return _control_list_name; }
208 
209  XMLNode& get_state () const;
210  int set_state (const XMLTree&, const XMLNode&);
211 
214 
215 private:
216  friend std::ostream& operator<< (std::ostream&, const ChannelNameSet&);
217 
218  std::string _name;
223  std::string _patch_list_name;
224  std::string _note_list_name;
225  std::string _control_list_name;
226 };
227 
228 std::ostream& operator<< (std::ostream&, const ChannelNameSet&);
229 
231 {
232 public:
233  Note() {}
234  Note(uint8_t number, const std::string& name) : _number(number), _name(name) {}
235 
236  const std::string& name() const { return _name; }
237  void set_name(const std::string& name) { _name = name; }
238 
239  uint8_t number() const { return _number; }
240  void set_number(uint8_t number) { _number = number; }
241 
242  XMLNode& get_state () const;
243  int set_state (const XMLTree&, const XMLNode&);
244 
245 private:
246  uint8_t _number;
247  std::string _name;
248 };
249 
251 {
252 public:
253  typedef std::vector< std::shared_ptr<Note> > Notes;
254 
255  NoteNameList() { _notes.resize(128); }
256  NoteNameList (const std::string& name) : _name(name) { _notes.resize(128); }
257 
258  const std::string& name() const { return _name; }
259  const Notes& notes() const { return _notes; }
260 
261  void set_name(const std::string& name) { _name = name; }
262 
263  XMLNode& get_state () const;
264  int set_state (const XMLTree&, const XMLNode&);
265 
266 private:
267  std::string _name;
269 };
270 
272 {
273 public:
274  Value() {}
275  Value(const uint16_t number,
276  const std::string& name)
277  : _number(number)
278  , _name(name)
279  {}
280 
281  uint16_t number() const { return _number; }
282  const std::string& name() const { return _name; }
283 
284  void set_number(uint16_t number) { _number = number; }
285  void set_name(const std::string& name) { _name = name; }
286 
287  XMLNode& get_state () const;
288  int set_state(const XMLTree&, const XMLNode&);
289 
290 private:
291  uint16_t _number;
292  std::string _name;
293 };
294 
296 {
297 public:
298  typedef std::map<uint16_t, std::shared_ptr<Value> > Values;
299 
301  ValueNameList(const std::string& name) : _name(name) {}
302 
303  const std::string& name() const { return _name; }
304 
305  void set_name(const std::string& name) { _name = name; }
306 
307  std::shared_ptr<const Value> value(uint16_t num) const;
308  std::shared_ptr<const Value> max_value_below(uint16_t num) const;
309 
310  const Values& values() const { return _values; }
311 
312  XMLNode& get_state () const;
313  int set_state(const XMLTree&, const XMLNode&);
314 
315 private:
316  std::string _name;
318 };
319 
321 {
322 public:
323  Control() {}
324  Control(const std::string& type,
325  const uint16_t number,
326  const std::string& name)
327  : _type(type)
328  , _number(number)
329  , _name(name)
330  {}
331 
332  const std::string& type() const { return _type; }
333  uint16_t number() const { return _number; }
334  const std::string& name() const { return _name; }
335 
336  const std::string& value_name_list_name() const { return _value_name_list_name; }
337  std::shared_ptr<const ValueNameList> value_name_list() const { return _value_name_list; }
338 
339  void set_type(const std::string& type) { _type = type; }
340  void set_number(uint16_t number) { _number = number; }
341  void set_name(const std::string& name) { _name = name; }
342 
343  XMLNode& get_state () const;
344  int set_state(const XMLTree&, const XMLNode&);
345 
346 private:
347  std::string _type;
348  uint16_t _number;
349  std::string _name;
350 
351  std::string _value_name_list_name;
352  std::shared_ptr<ValueNameList> _value_name_list;
353 };
354 
356 {
357 public:
358  typedef std::map<uint16_t, std::shared_ptr<Control> > Controls;
359 
361  ControlNameList(const std::string& name) : _name(name) {}
362 
363  const std::string& name() const { return _name; }
364 
365  void set_name(const std::string& name) { _name = name; }
366 
367  std::shared_ptr<const Control> control(uint16_t num) const;
368 
369  const Controls& controls() const { return _controls; }
370 
371  XMLNode& get_state () const;
372  int set_state(const XMLTree&, const XMLNode&);
373 
374 private:
375  std::string _name;
377 };
378 
380 {
381 public:
383  virtual ~CustomDeviceMode() {};
384 
385  const std::string& name() const { return _name; }
386  void set_name(const std::string& name) { _name = name; }
387 
388 
389  XMLNode& get_state () const;
390  int set_state (const XMLTree&, const XMLNode&);
391 
393  const std::string& channel_name_set_name_by_channel(uint8_t channel) {
394  assert(channel <= 15);
395  return _channel_name_set_assignments[channel];
396  }
397 
398 private:
401  std::string _name;
402  std::string _channel_name_set_assignments[16];
403 };
404 
406 {
407 public:
408  typedef std::set<std::string> Models;
410  typedef std::map<std::string, std::shared_ptr<CustomDeviceMode> > CustomDeviceModes;
411  typedef std::list<std::string> CustomDeviceModeNames;
413  typedef std::map<std::string, std::shared_ptr<ChannelNameSet> > ChannelNameSets;
414  typedef std::map<std::string, std::shared_ptr<NoteNameList> > NoteNameLists;
415  typedef std::map<std::string, std::shared_ptr<ControlNameList> > ControlNameLists;
416  typedef std::map<std::string, std::shared_ptr<ValueNameList> > ValueNameLists;
417  typedef std::map<std::string, PatchNameList> PatchNameLists;
418 
420  virtual ~MasterDeviceNames() {};
421 
422  const std::string& manufacturer() const { return _manufacturer; }
423  void set_manufacturer(const std::string& manufacturer) { _manufacturer = manufacturer; }
424 
425  const Models& models() const { return _models; }
426  void set_models(const Models some_models) { _models = some_models; }
427 
428  const ControlNameLists& controls() const { return _control_name_lists; }
429  const ValueNameLists& values() const { return _value_name_lists; }
430 
431  std::shared_ptr<const ValueNameList> value_name_list_by_control(
432  const std::string& mode,
433  uint8_t channel,
434  uint8_t number);
435 
436  const CustomDeviceModeNames& custom_device_mode_names() const { return _custom_device_mode_names; }
437 
438  std::shared_ptr<CustomDeviceMode> custom_device_mode_by_name(const std::string& mode_name);
439  std::shared_ptr<ChannelNameSet> channel_name_set_by_channel(const std::string& mode, uint8_t channel);
440  std::shared_ptr<Patch> find_patch(const std::string& mode, uint8_t channel, const PatchPrimaryKey& key);
441 
442  std::shared_ptr<ControlNameList> control_name_list(const std::string& name);
443  std::shared_ptr<ValueNameList> value_name_list(const std::string& name);
444  std::shared_ptr<NoteNameList> note_name_list(const std::string& name);
445  std::shared_ptr<ChannelNameSet> channel_name_set(const std::string& name);
446 
447  std::string note_name(const std::string& mode_name,
448  uint8_t channel,
449  uint16_t bank,
450  uint8_t program,
451  uint8_t number);
452 
453  XMLNode& get_state () const;
454  int set_state (const XMLTree&, const XMLNode&);
455 
456 private:
457  std::string _manufacturer;
466 };
467 
469 {
470 public:
471  // Maps Model names to MasterDeviceNames
472  typedef std::map<std::string, std::shared_ptr<MasterDeviceNames> > MasterDeviceNamesList;
473 
475  MIDINameDocument(const std::string& file_path);
476  virtual ~MIDINameDocument() {};
477 
478  const std::string& file_path () const { return _file_path; }
479  const std::string& author() const { return _author; }
480 
481  void set_author(const std::string& author) { _author = author; }
482  void set_file_path(const std::string& file_path) { _file_path = file_path; }
483 
484  std::shared_ptr<MasterDeviceNames> master_device_names(const std::string& model);
485 
486  const MasterDeviceNamesList& master_device_names_by_model() const { return _master_device_names_list; }
487 
488  const MasterDeviceNames::Models& all_models() const { return _all_models; }
489 
490  XMLNode& get_state () const;
491  int set_state (const XMLTree&, const XMLNode&);
492 
493 private:
494  std::string _file_path;
495  std::string _author;
498 };
499 
500 }
501 
502 }
503 #endif /*MIDNAM_PATCH_H_*/
std::set< uint8_t > AvailableForChannels
Definition: midnam_patch.h:153
const std::string & name() const
Definition: midnam_patch.h:162
ChannelNameSet(std::string &name)
Definition: midnam_patch.h:160
std::list< PatchPrimaryKey > PatchList
Definition: midnam_patch.h:156
void set_patch_banks(const PatchBanks &)
std::map< PatchPrimaryKey, std::shared_ptr< Patch > > PatchMap
Definition: midnam_patch.h:155
const std::string & note_list_name() const
Definition: midnam_patch.h:206
std::shared_ptr< Patch > previous_patch(const PatchPrimaryKey &key)
Definition: midnam_patch.h:175
std::list< std::shared_ptr< PatchBank > > PatchBanks
Definition: midnam_patch.h:154
const PatchBanks & patch_banks() const
Definition: midnam_patch.h:165
const std::string & control_list_name() const
Definition: midnam_patch.h:207
int set_state(const XMLTree &, const XMLNode &)
void set_name(const std::string &name)
Definition: midnam_patch.h:163
bool available_for_channel(uint8_t channel) const
Definition: midnam_patch.h:167
AvailableForChannels _available_for_channels
Definition: midnam_patch.h:219
XMLNode & get_state() const
void use_patch_name_list(const PatchNameList &)
std::shared_ptr< Patch > find_patch(const PatchPrimaryKey &key)
Definition: midnam_patch.h:171
std::shared_ptr< Patch > next_patch(const PatchPrimaryKey &key)
Definition: midnam_patch.h:190
std::shared_ptr< const Control > control(uint16_t num) const
XMLNode & get_state() const
const Controls & controls() const
Definition: midnam_patch.h:369
void set_name(const std::string &name)
Definition: midnam_patch.h:365
std::map< uint16_t, std::shared_ptr< Control > > Controls
Definition: midnam_patch.h:358
int set_state(const XMLTree &, const XMLNode &)
const std::string & name() const
Definition: midnam_patch.h:363
ControlNameList(const std::string &name)
Definition: midnam_patch.h:361
std::shared_ptr< ValueNameList > _value_name_list
Local, ValueNameList.
Definition: midnam_patch.h:352
void set_name(const std::string &name)
Definition: midnam_patch.h:341
uint16_t number() const
Definition: midnam_patch.h:333
int set_state(const XMLTree &, const XMLNode &)
std::shared_ptr< const ValueNameList > value_name_list() const
Definition: midnam_patch.h:337
XMLNode & get_state() const
void set_number(uint16_t number)
Definition: midnam_patch.h:340
Control(const std::string &type, const uint16_t number, const std::string &name)
Definition: midnam_patch.h:324
void set_type(const std::string &type)
Definition: midnam_patch.h:339
const std::string & name() const
Definition: midnam_patch.h:334
const std::string & value_name_list_name() const
Definition: midnam_patch.h:336
std::string _value_name_list_name
Global, UsesValueNameList.
Definition: midnam_patch.h:351
const std::string & type() const
Definition: midnam_patch.h:332
int set_state(const XMLTree &, const XMLNode &)
XMLNode & get_state() const
const std::string & channel_name_set_name_by_channel(uint8_t channel)
Note: channel here is 0-based while in the MIDNAM-file it's 1-based.
Definition: midnam_patch.h:393
void set_name(const std::string &name)
Definition: midnam_patch.h:386
const std::string & name() const
Definition: midnam_patch.h:385
MasterDeviceNames::Models _all_models
Definition: midnam_patch.h:497
MasterDeviceNamesList _master_device_names_list
Definition: midnam_patch.h:496
const MasterDeviceNames::Models & all_models() const
Definition: midnam_patch.h:488
void set_author(const std::string &author)
Definition: midnam_patch.h:481
const std::string & file_path() const
Definition: midnam_patch.h:478
const MasterDeviceNamesList & master_device_names_by_model() const
Definition: midnam_patch.h:486
const std::string & author() const
Definition: midnam_patch.h:479
void set_file_path(const std::string &file_path)
Definition: midnam_patch.h:482
int set_state(const XMLTree &, const XMLNode &)
std::map< std::string, std::shared_ptr< MasterDeviceNames > > MasterDeviceNamesList
Definition: midnam_patch.h:472
std::shared_ptr< MasterDeviceNames > master_device_names(const std::string &model)
MIDINameDocument(const std::string &file_path)
XMLNode & get_state() const
std::shared_ptr< ChannelNameSet > channel_name_set_by_channel(const std::string &mode, uint8_t channel)
ValueNameLists _value_name_lists
Definition: midnam_patch.h:465
const ControlNameLists & controls() const
Definition: midnam_patch.h:428
XMLNode & get_state() const
std::shared_ptr< ChannelNameSet > channel_name_set(const std::string &name)
std::shared_ptr< CustomDeviceMode > custom_device_mode_by_name(const std::string &mode_name)
std::shared_ptr< NoteNameList > note_name_list(const std::string &name)
CustomDeviceModes _custom_device_modes
Definition: midnam_patch.h:459
std::map< std::string, PatchNameList > PatchNameLists
Definition: midnam_patch.h:417
std::shared_ptr< const ValueNameList > value_name_list_by_control(const std::string &mode, uint8_t channel, uint8_t number)
const std::string & manufacturer() const
Definition: midnam_patch.h:422
const CustomDeviceModeNames & custom_device_mode_names() const
Definition: midnam_patch.h:436
std::map< std::string, std::shared_ptr< ChannelNameSet > > ChannelNameSets
maps name to ChannelNameSet
Definition: midnam_patch.h:413
std::shared_ptr< ValueNameList > value_name_list(const std::string &name)
std::shared_ptr< Patch > find_patch(const std::string &mode, uint8_t channel, const PatchPrimaryKey &key)
std::list< std::string > CustomDeviceModeNames
Definition: midnam_patch.h:411
CustomDeviceModeNames _custom_device_mode_names
Definition: midnam_patch.h:460
PatchNameLists _patch_name_lists
Definition: midnam_patch.h:463
ControlNameLists _control_name_lists
Definition: midnam_patch.h:464
std::map< std::string, std::shared_ptr< CustomDeviceMode > > CustomDeviceModes
maps name to CustomDeviceMode
Definition: midnam_patch.h:410
std::string note_name(const std::string &mode_name, uint8_t channel, uint16_t bank, uint8_t program, uint8_t number)
const ValueNameLists & values() const
Definition: midnam_patch.h:429
ChannelNameSets _channel_name_sets
Definition: midnam_patch.h:461
const Models & models() const
Definition: midnam_patch.h:425
std::map< std::string, std::shared_ptr< ValueNameList > > ValueNameLists
Definition: midnam_patch.h:416
int set_state(const XMLTree &, const XMLNode &)
std::shared_ptr< ControlNameList > control_name_list(const std::string &name)
std::map< std::string, std::shared_ptr< NoteNameList > > NoteNameLists
Definition: midnam_patch.h:414
void set_models(const Models some_models)
Definition: midnam_patch.h:426
void set_manufacturer(const std::string &manufacturer)
Definition: midnam_patch.h:423
std::set< std::string > Models
Definition: midnam_patch.h:408
std::map< std::string, std::shared_ptr< ControlNameList > > ControlNameLists
Definition: midnam_patch.h:415
NoteNameList(const std::string &name)
Definition: midnam_patch.h:256
std::vector< std::shared_ptr< Note > > Notes
Definition: midnam_patch.h:253
const Notes & notes() const
Definition: midnam_patch.h:259
const std::string & name() const
Definition: midnam_patch.h:258
int set_state(const XMLTree &, const XMLNode &)
void set_name(const std::string &name)
Definition: midnam_patch.h:261
XMLNode & get_state() const
int set_state(const XMLTree &, const XMLNode &)
XMLNode & get_state() const
const std::string & name() const
Definition: midnam_patch.h:236
void set_name(const std::string &name)
Definition: midnam_patch.h:237
Note(uint8_t number, const std::string &name)
Definition: midnam_patch.h:234
std::string _name
Definition: midnam_patch.h:247
void set_number(uint8_t number)
Definition: midnam_patch.h:240
uint8_t number() const
Definition: midnam_patch.h:239
std::string _patch_list_name
Definition: midnam_patch.h:147
PatchBank(uint16_t n=UINT16_MAX, std::string a_name=std::string())
Definition: midnam_patch.h:127
int set_state(const XMLTree &, const XMLNode &)
XMLNode & get_state() const
void set_name(const std::string &a_name)
Definition: midnam_patch.h:131
const std::string & name() const
Definition: midnam_patch.h:130
const PatchNameList & patch_name_list() const
Definition: midnam_patch.h:135
const std::string & patch_list_name() const
Definition: midnam_patch.h:136
PatchNameList _patch_name_list
Definition: midnam_patch.h:146
int set_patch_name_list(const PatchNameList &)
virtual ~Patch()
Definition: midnam_patch.h:98
XMLNode & get_state() const
void set_program_number(uint8_t n)
Definition: midnam_patch.h:106
uint8_t program_number() const
Definition: midnam_patch.h:105
int set_state(const XMLTree &, const XMLNode &)
PatchPrimaryKey _id
Definition: midnam_patch.h:118
uint16_t bank_number() const
Definition: midnam_patch.h:108
const PatchPrimaryKey & patch_primary_key() const
Definition: midnam_patch.h:111
Patch(std::string a_name=std::string(), uint8_t a_number=0, uint16_t bank_number=0)
void set_name(const std::string &name)
Definition: midnam_patch.h:101
std::string _note_list_name
Definition: midnam_patch.h:119
std::string _name
Definition: midnam_patch.h:117
void set_bank_number(uint16_t n)
Definition: midnam_patch.h:109
const std::string & name() const
Definition: midnam_patch.h:100
const std::string & note_list_name() const
Definition: midnam_patch.h:103
ValueNameList(const std::string &name)
Definition: midnam_patch.h:301
void set_name(const std::string &name)
Definition: midnam_patch.h:305
const Values & values() const
Definition: midnam_patch.h:310
std::shared_ptr< const Value > value(uint16_t num) const
const std::string & name() const
Definition: midnam_patch.h:303
std::map< uint16_t, std::shared_ptr< Value > > Values
Definition: midnam_patch.h:298
std::shared_ptr< const Value > max_value_below(uint16_t num) const
XMLNode & get_state() const
int set_state(const XMLTree &, const XMLNode &)
const std::string & name() const
Definition: midnam_patch.h:282
int set_state(const XMLTree &, const XMLNode &)
uint16_t number() const
Definition: midnam_patch.h:281
void set_number(uint16_t number)
Definition: midnam_patch.h:284
void set_name(const std::string &name)
Definition: midnam_patch.h:285
Value(const uint16_t number, const std::string &name)
Definition: midnam_patch.h:275
std::string _name
Definition: midnam_patch.h:292
XMLNode & get_state() const
Definition: xml++.h:114
Definition: xml++.h:74
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBMIDIPP_API
std::ostream & operator<<(std::ostream &, const ChannelNameSet &)
std::list< std::shared_ptr< Patch > > PatchNameList
void set_program(int program)
Definition: midnam_patch.h:81
PatchPrimaryKey(int program_num=0, int bank_num=0)
Definition: midnam_patch.h:49
PatchPrimaryKey & operator=(const PatchPrimaryKey &id)
Definition: midnam_patch.h:59
PatchPrimaryKey(const PatchPrimaryKey &id)
Definition: midnam_patch.h:54
bool operator==(const PatchPrimaryKey &id) const
Definition: midnam_patch.h:65
bool operator<(const PatchPrimaryKey &id) const
Definition: midnam_patch.h:71