模块 poll

轮询类; 用于从音频系统接收值的API。

norns 脚本参考 包含 此模块的示例。

实例方法

start () 启动轮询。
stop () 停止轮询。
update (callback) 立即请求单次更新。
__newindex (idx, val) 自定义设置器。
__index (idx) 自定义获取器。


实例方法

start ()
启动轮询。
stop ()
停止轮询。
update (callback)
立即请求单次更新。

参数:

  • callback
__newindex (idx, val)
自定义设置器。 .time 和 .callback 设置相应的私有属性并执行适当的操作。

参数:

  • idx
  • val
__index (idx)
自定义获取器。 可用属性:name, callback, start, stop。

参数:

  • idx
由 LDoc 1.5.0 生成 最后更新 2025-04-06 15:35:25