Sift (Value) filter index wrong

if the filter values are not sorted, the index output is wrong:

sift_bug.v4p (4.8 kB)

hi tonfilm,

hm, can’t confirm your bugreport. you’re looking for the values (12, 245, 23, 55). “input index” tells you at what position one of your values were found in the input spread -> (0, 1, 3, 4), which is correct.
if you need to know which of your filter values created a hit, have a look at the “filter index” pin (2, 3, 1, 0), so filter value 2 was found at position 0, 3 at pos 1, 1 at pos 3 and 0 at pos 4.

ah, sorry for coming back so late to it.

ok, i understand the pins now. but then it would still be an improvement to order the slices that they correspond to the input slices, because almost every node does that and every patcher somehow expects that the slice order stays.

if the slices of the filter index are ordered, then you would need the second pin only in case when find mode is set to ‘all’ and there are multiple hits, or not all filter values are found. in any other case it could be like this:

but there might be are more important things to do…

sift_improvement.v4p (7.2 kB)