Re: [PD] weighted average (or ?)

2010-06-19 Thread Frank Barknecht
On Wed, Jun 16, 2010 at 01:25:09PM +0200, João Pais wrote: I was going to program something, but wanted to see if someone hasn't done it before. I needed a weighted average (probably the name is incorrect, I just made it up), that is: considering an x number of sliders going from 0 to 1, the

Re: [PD] weighted average (or ?)

2010-06-16 Thread Funs Seelen
Hey Joao, Connect all the sliders to a [+ ] object and then divide the single output of every slider by that sum (output of [+ ]). You'd probably need a [trigger f f] directly under each slider. Is that an answer to what you asked for? If it's an additive synth you're builiding you don't want to

Re: [PD] weighted average (or ?)

2010-06-16 Thread tim vets
attached is a possible solution the logic is: add the values of 4 sliders divide 1 by that sum multiply all slider values by that number gr, Tim 2010/6/16 Funs Seelen funssee...@gmail.com Hey Joao, Connect all the sliders to a [+ ] object and then divide the single output of every slider by

Re: [PD] weighted average (or ?)

2010-06-16 Thread tim vets
sorry, the attachment was 0kb, my harddisk was full... see this attachment gr, Tim 2010/6/16 tim vets timv...@gmail.com attached is a possible solution the logic is: add the values of 4 sliders divide 1 by that sum multiply all slider values by that number gr, Tim 2010/6/16 Funs

Re: [PD] weighted average (or ?)

2010-06-16 Thread Funs Seelen
x / y or x * (1 / y) What's the difference? Funs ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list

Re: [PD] weighted average (or ?)

2010-06-16 Thread tim vets
Ah right, an unnecessary step ofcourse. but I do find it easier to understand that way, and you can adapt that '1' to the desired sum directly... Tim 2010/6/16 Funs Seelen funssee...@gmail.com x / y or x * (1 / y) What's the difference? Funs ___

Re: [PD] weighted average (or ?)

2010-06-16 Thread Mathieu Bouchard
On Wed, 16 Jun 2010, João Pais wrote: I was going to program something, but wanted to see if someone hasn't done it before. I needed a weighted average (probably the name is incorrect, I just made it up), that is: considering an x number of sliders going from 0 to 1, the sum of all sliders

Re: [PD] weighted average (or ?)

2010-06-16 Thread João Pais
I just opened it and slided around. thanks, that seems to be it. I guess it's easier to program if the control sliders are separated from the result ones. the top limit of the control sliders can be higher (for more radical results), but I can improve that. thanks, that saved me a couple

Re: [PD] weighted average (or ?)

2010-06-16 Thread Mathieu Bouchard
On Wed, 16 Jun 2010, Funs Seelen wrote: x / y or x * (1 / y) What's the difference? Funs There is a slight difference. It should stay well below a millionth of the result (0,0001 %) but I haven't made a theoretical measurement so I can't guarantee it. It's due to rounding numbers. If y is a