Problems batch slicing with fluid.bufampgate~

Hello guys :slight_smile:
I’m trying to build an audio sample classifier using flucomas tools. The first part of the process should be slicing the samples looking for silences within them. I managed to find some settings that works for me using bufampgate~. The problem I’m having is that when trying to load a group/folder of samples inside polybuffer~ or buffer~ (changing the file at every end of analysis), fluid.bufampgate~ randomly gives me onsets/offsets values which aren’t there. Here’s an example:


----------begin_max5_patcher----------
2008.3oc2Z82ahijD8uyHMeGZgtSZOIVecU8uWcmz783zoHCXHdFhMx1LS1a
0Me1uWaGxDRLDCwvbZ0jACMFWc8bUupdE7Ge7C2LYV4CY0SD+l3eIt4l+.qb
S6ZwUtY2B2L49zGluNst8DmLu796yJZlL8w2rI6gl12nnrPj8PdcCdWQYQcV
S8eub4x3QQZin4tLQcSZUi3WVlWUiE9VoX45xzl5+1SWr04EYyK2VzdE4cqt
oJqFWzzl7xha26TzOcJoMyuKuX0sUYya5bHmOgMNiRydmW5zR0TgM3SjRkgI
mSxJu2YmJHCmnUFbFAsywJkOLUnzIRw+d2kuX684EqgmDuzzyVsbaytkk6VN
eQKdTN6y+Jqmzt3+8ieHdDGl99A5prz0u.fmbDbfrV3dZozvd1YrNcDHb5d.
BoKAKEzTvG+m0ySErbT.B04CD2mUWmtJ60.gLQnjZNAa7fSEOHYY.G8NimRD
riTRrtxp7VShPqMDwIGCrXEmXCJfSrxXTRWfNPTihAr5jFOGrrTYIEfUlOHX
w8CVOggcq076ax51ISl7iKzy.R5R.jiH94BIRx5kJmU4zZNvGHXi8xDJBfZM
x3X1p3qB9QW.7KDj9HL4nXvHaTg3QiSw.8XsQYrsnow7bz6frZj7HHrkbfWC
2mHsRJsFY3Poyr0kXaQXqiYMwDcMPX+kISGtFv3yCoeMJZbbhO.LzR.ujVvi
bn7bXI40.2dGkJJx9FtBuF11Tk+rBH8ACZ3wnl.GBNxa7AJ5wHXxyRqGfC4.
yPjYS8VnvITLPeAb0FwLw5iVFzniYC3u.tuaAUFpxaXcBoz9fk79.pL5gOFR
LmimxG798rzh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Esy3T1.aQsq3PTzASrIOxhvLjlgxVwocYrIs7RFur6q.U+RDHeUQ
Itzqym+kWFd0SP2WJJmUeWZGBr2pyKWWV0s+jwQy+iG1arNYqyhee46c1pX4
WJd1pX2X53yZeX+aTmrvk57+S29LQNDJiYq1aWIm9rG1yGZGtGtRa11r2l44
oUgelSHu2lZ5M.4ZNgb6O4Aj2OpzKSwUb.4l+jOF39av1RPndPGy7sdqwGEe
F6bfvBFlcgnvTOcsFJr5U70cmVqa9xe5UsNY7Mdw8l5xsUy2YqcyKC7G+vhK
xpaxKZ+sD77SyzcVGNNX3VzLDCBInikAgTSA8V1SoGOGTNHDUNhPpLZR9sM4
nYQ2fbwv9mUYUrogmZJ6ZrCX8A1BzHrErCJPVMZf9fRbril4zChYP4GWCRCx
fz3XP401CkCxCoQyf616G2fgQzftg3gtw0duoCNdTsJ8f3cFO6QCJDc7.TlG
hA4Qr7LMLl7wiGkGTZudD6HXPUJ3wKpI9skOXPkFISNrLiW.E2muXSYdQyiM
vxFeh5Uee6dCTcK0Fe7Get16Bcxejrza8ZoQ5zZyvOOB5od03QAVfO7KF+0q
OwQpeMyvt83FwVD4g0Upbj6JcvQDilEoAYQdbr3fRr4d8vGkuktYyWyppe7i
zYJng9ycS4wOs604Ecutar7Spx9Z9tOR2H4mjVAYsMPS61p1c3jGr5IO9oKQ
WuEay203azYiltUldQ58Y0aR6bqV47e7C3D9eHScYk.
-----------end_max5_patcher-----------

I would use blocking 0 thru all the process as this is thought to be a batch processing tool. The goal is to have a dict that has all the necessary informations about a soundfile so that i can recoll them in other patches. How can I solve this? Am I missing something? Any advice will be appreciated! :slight_smile:

Hello

the patch looks ok, so without the soundfile it is a bit hard to see if the algo is actually imagining or if there is something in the file that triggers it… so first can you check that the same file in a normal buffer is doing the same slices everytime (in non batchmode) so you can remove your code loop out of the equation. if that is consistently adding a slice, please send me a test file so I can investigate.

thanks

p

Hello @tremblap :slight_smile: thank you for replying
In the patch I’ve pasted there’s a part on the right which uses a single buffer to analyse the slices (the one with the single buffer~ named “src”) .
I’ve used it to check if it had the same problem as the looping one. Manually loading the same sample inside the buffer gives no problems, while replacing it with a different one gives the same issue as the polybuffer~ algorithm (all of this happens in all blocking modes).

Here’s two samples files I’m using to test the patch:
test audio files.zip (5.1 MB)

Try to load “audio test 1.wav”, replace it with “audio test 2.wav” and then load “audio test 1.wav” again. In the console it will show the fake slices on “audio test 1.wav” when loaded the second time.
(Of course in the algorithm I’m not loading the same sample twice, this is just for example, it happens the same thing also when loading different samples)

wow, this is strange. I can confirm that this happen. I cannot confirm if that is a FluCoMa or Max issue yet though. I’m trying to reproduce in Pd (same code on our side)…

ok I can reproduce in Pd… so it is our error. I suspect a problem with the reinitialisation of the filter between iterations (which won’t happen in SC because it is a new object every call)

ok fixed, that was a great catch and opens a cool can of worm that I need to investigate a bit further

ok the fix has been approved by the people who really know what to do so it is compiling - you can download the ‘nightly build’ to get that fix now, or wait for the next release in the next weeks - I’m long overdue!

@rodrigo.constanzo that might solve a problem you had no?

Ooh that weird fluid.bufampslice~ infinite envelope thing?

Will give this a test and report back.

edit:

Does not fix that specific issue (and still doesn’t catch the first onset in a buffer).