Re: [PD] list operation

2010-04-30 Thread cristiano figueiró
thanks for the answers, i will try all and post the results ;) On Tue, Apr 27, 2010 at 11:06 PM, Matt Barber wrote: > Ha ha, mine had a hilarious and totally unnecessary extra [list-map]. > That's what happens when you work hastily... how embarrassing; oh > well. > > MB > > On Tue, Apr 27, 2010

Re: [PD] list operation

2010-04-27 Thread Matt Barber
Ha ha, mine had a hilarious and totally unnecessary extra [list-map]. That's what happens when you work hastily... how embarrassing; oh well. MB On Tue, Apr 27, 2010 at 9:13 PM, Jack wrote: > True, so now it should be OK (patch attached). > I didn't think of this eventuality. > ++ > > Jack > > >

Re: [PD] list operation

2010-04-27 Thread Ben Baker-Smith
Ha. Probably should've looked at the others first, way better than mine. On Tue, Apr 27, 2010 at 7:48 PM, Ben Baker-Smith wrote: > This was a fun little problem. I haven't looked at the other > responses, but I whipped this up. Unlike some of the others, this > requires Pd-extended. > > -Ben > >>

Re: [PD] list operation

2010-04-27 Thread Jack
True, so now it should be OK (patch attached). I didn't think of this eventuality. ++ Jack Le mardi 27 avril 2010 à 20:50 -0400, Matt Barber a écrit : > One thing to watch out for; if you get two items in the list that are > equally as far as the test value, mine outputs one list with the valu

Re: [PD] list operation

2010-04-27 Thread Matt Barber
One thing to watch out for; if you get two items in the list that are equally as far as the test value, mine outputs one list with the value replacement at each appropriate index, while Jack's outputs several lists with the value replacement at only one index, but each replacement sequentially, if

Re: [PD] list operation

2010-04-27 Thread ypatios
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

Re: [PD] list operation

2010-04-27 Thread Jack
An alternative. Also full pure-pd. ++ Jack Le mardi 27 avril 2010 à 18:49 -0400, Matt Barber a écrit : > Try the attached (threw together using list-abs) -- right inlet is the > value (12 in your example) and left inlet is the list of floats; I > think this follows established list-abs syntax.

Re: [PD] list operation

2010-04-27 Thread Matt Barber
Try the attached (threw together using list-abs) -- right inlet is the value (12 in your example) and left inlet is the list of floats; I think this follows established list-abs syntax. It's possible that I overlooked a list-abs that already does this, and there is probably a step or two you could

[PD] list operation

2010-04-27 Thread cristiano figueiró
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