summaryrefslogtreecommitdiffhomepage
path: root/ClockClick.h
blob: 2c0ef19061aea058e7ae7b4b6349eb6108684d34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include <boost/signals2.hpp>

#include "config.h"
#include "BPMDetect.h"

// Generated from MIDI Clock
class ClockClick
{
public:
  ClockClick();

  // signals
  boost::signals2::signal<void()> signal_click;
  boost::signals2::signal<void(int)> signal_bpm;

  // slots
  void receive_clock();

private:
  const int m_divider;
  int m_count;

  BPMDetect m_detect;
};