# Onset-based regression (JIT-MFCC example)

**URL:** <https://discourse.flucoma.org/t/onset-based-regression-jit-mfcc-example/464>\
**Category:** Pre-Release Toolbox2 New Ideas\
**Created:** [April 26, 2020, 2:51pm UTC](https://discourse.flucoma.org/t/onset-based-regression-jit-mfcc-example/464 "2020-04-26T14:51:09Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [April 27, 2020, 2:32pm UTC](https://discourse.flucoma.org/t/onset-based-regression-jit-mfcc-example/464/7 "2020-04-27T14:32:09Z")

</div>

Aaaaand here’s a video of it working.

(I’m using the Sensory Percussion pickup for the onset detection (as per [the other thread](https://discourse.flucoma.org/t/making-sense-of-fluid-ampslice/265/46)) and DPA for the audio analysis, and have the DPA audio panned left, and synthetic drums panned right)

I did around 40-50 hits for each point (total of 144 if I send a `size` message to `fluild.database~` and `fluid.labelset~`).

Here’s the latency:  
 ![Screenshot 2020-04-27 at 3.22.14 pm](https://discourse.flucoma.org/uploads/default/original/1X/e923691525978ac33a5e02d52de3b0f63587cacf.png)

(that 85ms is obviously an outlier given the average vs the min)

I’m really surprised how well it was able to differentiate between the center and the edge of the drum with only 256 samples worth of MFCCs. There are a couple of false positives in there (particularly when I play really fast), but overall really good.

I’ll also try doing all audio coming from the Sensory Percussion pickup since the MFCCs (and knn) likely don’t care that the audio sounds worse from it directly.

---

_[View the full topic](https://discourse.flucoma.org/t/onset-based-regression-jit-mfcc-example/464)._
