Page 1 of 1
Draw Wave Min/max Control issue
Posted: Sat Oct 19, 2013 3:13 am
by billv
I'm having trouble getting control of min/max ranges for the Draw wave......
That green section in Draw wave is still too tricky for me....
When I built my first matrix trigger that green section done my head in...
....nothings changed...
Have made a clear fsm to show the issue....
Re: Draw Wave Min/max Control issue
Posted: Sat Oct 19, 2013 6:46 pm
by Nubeat7
billv wrote:I'm having trouble getting control of min/max ranges for the Draw wave......
would be another cool oneliner in ruby:
Code: Select all
#inputs: @arrayIn, @min, @max
output 0, @inArray.map!{|item|[[item,@min].max,@max].min}
#do anything with item between |item|......}
note here you just limit the values to max and min!
there you would change the range:
Code: Select all
#inputs: @arrayIn, @min, @max
output 0, @inArray.map!{|item|item*@max-@min+@min}
#do anything with item between |item|......}
also note, when you directly return the modified arrayvalues, you need to use the "!" after map, in this case the original array was modified (destructive)
if you put the modified values into a new array u can use just "map" with out the "!" so the original array stays untouched
Re: Draw Wave Min/max Control issue
Posted: Sat Oct 19, 2013 9:24 pm
by billv
Thanks nubeat7....but i keep getting method error for map!...
changing code from
'@inArray.map!' ...to.
'@arrayIn.map!' didn't work also...

- ScreenShot300.png (12.16 KiB) Viewed 16471 times
Writing the min max part will be ok, the problem is that the min/max parameters
are tied to the graphics, so it becomes a lot more complicated....
Probably scrap the idea.......
.
Re: Draw Wave Min/max Control issue
Posted: Sat Oct 19, 2013 9:47 pm
by Nubeat7
you don`t need event..
and sure, dont send the modified values to the graphics just send them towhere you need them
Re: Draw Wave Min/max Control issue
Posted: Sat Oct 19, 2013 10:10 pm
by Nubeat7
here you keep the original array untouched, i wrote a little class array methode for easy use of the methode
edit: maybe the methode should better be named "set_to_range"
Re: Draw Wave Min/max Control issue
Posted: Sat Oct 19, 2013 11:06 pm
by billv
taking a look now......
This mod is for the "Array tool" i made....
Will upload to examples so you can see the whole thing...
Re: Draw Wave Min/max Control issue
Posted: Sun Oct 20, 2013 8:11 am
by billv
Nubeat7 wrote:you don`t need event..
Yeh..it goes...i figure the error was using string array input instead of float array?
...controlling min/max either side of draw module is not a issue for this circuit....
Need to control the draw module min/max parameters directly...
I don't think this mod can happen otherwise ...
Re: Draw Wave Min/max Control issue
Posted: Sun Oct 20, 2013 2:12 pm
by Nubeat7
billv wrote:Need to control the draw module min/max parameters directly...
if you want to change the draw min/max you can use "range" inside the properties of the wavedraw module, but when bigger than 1 you will draw outside viewrange