summaryrefslogtreecommitdiff
path: root/services/BeatDetector.qml
diff options
context:
space:
mode:
Diffstat (limited to 'services/BeatDetector.qml')
-rw-r--r--services/BeatDetector.qml18
1 files changed, 18 insertions, 0 deletions
diff --git a/services/BeatDetector.qml b/services/BeatDetector.qml
new file mode 100644
index 0000000..66bf2d4
--- /dev/null
+++ b/services/BeatDetector.qml
@@ -0,0 +1,18 @@
+pragma Singleton
+
+import Quickshell
+import Quickshell.Io
+
+Singleton {
+ id: root
+
+ property real bpm
+
+ Process {
+ running: true
+ command: [`${Quickshell.shellRoot}/assets/realtime-beat-detector.py`]
+ stdout: SplitParser {
+ onRead: data => root.bpm = parseFloat(data)
+ }
+ }
+}