Page 1 of 1

Posted: 08 Sep 2010, 22:33
by ethnix73
Is there anyway to smooth the values of an array?

From a set of value A to a set of value B for example....

Posted: 08 Sep 2010, 22:48
by bsork
Use whatever you want that generates a value X between 0 and 1, multiply array A with X and array B with (1-X), then add the outputs.

Posted: 08 Sep 2010, 23:30
by 23fx23
any ideas how to make by script or patch something that would smooth 'over steps', mean not morph between two sets but

ie if a 16 step as first step 1 and all other 0 the smooth result would be a ramp down where step 1 is 0,8, 2 is 0,7, 3is 0,6 ect..

kind of the beavior of smooth module but instead of being related to time can be applied to a static array,
steps orders acting as time, dk if im clear. ie transform some spikes contrasted cloud array to round more sined..?
'blur' the array... a square wavform becoming a rounded triangle..
i fail a bit to visualise the approach..

Posted: 08 Sep 2010, 23:38
by ethnix73
Thanks bsork!

With the new vst params parameter, we can morph between two vst presets. I didn't noticed it!
Will try to make a little patch....

Posted: 09 Sep 2010, 01:09
by bsork
@23fx23: What you describe looks to me like something you would get by rounding the intermediate values - at least if you consider the steps to be of equal "size". If that's the case, some simple integer math will do the trick:

Assuming input and outputs values between 0 and 1: output = round(input * 100 / number_of_steps) * current_step / 100

Posted: 09 Sep 2010, 02:24
by 23fx23
thans a lot master bsork, gonna try this.