Draw Wave Min/max Control issue

For general discussion related FlowStone
Post Reply
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Draw Wave Min/max Control issue

Post 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.... :x :x
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....
Draw wave min_max.fsm
(5.59 KiB) Downloaded 1012 times
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Draw Wave Min/max Control issue

Post 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
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Draw Wave Min/max Control issue

Post 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
ScreenShot300.png (12.16 KiB) Viewed 16477 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.......


.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Draw Wave Min/max Control issue

Post by Nubeat7 »

you don`t need event..

and sure, dont send the modified values to the graphics just send them towhere you need them
Attachments
Draw wave min_max.fsm
(5.89 KiB) Downloaded 967 times
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Draw Wave Min/max Control issue

Post by Nubeat7 »

here you keep the original array untouched, i wrote a little class array methode for easy use of the methode
Draw wave min_max_methode.fsm
(6.21 KiB) Downloaded 1043 times


edit: maybe the methode should better be named "set_to_range"
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Draw Wave Min/max Control issue

Post 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...
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Draw Wave Min/max Control issue

Post 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 ...
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Draw Wave Min/max Control issue

Post 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
Post Reply