1 /* 2 * Copyright (C) 2008-2012 Carl Hetherington <carl@carlh.net> 3 * Copyright (C) 2008-2016 David Robillard <d@drobilla.net> 4 * Copyright (C) 2009-2015 Paul Davis <paul@linuxaudiosystems.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License along 17 * with this program; if not, write to the Free Software Foundation, Inc., 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 */ 20 21 #ifndef EVORAL_TYPES_HPP 22 #define EVORAL_TYPES_HPP 23 24 #include <float.h> 25 #include <math.h> 26 #include <stdint.h> 27 28 #include <iostream> 29 #include <limits> 30 #include <list> 31 32 #include "evoral/visibility.h" 33 #include "pbd/debug.h" 34 35 namespace Evoral { 36 37 /** ID of an event (note or other). This must be operable on by glib 38 atomic ops 39 */ 40 typedef int32_t event_id_t; 41 42 /** Type of an event (opaque, mapped by application, e.g. MIDI). 43 * 44 * Event types are really an arbitrary integer provided by the type map, and it 45 * is safe to use values not in this enum, but this enum exists so the compiler 46 * can catch mistakes like setting the event type to a MIDI status byte. Event 47 * types come from the type map and describe a format/protocol like MIDI, and 48 * must not be confused with the payload (such as a note on or CC change). 49 * There is a static value for MIDI as this type is handled specially by 50 * various parts of Evoral. 51 */ 52 enum EventType { 53 NO_EVENT, 54 MIDI_EVENT, 55 LIVE_MIDI_EVENT, 56 #if defined(__arm__) || defined(__aarch64__) 57 _Force32BitAlignment = 0xffffffff 58 #endif 59 }; 60 61 /** Type of a parameter (opaque, mapped by application, e.g. gain) */ 62 typedef uint32_t ParameterType; 63 64 } // namespace Evoral 65 66 namespace PBD { 67 namespace DEBUG { 68 LIBEVORAL_API extern DebugBits Sequence; 69 LIBEVORAL_API extern DebugBits Note; 70 LIBEVORAL_API extern DebugBits ControlList; 71 } 72 } 73 74 #endif // EVORAL_TYPES_HPP 75