模块 lib.filters

滤波器

一些对音乐事件处理可能有用的滤波器

函数

clear () 清除滤波器的历史记录

类 filters.mean

mean.new (bufsize) 构造函数
mean:next (x) 处理新的输入值并更新平均值

类 filters.median

median.new (bufsize) 构造函数
median:next (x) 处理新的输入值并更新平均值

类 filters.smoother

smoother.new (time, sr) 构造函数
filters.smoother.mean 待办:还有什么会有用?


函数

clear ()
清除滤波器的历史记录

类 filters.mean

移动窗口均值滤波器
mean.new (bufsize)
构造函数

参数:

  • bufsize 窗口大小,创建后无法更改
mean:next (x)
处理新的输入值并更新平均值

参数:

  • x 新输入

返回:

    存储历史记录的缩放总和

类 filters.median

移动窗口中值滤波器
median.new (bufsize)
构造函数

参数:

  • bufsize 窗口大小,创建后无法更改
median:next (x)
处理新的输入值并更新平均值

参数:

  • x 新输入

返回:

    最后N个值的中值

类 filters.smoother

简单单极点低通平滑滤波器
smoother.new (time, sr)
构造函数

参数:

  • time -60dB收敛时间
  • sr 预期采样率
filters.smoother.mean
待办:还有什么会有用?

分位数估计器? 恒定时间斜坡? 某种滞后/锁存?

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