blob: 657a893016a5f75ebdb666b18f94ec5d077a4c00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include "NoteClick.h"
NoteClick::NoteClick(Config& config):
m_config(config),
m_detect(1)
{
m_detect.signal_bpm.connect([&](int bpm){signal_bpm(bpm);});
}
// slots
void NoteClick::receive_note(int channel, int note, uint64_t timestamp)
{
(void) timestamp;
if (channel == m_config.get_midi_channel() && note == m_config.get_midi_note()) {
signal_click();
m_detect.receive_event();
}
}
|