Onset-based regression (JIT-MFCC example)

One of the things I was trying to do very early on was to somewhat emulation the behavior of the Sensory Percussion software where you can train a handful of sounds, then play back arbitrary material and it would return the nearest value.

I tried doing this, with tons of help from @tremblap and co., by (somewhat mis)using NMF to classify and match material (link). It was a long and winding road that I eventually abandoned because the response time wasn’t great, and before the time of @blockingmode there was extra slop on top of everything.

But now with getting some refined onset detection, and finally getting the onset descriptors stuff working reasonably well (though not perfect) I wanted to revisit this idea with TB2.

In looking through the examples it looks like the JIT-MFCC-Classifier.maxpat will do exactly what I want, so I was eager to test it and see what kind of performance I can get with sounds that were not as different as kick/snare/hat (i.e. different types of hits on a single drum). Unfortunately I can’t make heads-or-tails of the example. I’m somewhat versed in reading “PA patches”, but in playing with this for a while, I can’t seem to get it to work. It doesn’t help that the numbered things (4/5/6/7) are all in a row, and don’t seem to correspond with whatever the text is supposed to be communicating.

    • assign a component to train at #4
    • play a few instance of the class to define (at #1)
    • copy the trained dictionary by pressing #5
• once finished training, put #3 in play mode

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Sooo a few questions.

Firstly, does this example do what it says on the tin?
Is there a more recent and/or cleaned up version of this example available?
In terms of available algorithms is knn “fast”?
Are there ballparks for the amount of entries that would suitable for any given point? (ala NMF’s diminishing returns after a certain amount of iterations)

Thanks for the props :rofl:

This looks like the wrong version of the patch. Check the other thread to see if you have the latest version (alpha01) which is supposed to be readable. Then if you confirm, I will help you though it.

I’ve got the latest version (I was just checking to see if there’s something sooner), as this is what’s included in TB2-Alpha01-Max. So depends on what you mean by “readable” I guess…

Also, on a more topical note, am I correct in thinking that for regression (and/or knn specifically) that having more dimensions (i.e. MFCCs) is better than less dimensions (i.e. three or four descriptors)? And again, is there a sensible point of diminishing returns before throwing the whole kitchen sink at it (specifically in terms of latency/speed)?

you are right, this is not super readable. I will make a new commented version tomorrow first thing and post it here.

As for the curse of dimension numbers and stuff, @weefuzzy and/or @groma will have more things to say, more wisely.

1 Like

ok this is a somewhat tidier and clearer explanation I could do quickly this morning. Let me know what questions you have with this one (there were wrong facts and wrong code in the other, sorry for that!) and that’ll help @weefuzzy and myself devising more learning material.


----------begin_max5_patcher----------
11237.3oc68staqijjl+9TOErc2MP0c4xSdOImeLn5owL.yhY.Vfc+2zCNfV
h1l0QlRKE04RMXL1mk4QaeR17FknNVhLjEyTorTAT9XKRJl4WFQjQlYDew+4
O7gate9WKVdSxeex+dxG9v+4O7gOX9H8G7A2e+gadN+qSlkuzba27bwxk4OV
bys1q0T70Fymurp8ipV8bY0rhFy8Sbe3xluMqvbicts4qZZuOr6SWj2L4oxp
G+XcwjFa6JkjcG51jLIW+Obj9mDxcnj+C2yTN07EO+9e8mYz1ud62cy2VTX+
Vt4lj+C8U9u9geP+iaA1cqJ9h568U815jl4+q42WLa4N60niuWKRMcWYpoyK
n81qwgoWur+dMFXuFs+dMgKMcTjvzq480qoo27F5Z2upoYd0Q096aTSRuiqj
UIVoTV6O2U6OauCZ2mW83abfa0y2WTeT8Nx96cRjYzw065WSDmteYxaW2EW+
tpyetnon9iEU42aadnQTaU0DJRVV9aEGkMpgQlzTxvZqTRuHy3pwtntrp4gj
7oSMJtI+woI+wk9xRM21wSwl+ASk8ACjvXy5gYqJmd2LiUqhlWR9e7u7+9mm
c71vnCiBLoEEx5CEj8aD3VcGXddy3KXnjEteZxxpjmdR8K+j5WT+T86KqT+b
mPiDHzH6w7H0Xy.iPol+MsWC7D9ffCz+cbm72XNwbakO7s+myUZX9xtRJgal
OwpJgsv1dM4JBngEk7CxW8ZJ1zc4VUGpn2NMlMnTxaqmueOc2mFxHXBkxwlQ
ZoQQgw5uqO1d6tutrwzf25x14NA1kIgqK6ukzPDF2DA1kCj28SluppYONOxA
1mY8LLmIsKnwXyWf6sOi1u2iFqsNKZ2Z+y2DJ32EBvT8VnKD.ijmcKEfSwvW
J.BeIsV.Gz.Zs.XjOVLvdm45X608YRKSnE3kYFQcJo+dMJPVwmLqHu1acYqX
eaWt2U6jkEFi3MI26KSZJYUirrjm1wl195uD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c4L
l1Lj3lGqymVtIAqb8F75wNg5+j2tyeqyvg6wHsO1lzO40+1qer1mhjgvYFYD
pSFQ+apOB+cOUd0iVHiHWmhL5zVZ9h40sJWpGMa88upY95N5ZZPbMO6b.Re8
M7ss1ArQwtkmS.RWl1Bi2lLULEJo5kuUIK0y7e8C++AXxfzsF
-----------end_max5_patcher-----------

Yes, got it working!

It’s still a bit unclear as I mistook the sprintf classifyPoint entry JIT-labels %d as being where you set which drum you are training, but you’ve now made that “automatic”. So I guess this is where you set the max amount of labels you’re going to have?

I’m going through the patch now and stripping all the bits out so I can try training it on other drums and seeing the response time. On a quick initial test (testing center of snare, edge of snare, and hitting the rim), it worked well!

edit: (edit:)
This is the timing from the initial onset detection (fluid.ampslice~->edge~) to when a value is returned from fluid.knn~:
Screenshot 2020-04-27 at 2.48.46 pm

(I cleaned up the patch some and got to these numbers now, which are waaay faster for some reason):
Screenshot 2020-04-27 at 2.55.50 pm

So pretty damned fast! And not too much slop.

As an aside, is there a way to get a distance value returned for each match? so if I play between the center and the edge, I would get whichever label is most appropriate, but perhaps a number associated with how close it is between the two.

A small coding thing, doing the edge~->snapshot~ thing will sometimes return the previous frame (an issue I was having a while back), which @a.harker/@weefuzzy suggested the following as a fix for:


----------begin_max5_patcher----------
2864.3oc0bs0aaqaG+4jOEB94TCdQTjbuc5Nm0Ar1sCV6PwPwPfrEiiZjkLj
nSROGz9Ye7hjLkrjrThxklGRYIMk9e82+KjN+44msXU18hhEd+Euu3c1Y+44
mclYJ8DmU9+Oaw1v6WmDVX9XKRE2ks5qKtvtjTbuzL8NurqtpPHqVHNxLs5i
9FFtZxr8xDgT9scB6abwBu+W4R6BkquNNcyk4h0R6pPr+RvEd9P9x.meHTjZ
RldIDZIn9Ijteabp5waHSvgIsuTyrP2WlHujKKYyyVbUbh3VQdQbVpym9rEg
614L8YNaQKa9Zl4Awtndp3T6Tv5oxE2FWseb8rg4JVVp3284FAxh6C7Wb3wj
EIxS2GadR1I+94UjjQejFtUTrK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.i7C.7x6yOERNYQHOONrxvcmBGzo
YTuOTl48dcUnKls2egTb09jD4IOfk12aUFg.sM1N.Sw1u.BAJuqgNvK820Ep
4iFTmhutCBT17JTsLk7AcnQOvR0QLJyliBt1K.i3XN6kWdn+1k9Z56Kvc5t4
7soeVS.szxTCItTHo7SKOff9uHF3fwDHabecS5oghPNGXSKU4.3WdV6A.yeP
Abu2zs7m+03b4279sMYOH2Y6Wctd9Cjy4e+7+OfdefPB
-----------end_max5_patcher-----------

//////////////////////////

I look forward to hearing back from @groma and @weefuzzy with regards to the more ML-y questions, but I’ll add one more to that pile.

Is there a way to setup a centile-kind of rejection of outliers for training data? Say I’m training a region, hitting it like 50 times, and one of them I missed and hit the rim by mistake. Can I specify that the training is only done on the central 90% of the points, ignoring outliers?

And I found this from the documentation of the Sensory Percussion thing, in terms of how many hits to train each point on:

Center: 50-100
Edge: 50-100
Rimshot Center: 30-40
Rimshot Edge: 30-40
Rim Tip: 50-100
Rim Shoulder: 50-100
Cross Stick: (30-40)
Damped Edge: 50-100
Stickshot: 50-100
Shell: 30-40

So a fairly high amount of hits, although they do do that outlier rejection stuff, so some percentage of these would be presumably thrown out.

Aaaaand here’s a video of it working.

(I’m using the Sensory Percussion pickup for the onset detection (as per the other thread) 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

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

1 Like

This is very, very good (and very quick!) I’m trying to fish questions out of this thread

You can set as many labels as you want. You just give them names. In this patch I use 6 (because the pair ones are also labels) but if you don’t train with the pairs, you actually just use the 3 labels you have entered in the labelset. Does that make sense?

not yet but since we have kNearest and kNearestDist for the others, maybe we can. @weefuzzy and @groma will let us know…

again one for Owen I think.

was that in @blocking 2 ?

that will need to be tested since by doing an EQ you are biasing the spectrum, therefore the distance. but I’m very curious to see how it works…

p

In my patch (below) I’m just calling them 1/2/3 for simplicities sake. Still not sure what sprintf classifyPoint entry JIT-labels %d is doing. In your patch you loadmess 3 into it, which led me to believe it was for each of the labels.

Ah nice. Yeah that would be great as you could then “morph” between labels.

Nope, @blocking 1 as it was the default in the patch. I guess @blocking 2 would be better for this for real-time use(?).

On an initial test, using unfiltered audio (for the analysis, the onset detection had the pre-processing from before) it works but it was more prone to mislabelling. I imagine this require a bit of preprocessing as well to get the most out of the differentiation.


----------begin_max5_patcher----------
14220.3oc68k1iqijbfe989UvUXLvX20qPdmI2Ornmy165tsG3tMFXLyhBrj
XUONOUjZondGigqe6adPQwijWR7pTUEPqmZQQwHhLtyHi3+58ua08Qe0e+Jm
+mN+Em28t+q2+t2o+H0G7tz++2s5Iuutdq2d8WaU3gmt2O94U2Xt19fGUeL3
VP5GDrQ+0ht+u8AH432J5PxV+jjusy27nT2Vn21U23r5gsQdIqb9+l9MeHJL
YeveW+8fnre0mh1n+HTtuVn2S5Oa0uINP8aYtxNuj0eLH7w6h8WmXdZPDS9C
4v3B0+P0+OH4uc1CUhSAgR.be4GwCdq0OBvounAULeS0G9e+92qd4lNR9Rhd
7ws9qrPrvmvfXIlk3Gemen28aK..UHjAg4Hd1vcBRizBpFqIGe0NtCshmvy.
Oexe+duGyPzD+ulXP0c9gVvdQsbJMhcHpqdkEBU+Cl1sU1KG6B8+hDpqfb6e
PBZQwad1AYAGaUZnKXJWubxbmYLcmy8Gd3A+3813jAtMHLJ4GoJgPCaYKqX1
k6.4+08iSg9TvWJ3Fr0+yRPKHJLGO86V4saWtO9c4tEEN+2hz+Phax9nfPyG
Ay9nX+OGb79wYepWrDGSjH3gXi9nuxNtTmp4JN7PP1Bfl5mBRZ5rRO19coZZ
zKGGu7IplR+p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aX
DgAbSqmeNj1ZPHSi.ah2t1zClKYT+nWRjyOphBc0f872m3+vgsaSZcCVJW2p
BJEZRrMCywlCf.SJc0zFdoNqKb8Wkk4huJCBY0H6fhTIm0lFclgpiDbgwGEb
lT.F4hcEyO8P0UvWRmWfunxly25+dMATTKcLj3ThjTNMcCBpuPLvrtXHqaG2
jZRnHz0EXbKUJ.PR2qcF.fgEqa5Rxy+9f3ju47GdL5rDmMGctZFHvu++98++
gVPQXt
-----------end_max5_patcher-----------

the helpfile should help you a bit there - try my example learning to understand the workflow… the 3 is the number of nearest neighbours that the algorithm takes to find which class is more likely.

Blocking 2 is what I called JIT mode, and what was called Rod mode by someone else. Check the helpfile on multithreading it does clear comparisons and explain why it is better but not the default.

that was my guess. As I said, the preeq is in effect changing the MFCC curve (the spectral contour) which will emphasise differences in distance…

1 Like

Yup yup. Didn’t know if there was a specific reason it was in @blocking 1 for the example, but I’ve changed it to @rodmode engaged now.

Right. The helpfiles for these objects are suuuper spartan, so I didn’t think to recheck it for that. I guess this number will matter more once there are many more labels and entries, but for small(ish) numbers of things, the classifyPoint can be == to the amount of labels.

Indeed. For my general purpose use I’ll probably always use the double mic setup, but with how well all of this is working I want to put together a set of tools for working with that pickup natively in Max (and by extension, Live).

sorry I meant the ‘PA learning examples’ folder. We do not do helpfiles yet since examples are much simpler and fatter and therefore we can negotiate the interface design there with you (and with me learning it!)

It is better to be linked to the number of entries you have per label. For instance, I chose 3 in this file because I ask the user to enter 5 hits per class. Imagine the descriptor space, and each hit is somewhere, and we take the nearest K to decide which class it is. The PA-learning-examples folder makes this very graphical in 2D. MFCCs like this just take 96D but that is the same principle.

Heh, without text or context these make even less sense!

Ah right. This starts getting more brain-fucky, particularly since I’m not super clear on the vocabulary. If I’m training 3 different categories (labels?) and doing around 40-50 hits (points?) each, you’re suggesting that I do a classifyPoint of around 40-50?

Bah, I thought the titles would make them clear. But I can make them verbose if that helps :slight_smile:

it is called a classifier, so it finds classes :slight_smile: Each ‘label’ is a name you give to a class. You could not do that and instead use as for the nearest neighbour of each and code a name in the entry - this is just much simpler to be able to add a label to a given entry.

no, but to find the nearest 3 to 5 with 40 points of each give you a lot of nuances and should be less prone to misclassifying. Think of each of the 40-50 points showing the diversity fo what you are happy to group under one class name, and doing the same for each class give you a ‘turf’ in the descriptor space. When you query a new entry, you ask for the nearest K points. if you have 5 points, all saying it is CLASS-A or, at least 4/5 saying so, then you are confident you are in that ‘turf’

Am I clear-ish?

The names are pretty plain (“simple-1D-example”, etc…), but more when you open the patch I have no idea what messing with anything beyond the first two entries (typically an uzi and a fit message) is supposed to do. In some I see numbers moving, but what are they? Why are they? What am I manipulating? etc…

This kind of ML stuff is super opaque and even with verbose explanations, doesn’t make a lot of sense (unless you’re already comfortable with the concepts and, more importantly, the specific implementation of those concepts).

I’ll play with them some more, but really, I’m just moving random numbers around and trying to guess what I’m looking at, particularly since the individual objects don’t really have help files to speak of.

This makes more sense. So probably some kind of % of the total amount of entries would be a good place to start (say 144 points total, that’s ca. 4% of the total amount of points), or is that not a useful way of thinking about it?

ok I’ll try to document it better with a little paragraph for each number.

I would go for a few only personally, not a percentage, but this is where my experience is limited. @weefuzzy will be able to distil some knowledge for us here.

It would be handy for the next update, but for now I kind of understand what I need to understand in order to build some stuff. So unless it was on the horizon, it can wait.

1 Like

Aaaand for the sake of @weefuzzy and @groma here are all the pending questions from the thread consolidated.

The Sensory Percussion people suggest the following:

Center: 50-100
Edge: 50-100
Rimshot Center: 30-40
Rimshot Edge: 30-40
Rim Tip: 50-100
Rim Shoulder: 50-100
Cross Stick: (30-40)
Damped Edge: 50-100
Stickshot: 50-100
Shell: 30-40

This will be a selection of your least favourite genre of answer, i.e. variations on ‘it depends’. I’m afraid that this is always the answer with ML stuff, because everything ends up hinging on how the distribution of your data and the model you are using interact.

Bear in mind I’m still learning a lot of this stuff as we go, so @groma is (as always) the one with The Truth. Hopefully if I tell any lies below, he can step in and correct me.

It depends on the type and complexity of the model you are trying to train, and the dimensionality and condition of your data. Too little data and the model won’t learn useful things; too much and you can stand the risk of ‘over fitting’ to your training examples, and the thing won’t generalise.

For KNNs, the number of training points ideally to be significantly bigger than the 2dimensionality of the data, IIRC (i.e. what I learned from wikipedia at some point). In practice this might be over-egging, but certainly you probably want at least 10x as many training points as dimensions.

No, because it depends :laughing:

  • A greater number of dimensions makes the job of models much harder, not just in terms of the raw amount of computation that needs to get done, but very real difficulties can occur with, e.g., distance measures ceasing to give very meaningful results in many dimensions (because everything appears to be very far away).
  • By and large, the more dimensions your data have, the more training data you need (often exponentially more as the dimensions go up).
  • It’s not just the number of dimensions per se, but how usefully distinct they are: if you have dimensions that are strongly correlated, this isn’t much use (extra work, but no new information); if you have dimensions that contribute nothing useful to the distinctions you are interested in making (i.e. noise from the point of view of the ‘question’ being asked), then the model is actively hindered.
  • So it’s good to be parsimonious and think about how few dimensions we can get away with. Easier said than done though: quite often it would be good to be able to just throw things in and have the computer work out what’s relevant. This is where dimensionality reduction steps can come in useful prior to trying to do classification.
  • Different models will start to suffer at different points. KNNs could be ok into the low hundreds of dimensions (providing the training data is ‘good’ as above). KMeans will definitely struggle beyond low-tens of dimensions.

Not a priori – I think these have to be found empirically, because it will hinge on the size of the training data set (when using a KDTree KNN as I think we are here), and the dimensionality of the data.

  • Building a tree (which is what happens when we call fit) is much slower than querying: this is the point of the structure
  • The complexity of finding a single nearest neighbour to a point is dependent logarithmically on the size of the tree, which is good (i.e the query time rises but flattens off, rather than exploding)
  • The complexity of querying a range (i.e. asking for the K nearest points) depends also on the dimensionality: the larger it is, the more the complexity approaches being linear with the size of tree (so it doesn’t flatten like a logarithmic thing, but doesnt explose either).

So, the take home, especially if you’re interested in keeping things fast, is to see how little you can get away with. How few dimensions can adequetely be used to differentiate between classes, in this case?

1 Like

since I built the model on FluidCorpusMap, which takes 96 dimensions, low hanging fruit is to shrink that. It is quite simple:
I take MFCC coeffs 1 to 12 (dismissing 0 as it is mostly amplitude-driven)
I take min, max, mean, std of the direct and of the first derivative
12 * 8 = 96

so what I would try first is to shrink to an mfcc of 7 (taking 1 to 6) instead of the classic 13 (1 to 12)
then I would scrap min and max
that way, if that works you are now in 6 * 2 * 2 = 24 dimensions…

Another thing to try soon is to do dimension reduction from 96 so the algo finds redundancy itself, but that is right now in very progress (I’m trying to make examples with our new objects) so not there yet and not trivial either… so as @weefuzzy says… it depends :rofl:

1 Like