Open Music Kontrollers

2015 - Week 01

The upcoming Chimaera firmware release 0.6.0 will ship with support for velocity signals. This patch-a-week covers the digital filtering technique involved.

Velocity signal filtering

Although the raw interpolated positional signals are very smooth, the derived velocity signals can be quite noisy. For the velocity signal to be of use as a direct mapping to musical parameters, the velocity signal needs to be smoothed, aka filtered.

x-position-raw x-velocity raw

Raw x-dimension and corresponding x-velocity of arbitrary sensor array sweeps.

We use a variable cutoff/phase, first-order Infinite Impulse Response (IIR) filter to smooth the velocity signal over time. The equation is rather simple and the filter successfully blocks high-frequency signals. The filters performance can be configured by the variable stiffness s which represents the filter sample window (e.g. 1, 2, 4, 8, 16, 32 or 64 samples). The current filter value fn thus depends on previous filter value fn1 , current and last raw values vn and vn1 , respectively.

fn = s2(vn1+vn)+(1s)fn1(1)

x-velocity stiffness=1 x-velocity stiffness=4

Raw (red) and filtered (black) x-velocity with stiffness=1 and stiffness=4.

x-velocity stiffness=16 x-velocity stiffness=64

Raw (red) and filtered (black) x-velocity with stiffness=16 and stiffness=64.

Last update - 15 Jul 2019

Copyright © 2014-2019, Hanspeter Portner, Open Music Kontrollers, cc-by-sa 4.0.