aboutsummaryrefslogtreecommitdiffstats
path: root/examples/linkhut.lua
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2026-04-13 18:05:51 +0000
committers-ol <s+removethis@s-ol.nu>2026-04-13 18:05:51 +0000
commita98c602ceaafb67f479e2e917035b8ae443b042e (patch)
treefe0587afa529a14e676986bf96bc34f1cb266a48 /examples/linkhut.lua
parentexamples/linkhut: fix phase display (diff)
downloadlua-abletonlink-a98c602ceaafb67f479e2e917035b8ae443b042e.tar.gz
lua-abletonlink-a98c602ceaafb67f479e2e917035b8ae443b042e.zip
implement callbacks
Diffstat (limited to 'examples/linkhut.lua')
-rw-r--r--examples/linkhut.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/linkhut.lua b/examples/linkhut.lua
index 7490823..de3ba9e 100644
--- a/examples/linkhut.lua
+++ b/examples/linkhut.lua
@@ -102,6 +102,18 @@ session_state = al.create_session_state()
running = true
quantum = 4
+link:set_num_peers_callback(function (np)
+ print("\nevent:", "num peers", np)
+end)
+
+link:set_tempo_callback(function (t)
+ print("\nevent:", "tempo", t)
+end)
+
+link:set_start_stop_callback(function (p)
+ print("\nevent:", "start_stop", p)
+end)
+
print_help()
print_state_header()
set_buffered_input(false)
@@ -113,5 +125,6 @@ while running do
else
print_state()
end
+ link:pump_events()
end
set_buffered_input(true)