In seeing that loads of people seem to like fluid.bufnoveltyslice~
(@tremblap in APT and @jamesbradbury in his ReaComa stuff), it got me wanting to figure something out where it would be more temporally accurate once it found where the general slices were.
I like the idea of slicing via novelty, but having such slop in terms of when the onset was detected kind of kills it for me.
So what this patch does is use fluid.bufnoveltyslice~
(straight from the help file) to find the windows where novelty happened. I then iterate over those indices using something more (temporally) accurate (fluid.bufampslice~
).
The results with this simple test file are very promising!
----------begin_max5_patcher----------
3302.3oc6cssjhiiD8YpuBED6C6NKSE5huNOU69Ar+.yrQEFr.7TFaBaSWU2
SLy29pa1XajAYZYn5Mndn.7Mk4QoRk5jRx+wSyluL+CZ4bvu.9UvrY+wSylI
ND+.yT+d17cQerJMpTbYyWkuaGMqZ9B44pneTINd01jRP417CowfkT.8inUU
oeETskBJi1Qqu9jXwUmu72+YWX8AyNrKIKkVIJAzwClenp9nP0Q2GUsZaR1l
WKnqpjxMgfeFt.33Q3ef783efgOCA+W987mO8D+eK9N0unrnzu9MlhEsZKnr
JpnBrOOIqBrNuPnkozrMUaA4qE+58jr372AkIeqQ0SSxnqxOjIddjSwCm.6f
G9j.APD.e1k8gKTfN9WIdriVVFsgdBdD3BgOCBI7+iXkE+CW4u7DefQH1GZp
2cPZ0SrV8Dc45chqnB2Un0XLWOU2j74T808T4cLe9UAAYz2Yx8IHv2RAwzzn
U5rsIgiPGwCqitDGtVQBEppqmAp3B6qlaJxOrWiVh8rqVJMUcQSoVNj8LTi9
gbsikpWnz0jT+vg71k2PC0RZpNkiXmJOOegsIAJZF5AurxsLJai0MSq.KAI5
TS7H7pdF0zILrk6TWh4pYB2iuE0zeFfzomP6Xq5FfFosps0OQejzBcQLnUEc
0phNWzhEIaU5Yf6FtJtP40YBpQYtXSXZr15UG6zJs17U1JkGMvMuijJPJPmi
H61.0Unf7PObuGcUxhBTiJ5ao9IUsMkUhD+6Q+jhPeWWvBoG72PK.Rmbmnvd
VxYjLv.UKUDhbiCwaO32lulxDKPdVISb+s45h0aD1uWVWU8iF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RZw0qjlTsYAUzDyCjMpzbMnfbORQ
40WPPSzHhEZZ4ZZA8cicXCwNqTPWxsjUZXYBzgsPA4aRAAsg2OSZvZCMxDaA
GKUNWxTv2F.GzbfyxtXMpJq6E0aJVPbkLIHo4l327q6hr1CJ6li5qunMJBBm
NlK8fIWW46eHwGNAxsb.9utE1NjNynFagJNF0MiM54TTRWpkHxyVkD9RMHfm
qAgurlFoViEpAsG77MIRLGCr+kgt2aU7wK0dqdudqbuSW0dCuh85uZ8DYnnW
pUkZu9Tp1KCK+wSiIMpWWJTGa5SUIcYfL1zMaMsqtGJMo5U4QmZTqHVcH.Pu
fM5zdpKkm0IjZvTcdko47JSw40kdS8o1b3zZNPJMqybl9putsNLqVrcZKMv5
5RopbbVVRmLCrtbe5Oe5+APtLoEC
-----------end_max5_patcher-----------
At the moment it’s using some fairly generic settings for fluid.ampslice~
, but these can conceivably fail to return a value within the window of fluid.bufnoveltyslice~
. I thought about using @tremblap’s code which iterates over a threshold value with setTarget 1
, so it will find the right setting to return a single slice within the novelty window, but wanted to post this proof of concept first.
There can also be types of material which would return a slice in terms of novelty, but can fail to have a useful amp
-based threshold crossing (e.g. something with a soft/smooth attack), but for a lot of material something like this could work nicely.
I could see something like this being wrapped up in an abstraction as being very useful.