summaryrefslogtreecommitdiff
path: root/attic/muse_qt4_evolution/midiplugins/dump/dump.cpp
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2011-03-07 19:01:11 +0000
committerRobert Jonsson <spamatica@gmail.com>2011-03-07 19:01:11 +0000
commite40fc849149dd97c248866a4a1d026dda5e57b62 (patch)
treeb12b358f3b3a0608001d30403358f8443118ec5f /attic/muse_qt4_evolution/midiplugins/dump/dump.cpp
parent1bd4f2e8d9745cabb667b043171cad22c8577768 (diff)
clean3
Diffstat (limited to 'attic/muse_qt4_evolution/midiplugins/dump/dump.cpp')
-rw-r--r--attic/muse_qt4_evolution/midiplugins/dump/dump.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/attic/muse_qt4_evolution/midiplugins/dump/dump.cpp b/attic/muse_qt4_evolution/midiplugins/dump/dump.cpp
new file mode 100644
index 00000000..e346a642
--- /dev/null
+++ b/attic/muse_qt4_evolution/midiplugins/dump/dump.cpp
@@ -0,0 +1,48 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: filter.cpp,v 1.10 2005/11/06 17:49:34 wschweer Exp $
+//
+// dump- simple midi event dump for testing purposes
+//
+// (C) Copyright 2006 Werner Schweer (ws@seh.de)
+//=========================================================
+
+#include "dump.h"
+#include "midi.h"
+
+//---------------------------------------------------------
+// process
+//---------------------------------------------------------
+
+void Dump::process(unsigned, unsigned, MidiEventList* il, MidiEventList* ol)
+ {
+ for (iMidiEvent i = il->begin(); i != il->end(); ++i) {
+ printf("Event %6d ch:%2d type:%2d 0x%02x 0x%02x\n", i->time(), i->channel(),
+ i->type(), i->dataA(), i->dataB());
+ ol->insert(*i);
+ }
+ }
+
+//---------------------------------------------------------
+// inst
+//---------------------------------------------------------
+
+static Mempi* instantiate(const char* name, const MempiHost* h)
+ {
+ return new Dump(name, h);
+ }
+
+extern "C" {
+ static MEMPI descriptor = {
+ "Dump",
+ "MusE Simple Midi Event Dump",
+ "0.1", // version string
+ MEMPI_FILTER, // plugin type
+ MEMPI_MAJOR_VERSION, MEMPI_MINOR_VERSION,
+ instantiate
+ };
+
+ const MEMPI* mempi_descriptor() { return &descriptor; }
+ }
+