#include "ClockClick.h" ClockClick::ClockClick(): m_divider(24), m_count{}, m_detect(24) { m_detect.signal_bpm.connect([&](int bpm){signal_bpm(bpm);}); } // slots void ClockClick::receive_clock() { m_detect.receive_event(); // guard by divider ++m_count; if (m_count < m_divider) { return; } else { m_count = 0; } signal_click(); }