summaryrefslogtreecommitdiffhomepage
path: root/NoteClick.h
diff options
context:
space:
mode:
Diffstat (limited to 'NoteClick.h')
-rw-r--r--NoteClick.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/NoteClick.h b/NoteClick.h
new file mode 100644
index 0000000..754329f
--- /dev/null
+++ b/NoteClick.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <boost/signals2.hpp>
+
+#include "config.h"
+#include "BPMDetect.h"
+
+// Generated from MIDI notes
+// Configured via channel and note to listen to
+class NoteClick
+{
+public:
+ NoteClick(Config& config);
+
+ // signals
+ boost::signals2::signal<void()> signal_click;
+ boost::signals2::signal<void(int)> signal_bpm;
+
+ // slots
+ void receive_note(int channel, int note, uint64_t timestamp);
+
+private:
+ Config& m_config;
+
+ BPMDetect m_detect;
+};
+