Page 1 of 1

Posted: 09 Jan 2019, 17:13
by lytz1
Hey all,

is it possible to delete a duplicate in an array?

(i.e. 16, 35, 35,48 to 16, 35, 48)

Couldn't solve this, any ideas?



Thanks,

tL.

Posted: 09 Jan 2019, 17:28
by oli_lab
can be done with a script
or
a user module

what do you want to use it for ?

Posted: 09 Jan 2019, 21:04
by lytz1
I need it to delete duplicate numbers that get queued to an array which indices
shouldn't receive the same number more than once. So that every index has a unique number.

Because a semi random setup is feeding the matrix, duplicate numbers happen which leads to subpar output. That's why I am asking.

Posted: 09 Jan 2019, 21:15
by 23fx23
maybe rather than processing the array you can check if incoming value is in array , and let it pass to be queued only if its not.
ie use A=B, to check if incoming value A match array (B). use a sum array, if sum>0 then that mean the value is already in array, so can ie stop the floa before the queue.

Posted: 10 Jan 2019, 12:47
by lytz1
This is a good idea, thanks.

Oli: Wouldn't this idea be even more flexible with your "array Value Match" module?

EDIT: Yes, works very good with that module! Stops flow to queue if incoming number is any of the numbers
already present in array.

Posted: 10 Jan 2019, 16:04
by x.iso
There's also Oli_lab's module Random bag in add-ons, which can help with that kind of 'random-no-repeat' stream.

Posted: 12 Jan 2019, 02:46
by oli_lab
try the random bag V2 user module from the oli_lab addon

it shuffle a suite of numbers at random with no duplicate.

Posted: 13 Jan 2019, 15:43
by lytz1
Thanks Oli. Very cool stuff.

Posted: 14 Jan 2019, 22:40
by oli_lab
Hi !
I did this module.

http://www.sensomusic.org/forums/uploads.php?file=Oli_Lab_arrayNoDuplicate.zip

before I start the mac mini, it's win64 only...

with few fun options :
mode :
on change = when a new array is received, each value is tested against the values already present inside the memory
button = when a button is receivedon the "enter" input, each value is tested against the values already present inside the memory

max size : set the max size of the output array, if this value is less than the size of the output array, the array is truncated.

enjoy !

Posted: 14 Jan 2019, 23:33
by lytz1
Awesome, thanks a lot! This is USEFUL... ;)

Windows is fine with me now. I have Mac and Windows running, working in windows the most lately.
HH3 just runs far better here.


Best,
tL.