aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-12-13 12:31:29 +0000
committers-ol <s+removethis@s-ol.nu>2022-12-13 15:38:48 +0000
commit428b68cfd0b767cdfc716ffb68f8746e3ae192e0 (patch)
tree13b8d39a21041bb7bb2f84e77864cbcb89879014 /README.md
downloadlua-abletonlink-428b68cfd0b767cdfc716ffb68f8746e3ae192e0.tar.gz
lua-abletonlink-428b68cfd0b767cdfc716ffb68f8746e3ae192e0.zip
implement simple get/setters
Diffstat (limited to 'README.md')
-rw-r--r--README.md56
1 files changed, 56 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..348018a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,56 @@
+abletonlink
+===========
+
+Lightweight Lua wrapper of the Ableton Link C API ([abl_link][abl_link]).
+
+API
+---
+
+The module follows the C API very closely.
+See the [`abl_link.h`][abl_link.h] for comments for the various methods.
+
+The module table has three members:
+
+- `abletonlink._VERSION`: a string like `"1.0.0"`
+- `abletonlink.create(number bpm)`: creates an `abl_link` instance
+- `abletonlink.create_session_state()`: creates an `abl_link_session_state` instance
+
+`abl_link` instances have the following methods:
+
+- `link:is_enabled() -> bool`
+- `link:enable(bool?)` (defaults to true)
+- `link:is_start_stop_sync_enabled() -> bool`
+- `link:enable_start_stop_sync(bool?)` (defaults to true)
+- `link:num_peers() -> int`
+- `link:clock_micros() -> int`
+- `link:capture_audio_session_state(session_state output)`
+- `link:commit_audio_session_state(session_state input)`
+- `link:capture_app_session_state(session_state output)`
+- `link:commit_app_session_state(session_state input)`
+- `link:destroy()`:
+ Destroys this instance.
+ Calling any other method on a destroyed instance causes an error.
+ This is automatically called in __gc.
+- `link:set_*_callback` are not currently implemented.
+
+`abl_link_session_state` instances have the following methods:
+
+- `session_state:tempo() -> number`
+- `session_state:set_tempo(number bpm, int at_time)`
+- `session_state:beat_at_time(int time, number quantum) -> number`
+- `session_state:phase_at_time(int time, number quantum) -> number`
+- `session_state:time_at_beat(number beat, number quantum) -> int`
+- `session_state:request_beat_at_time(number beat, int time, number quantum)`
+- `session_state:force_beat_at_time(number beat, int time, number quantum)`
+- `session_state:set_is_playing(bool, int at_time)`
+- `session_state:is_playing() -> bool`
+- `session_state:time_for_is_playing() -> int`
+- `session_state:request_beat_at_start_playing_time(number beat, number quantum)`
+- `session_state:set_is_playing_and_request_beat_at_time(bool, int time, number beat, number quantum)`
+- `session_state:destroy()`:
+ Destroys this instance.
+ Calling any other method on a destroyed instance causes an error.
+ This is automatically called in __gc.
+
+[abl_link]: https://github.com/Ableton/link/tree/master/extensions/abl_link
+[abl_link.h]: https://github.com/Ableton/link/blob/master/extensions/abl_link/include/abl_link.h