diff options
author | Roland Reichwein <mail@reichwein.it> | 2025-01-04 13:48:34 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2025-01-04 13:48:34 +0100 |
commit | 39ec820c931b07bc0cec98add36f106a5965e137 (patch) | |
tree | d1f2f0feb07ff325f363e767181ffaeeab94e20b /main.cpp | |
parent | b2c35cdf69a9084806ac7930cf4475980d596cf6 (diff) |
BPM detect
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -54,9 +54,6 @@ int main(void) std::shared_ptr<NoteClick> note_click = std::make_shared<NoteClick>(config); std::shared_ptr<InternalClick> internal_click = std::make_shared<InternalClick>(config); - // Active Mode - std::shared_ptr<Click> click = note_click; - MIDI midi; PCM pcm; UI ui(config); @@ -77,11 +74,15 @@ int main(void) // midi.signal_note.connect([&](int channel, int note, uint64_t timestamp){note_click->receive_note(channel, note, timestamp);}); note_click->signal_click.connect([&](){pcm.click();}); + note_click->signal_bpm.connect([&](int bpm){ui.slot_note_bpm(bpm);}); + clock_click->signal_bpm.connect([&](int bpm){ui.slot_clock_bpm(bpm);}); midi.signal_active_sensing.connect([&](){ui.slot_active_sensing();}); timer_500ms.elapsed.connect([&](){ui.draw();}); signal_count_loops.connect([&](){ui.count_main_loops();}); + midi.signal_count_events.connect([&](){ui.count_midi_events();}); timer_10min.elapsed.connect([&](){config.persist();}); midi.signal_note.connect([&](int channel, int note, uint64_t timestamp){ui.slot_midi_note(channel, note, timestamp);}); + midi.signal_clock.connect([&](){clock_click->receive_clock();}); midi.flush(); |