Hello everyone,
I would like to compare all the values in a list with a value of input and then decide which is the closest value and replace that value closer to the amount of input.
For example, I have a list <2, 10, 35> and have an input value of <12> I would like the list as output <2, 12, 35>. I'm almost getting, but the patch is so ugly that I will not show here, i'm sure there is a more elegant solution. Does anyone have an idea? tnx ;)
Hello
i don't know if it is much prettier than yours. But it seems to work. However, writing it dirrectly in C would be better/easier, i think.
left inlet takes a list and right inlet takes the value to compare (which can also be given as an argument).
If you send a list containing symbols they will be ignored but stay in their original positions on output (probably you would never do that anyway). If you send a bang you get a bang.
alabala