summaryrefslogtreecommitdiff
path: root/src/engineevent.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2022-11-02 13:00:57 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2022-11-02 13:00:57 +0100
commit2aea36ece0881e0ee0885ae1ddc656f2260de57a (patch)
treeeedb804a9ba70e2f8dcdcfd90f1dfb1de662b46c /src/engineevent.h
parentadf0bb14ca9a76aa88a0fe688764770d0b1fa7d8 (diff)
Rename event.h to engineevent.h to avoid nameclash with system include files.
Diffstat (limited to 'src/engineevent.h')
-rw-r--r--src/engineevent.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/engineevent.h b/src/engineevent.h
new file mode 100644
index 0000000..9c60a4a
--- /dev/null
+++ b/src/engineevent.h
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/***************************************************************************
+ * engineevent.h
+ *
+ * Fri Jun 3 12:10:50 CEST 2011
+ * Copyright 2011 Bent Bisballe Nyeng
+ * deva@aasimon.org
+ ****************************************************************************/
+
+/*
+ * This file is part of DrumGizmo.
+ *
+ * DrumGizmo is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * DrumGizmo is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with DrumGizmo; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+#pragma once
+
+#include <cstddef>
+
+//! Event types
+enum class EventType
+{
+ OnSet,
+ Choke,
+ Stop,
+};
+
+//! POD datatype for input event transport.
+struct event_t
+{
+ EventType type; //!< The type of the event.
+ std::size_t instrument; //!< The instrument number.
+ std::size_t offset; //!< The offset position in the input buffer
+ float velocity; //!< The velocity if the type is a note on [0; 1]
+};