/[svn]/linuxsampler/trunk/src/drivers/midi/midi.h
ViewVC logotype

Annotation of /linuxsampler/trunk/src/drivers/midi/midi.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2500 - (hide annotations) (download) (as text)
Fri Jan 10 12:20:05 2014 UTC (10 years, 4 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 2755 byte(s)
* Added support for multiple MIDI input ports per sampler channel (added
  various new C++ API methods for this new feature/design, old C++ API
  methods are now marked as deprecated but should still provide full
  behavior backward compatibility).
* LSCP Network interface: Added the following new LSCP commands for the new
  feature mentioned above: "ADD CHANNEL MIDI_INPUT",
  "REMOVE CHANNEL MIDI_INPUT" and "LIST CHANNEL MIDI_INPUTS". As with the
  C++ API changes, the old LSCP commands for MIDI input management are now
  marked as deprecated, but are still there and should provide full behavior
  backward compatibility.
* New LSCP specification document (LSCP v1.6).
* AbstractEngine::GSCheckSum(): don't allocate memory on the stack (was
  unsafe and caused compilation error with old clang 2.x).
* Bumped version (1.0.0.svn25).

1 schoenebeck 675 /***************************************************************************
2     * *
3 schoenebeck 2500 * Copyright (C) 2005, 2006, 2014 Christian Schoenebeck *
4 schoenebeck 675 * *
5     * This program is free software; you can redistribute it and/or modify *
6     * it under the terms of the GNU General Public License as published by *
7     * the Free Software Foundation; either version 2 of the License, or *
8     * (at your option) any later version. *
9     * *
10     * This program is distributed in the hope that it will be useful, *
11     * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13     * GNU General Public License for more details. *
14     * *
15     * You should have received a copy of the GNU General Public License *
16     * along with this program; if not, write to the Free Software *
17     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
18     * MA 02111-1307 USA *
19     ***************************************************************************/
20    
21     #ifndef __LS_MIDI_H__
22     #define __LS_MIDI_H__
23    
24 schoenebeck 947 #include <string.h>
25    
26 schoenebeck 675 namespace LinuxSampler {
27    
28     /////////////////////////////////////////////////////////////////
29     // global type definitions
30    
31     /**
32     * MIDI channels
33     */
34     enum midi_chan_t {
35     midi_chan_1 = 0,
36     midi_chan_2 = 1,
37     midi_chan_3 = 2,
38     midi_chan_4 = 3,
39     midi_chan_5 = 4,
40     midi_chan_6 = 5,
41     midi_chan_7 = 6,
42     midi_chan_8 = 7,
43     midi_chan_9 = 8,
44     midi_chan_10 = 9,
45     midi_chan_11 = 10,
46     midi_chan_12 = 11,
47     midi_chan_13 = 12,
48     midi_chan_14 = 13,
49     midi_chan_15 = 14,
50     midi_chan_16 = 15,
51     midi_chan_all = 16
52     };
53    
54 schoenebeck 947 /**
55     * MIDI program index
56     */
57     struct midi_prog_index_t {
58     uint8_t midi_bank_msb; ///< coarse MIDI bank index
59     uint8_t midi_bank_lsb; ///< fine MIDI bank index
60     uint8_t midi_prog; ///< MIDI program index
61    
62     bool operator< (const midi_prog_index_t& other) const {
63     return memcmp(this, &other, sizeof(midi_prog_index_t)) < 0;
64     }
65     };
66    
67 schoenebeck 2500 inline bool isValidMidiChan(const midi_chan_t& ch) {
68     return ch >= 0 && ch <= midi_chan_all;
69     }
70    
71 schoenebeck 675 } // namsepace LinuxSampler
72    
73     #endif // __LS_MIDI_H__

  ViewVC Help
Powered by ViewVC