|
@@ -0,0 +1,43 @@
|
|
|
+#include <vector>
|
|
|
+#include <memory>
|
|
|
+#include <iostream>
|
|
|
+#include "Message.h"
|
|
|
+
|
|
|
+using namespace midi;
|
|
|
+
|
|
|
+int main()
|
|
|
+{
|
|
|
+ std::vector<std::shared_ptr<Message>> msg = {
|
|
|
+ std::make_shared<NoteOnMessage>(1, 23, 43),
|
|
|
+ std::make_shared<NoteOnMessage>(1, 23, 43),
|
|
|
+ std::make_shared<NoteOnMessage>(2, 23, 43),
|
|
|
+ std::make_shared<NoteOffMessage>(1, 23, 43),
|
|
|
+ std::make_shared<NoteOffMessage>(1, 23, 43)
|
|
|
+ };
|
|
|
+
|
|
|
+ for(unsigned int i=0; i<msg.size(); i++) {
|
|
|
+ std::cout << "#" << i << ": ";
|
|
|
+ msg[i]->print(std::cout);
|
|
|
+ }
|
|
|
+ std::cout << std::endl;
|
|
|
+
|
|
|
+ for(unsigned int j=0; j<msg.size(); j++) {
|
|
|
+ std::cout << "\t#" << j;
|
|
|
+ }
|
|
|
+ std::cout << std::endl;
|
|
|
+ for(unsigned int i=0; i<msg.size(); i++) {
|
|
|
+ std::cout << "#" << i;
|
|
|
+ for(unsigned int j=0; j<msg.size(); j++) {
|
|
|
+ std::cout << "\t";
|
|
|
+ Message& a = *msg[i];
|
|
|
+ Message& b = *msg[j];
|
|
|
+ if(a == b) {
|
|
|
+ std::cout << "eq";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ std::cout << std::endl;
|
|
|
+ }
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|