summaryrefslogtreecommitdiffhomepage
path: root/UI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'UI.cpp')
-rw-r--r--UI.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/UI.cpp b/UI.cpp
index a28608a..dfc704d 100644
--- a/UI.cpp
+++ b/UI.cpp
@@ -68,8 +68,8 @@ UI::UI(Config& config):
m_midi_notes{},
m_active_sensing_timestamp{},
m_midi_timestamp{},
- m_note_bpm{},
- m_clock_bpm{},
+ m_note_bpm{2000ms},
+ m_clock_bpm{2000ms},
m_touchpad{}
{
}
@@ -108,9 +108,9 @@ void UI::draw()
int internal_bpm = m_config.get_bpm();
int bpm;
if (mode == 0) {
- bpm = m_note_bpm;
+ bpm = m_note_bpm.value();
} else if (mode == 1) {
- bpm = m_clock_bpm;
+ bpm = m_clock_bpm.value();
} else if (mode == 2) {
bpm = m_config.get_bpm();
}
@@ -174,8 +174,8 @@ void UI::draw()
std::cout << fmt::format(" MIDI Events/s:{:3}", midi_events_per_second) << std::endl;
std::cout << fmt::format(" MIDI Notes/s: {:3}", midi_notes_per_second) << std::endl;
std::cout << fmt::format(" MIDI Bytes/s: {:3} ({}%)", midi_bytes_per_second, midi_bytes_per_second * 100 / midi_bandwidth) << std::endl;
- std::cout << fmt::format(" MIDI Click: {:3} BPM", m_note_bpm) << std::endl;
- std::cout << fmt::format(" MIDI Clock: {:3} BPM", m_clock_bpm) << std::endl;
+ std::cout << fmt::format(" MIDI Click: {:3} BPM", m_note_bpm.value()) << std::endl;
+ std::cout << fmt::format(" MIDI Clock: {:3} BPM", m_clock_bpm.value()) << std::endl;
std::cout << fmt::format(" Internal: {:3} BPM", internal_bpm) << std::endl;
std::cout << fmt::format(" Main loops/s: {:3}", main_loops_per_second) << std::endl;
@@ -268,11 +268,11 @@ void UI::slot_midi_note(int channel, int note, uint64_t timestamp)
void UI::slot_note_bpm(int bpm)
{
- m_note_bpm = bpm;
+ m_note_bpm.update(bpm);
}
void UI::slot_clock_bpm(int bpm)
{
- m_clock_bpm = bpm;
+ m_clock_bpm.update(bpm);
}