# Fluid.bufonsetslice broken in alpha08?

**URL:** https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233
**Category:** Bug Reports and Issues
**Created:** [June 16, 2019, 5:36pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233 "2019-06-16T17:36:04Z")
**Posts on this page:** 14
**Page:** 1

<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: [June 16, 2019, 5:36pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/1 "2019-06-16T17:36:05Z")

</div>

Breaking this out into its own thread as to not clog [the alpha08 release thread](https://discourse.flucoma.org/t/alpha08-the-last-alpha-before-the-beta/232/12).

When using the current version of `fluid.bufonsetslice~` (and potentially other `buf` slicers with the new changes in alpha08) values returned are incorrect in weird ways.

----------begin\_max5\_patcher----------  
1407.3oc2a0sbiZCE9Z6mBMbcpGIgP.8llK66PmNYvXYG1ECd.QRZ1YyydQ+  
PhyFrPNVBm1bgYrrLG88c9+P7OVtHXc8Sr1.vuC9KvhE+X4hExkDKrP+9EA6  
ydJuLqUtsf7586YU7faTeFm8DWtd3JPQUdcSCKmCZXsck71+XXWkEUr75tJ4  
Vw5EOzuq96TFunt5tQ2w15JdawyL4ZQqf5kq51W2wKYb4IBdzlqx1K2bvexJ  
efwKxyFNAGx342WTs6Nw4Sg2PHs+VBnQjUQ2.PIDw6h5WC72GcK2lkKukH8Z  
EajBnd829sHTvamnhpgCDRr1OWtT7xMWHqhWA3rVNnstqIuWQ8Ug5PgBxBgw  
xKJpKDcFTGz6TGZE3wlBNCTW0Jt8yBwDmjHnBbhxjBet7BI0Y7x5NNutJXT7  
MHY0R7+4.Sc7CVmUsK30C6X.LR5zDJQFlL75qekiwR7aDUSOIxYM2wpxVWxN  
lhuXbtm01lsi8A8ed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DWHI5rIo34RR1.IWnkPykbfyjfv1HGjKr  
Ef13Ho81tbIAsQRWLlvmgjbbXe7YPmWCQGOtnQy.gG6kjc135G5DWRqxnCcg  
jhtZ1uRQecresC0dwHxNT6EWG6DMcbQimABm5i5D+kpOOgnibfuTpM05PbQy  
c1.oHuzamMRlP8g0q3whLo0q77coUOPBsI5qSTj1jLa33bY4tDGW7TdANI2k  
UXxErG1pt8cQKfHaZtffckjPmcLD0joxNb3AVSqdyRYDrO6a0RuujajusnR8  
V4nsCZXOTLrepbkrl76K3rbdWi52IyST0HgC1W26GW0Unck6QWuHkS0S7apo  
8f9mAib3eK+4x+EvQlU4b  
-----------end\_max5\_patcher-----------

---

<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: [June 16, 2019, 5:41pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/2 "2019-06-16T17:41:17Z")

</div>

Also, even the one(s) that are correct, are off by a value greater than the hopsize.

So if you send the `source onesample` message, you get `4672` as the returned position, which is way more samples off than the current analysis hopsize (in this case, `32`).

When you run the other examples (`source twosamples`, `source threesamples`) you get values that are similar in amount of ‘offness’ (between 320 and 328 samples off).

I would have expected +/- the hopsize as the window of accuracy here.

Is this the expected behavior?

---

<div class="post-metadata">

### Author: ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)
#### Post date: [June 16, 2019, 5:43pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/3 "2019-06-16T17:43:03Z")

</div>

We’re investigating. Diracs are test signals so bad in certain ways, and good in others. The multiple similar values reported is definitely a bug. the early reporting by more than one window is complicated (filter size vs threshold)

---

<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: [June 16, 2019, 5:51pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/4 "2019-06-16T17:51:59Z")

</div>

> [@tremblap](#):
>
> the early reporting by more than one window is complicated (filter size vs threshold)

Yeah that was my concern there. Like if using this to take files that have known transients in them, but just need trimming up at the start.

---

<div class="post-metadata">

### Author: ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)
#### Post date: [June 16, 2019, 6:11pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/5 "2019-06-16T18:11:57Z")

</div>

btw did you try the didactic patch in the helpfile? It does the same task but rightly, so we are working hard to see why it works in one setting and not in the other!

---

<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: [June 16, 2019, 6:14pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/6 "2019-06-16T18:14:30Z")

</div>

(I will test it shortly. My laptop is presently sweating its way through the 3k+ sample library now that [the memory hole](https://discourse.flucoma.org/t/memory-hole-problem/226/19) is fixed!)

---

<div class="post-metadata">

### Author: ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)
#### Post date: [June 16, 2019, 6:18pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/7 "2019-06-16T18:18:13Z")

</div>

@jamesbradbury might have some CLI magic for such batch processing (now that the code gives parity results between CCEs)

---

<div class="post-metadata">

### Author: ![jamesbradbury](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/jamesbradbury/32/1252_2.png) [@jamesbradbury](https://discourse.flucoma.org/u/jamesbradbury)
#### Post date: [June 16, 2019, 6:38pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/8 "2019-06-16T18:38:51Z")

</div>

Let me show you CLI scripts in Python…🙂 No more of this single threaded slowness!

I am working on stripping redundant files out of a 25000 file database and I’m very happy to be not doing it in Max land.

---

<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: [June 16, 2019, 7:51pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/9 "2019-06-16T19:51:08Z")

</div>

I’ve got a `deferlow` loop going, so it isn’t jamming up the main thread, but I just didn’t want to open/close other patches and risk a crash 50% through a long process.

But yeah, testing the help file it all works fine (though again, always seemingly more than a `hop` out, but I could just be misunderstanding what is supposed to be happening here). The settings for `threshold` and such are different, so perhaps it works better in those circumstances/settings where as my example is a bit more brutal/plain.

From what it looks like, even if a (non-digital silence) “faux” onset is detected at 0., it will still actually trigger an onset regardless of the `minslicelength` setting.

---

<div class="post-metadata">

### Author: ![weefuzzy](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/weefuzzy/32/362_2.png) [@weefuzzy](https://discourse.flucoma.org/u/weefuzzy)
#### Post date: [June 16, 2019, 11:18pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/10 "2019-06-16T23:18:07Z")

</div>

> [@rodrigo.constanzo](#):
>
> When using the current version of `fluid.bufonsetslice~` (and potentially other `buf` slicers with the new changes in alpha08) values returned are incorrect in weird ways.

I think the problem in this patch (accuracy of detected spikes notwithstanding) is that your uzi is counting from 1 not 0, hence you’re not seeing the correct values. Change `uzi` in the patch for `uzi 0 0` and all is well (?)

---

<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: [June 17, 2019, 12:41am UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/11 "2019-06-17T00:41:00Z")

</div>

Indeed. That sorts that bit out, and also explains the doubled values.

There is still the accuracy issue with a tiny hop size seeming too big.

Also, it does look like having an onset that falls within the `minslicelength` does in fact lock out the first “real” onset (even with digital silence at the start).

Look at the `source onesample` version of it with a much earlier first onset:

```

----------begin_max5_patcher----------
1386.3ocyasrbihCEcs8WgJV61kdg.lMSVN+CS0UWXrri5FCt.QRlzUmu8Aj
.GmXvVDjHIKLExBNbtuuWh+8xEdaxehW5A9Kv+BVr32KWrPsTyBKZOeg2g3m
RRiKUayKI+vAdlzak96j7mjp0IqAhrj7hBdhDTvKqRkk+c2tREY7j7pL0Vws
KdLVlbuHa+OZtD8i.AxVCWAX9z09q.nPZyY90qA9d6EsKOSlEefqv7e3oOvk
hjXuy91cwIpuE0tVV0AQVJWVd9hhspaP9le9Mej2q6LuR1sU3Y2yRwyp6I1e
MrY0+rbYyGqlnLCuFH4kRPYdUQRsZ3JBFDoQTfvX0AsfgfbqfA9oIXPqAOVH
jbPdVYCpCKXBBCaDE3PsACdFjKzHmKW1TIk4YcvnwP9eG4ZN6sINau2IF1mT
wW4GQThCLs6ySWRuT7XbQsbRxK9AOKdSJ+bNcN8C5m9nO.OOvKKi2yuP+mjx
iKRyebPIfQrmo7Y7Ue133zO8w8PQj8nXF+w5a4ELLMOdqRMNUcbfNFY30IYO
lwjHmSRIXCH85Lb0Mzknv.EyfTchgF27wQyv9oI1hlq532.48EbdY7giouFK
ebVtsrEwzg4wvQa5RlAuyN59XtUHKVe.gFOYYyFYyyZ0rShqQJNhfAimp91i
pSM6BBhfmUMhkyufmi3RnZRz72fBAQSUI5CFIJB5hOM5vvP6EeZpJ1vPe2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OH51OSsRbQx8BIOQVUn
+oq7DSOTXuC40TLqRzJfqoWMjpo507ybo7X6ulE0v+V9mk+e0dOFM
-----------end_max5_patcher-----------

```

---

<div class="post-metadata">

### Author: ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)
#### Post date: [June 18, 2019, 9:19pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/12 "2019-06-18T21:19:03Z")

</div>

you have, my friend, found something dirty in the closet… a very specific case but @weefuzzy is on the case!

---

<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: [June 27, 2019, 8:17pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/13 "2019-06-27T20:17:05Z")

</div>

Any news/info on the dirty clothes in the closet here?

---

<div class="post-metadata">

### Author: ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)
#### Post date: [June 28, 2019, 1:41pm UTC](https://discourse.flucoma.org/t/fluid-bufonsetslice-broken-in-alpha08/233/14 "2019-06-28T13:41:39Z")

</div>

Still working on it. Nothing to be worried about except for the first hopSize or two, so you can still use the tools. It is just a little complicated to explain here.
