## 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.

*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 ${f}_{n}$ thus depends on previous filter value ${f}_{n-1}$ , current and last raw values ${v}_{n}$ and ${v}_{n-1}$ , respectively.

$$\begin{array}{rcll}{f}_{n}& =& \frac{s}{2}\cdot \left({v}_{n-1}+{v}_{n}\right)+\left(1-s\right)\cdot {f}_{n-1}& \text{(1)}\text{}\text{}\end{array}$$

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

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