Ardour  9.0-18-g01809b426c
midi++2/midi++/types.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2000-2017 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2006-2007 David Robillard <d@drobilla.net>
4  *
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 along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #pragma once
21 
22 #include <inttypes.h>
23 
25 
26 namespace MIDI {
27 
28  typedef char channel_t;
29  typedef float controller_value_t;
30  typedef unsigned char byte;
31  typedef unsigned short pitchbend_t;
32  typedef uint32_t timestamp_t;
33 
35  typedef int64_t samplecnt_t;
36  typedef uint32_t pframes_t;
37 
38  enum eventType {
39  none = 0x0,
40  raw = 0xF4, /* undefined in MIDI spec */
41  any = 0xF5, /* undefined in MIDI spec */
42  off = 0x80,
43  on = 0x90,
44  controller = 0xB0,
45  program = 0xC0,
46  chanpress = 0xD0,
47  polypress = 0xA0,
48  pitchbend = 0xE0,
49  sysex = 0xF0,
50  mtc_quarter = 0xF1,
51  position = 0xF2,
52  song = 0xF3,
53  tune = 0xF6,
54  eox = 0xF7,
55  timing = 0xF8,
56  tick = 0xF9,
57  start = 0xFA,
58  contineu = 0xFB, /* note spelling */
59  stop = 0xFC,
60  active = 0xFE,
61  reset = 0xFF
62  };
63 
64  LIBMIDIPP_API extern const char *controller_names[];
65  byte decode_controller_name (const char *name);
66 
68  union {
71  };
72  union {
73  byte velocity;
74  byte value;
75  };
76  };
77 
82  MTC_30_FPS = 3
83  };
84 
89  };
90 
91 } // namespace MIDI
92 
93 
94 
95 
96 
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBMIDIPP_API
byte decode_controller_name(const char *name)
int64_t samplecnt_t
const char * controller_names[]
unsigned short pitchbend_t
float controller_value_t
uint32_t timestamp_t
uint32_t pframes_t