summaryrefslogtreecommitdiffhomepage
path: root/UI.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-12 13:05:43 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-12 13:05:43 +0100
commit33464a1eb6a95d5671ca0246169061868aef3bbe (patch)
treea3901867b6d908745ce6bdda58c83b99ef979a84 /UI.h
parentcdf85d6e04e664e4f56acd05affa287ac63ed125 (diff)
Age out midi notes in UI
Diffstat (limited to 'UI.h')
-rw-r--r--UI.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/UI.h b/UI.h
index bbc5a7d..d686110 100644
--- a/UI.h
+++ b/UI.h
@@ -60,6 +60,12 @@ public:
m_checkpoint_timestamp = clock_type::now();
}
+ T& update()
+ {
+ m_checkpoint_timestamp = clock_type::now();
+ return m_value;
+ }
+
private:
const std::chrono::milliseconds m_timeout;
std::chrono::time_point<clock_type> m_checkpoint_timestamp{};
@@ -104,7 +110,7 @@ private:
std::chrono::time_point<clock_type> m_active_sensing_timestamp;
uint64_t m_midi_timestamp;
- std::deque<std::pair<int,int>> m_midi_monitor;
+ AgeOutValue<std::deque<std::pair<int,int>>> m_midi_monitor;
AgeOutValue<int> m_note_bpm;
AgeOutValue<int> m_clock_bpm;