From 624a69994d89c71b1ce59dd3b2117a235400be2f Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 4 Jan 2025 13:55:09 +0100 Subject: No virtual clicks --- main.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 5c8d345..4a5f698 100644 --- a/main.cpp +++ b/main.cpp @@ -50,9 +50,9 @@ int main(void) Config config; - std::shared_ptr clock_click = std::make_shared(); - std::shared_ptr note_click = std::make_shared(config); - std::shared_ptr internal_click = std::make_shared(config); + ClockClick clock_click; + NoteClick note_click(config); + InternalClick internal_click(config); MIDI midi; PCM pcm; @@ -72,17 +72,17 @@ int main(void) // // Signal-Slot Connections: // - 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_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.signal_clock.connect([&](){clock_click.receive_clock();}); midi.flush(); -- cgit v1.2.3