Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

found bug in Slider Vertical (ruby)

For general discussion related FlowStone

found bug in Slider Vertical (ruby)

Postby Walter Sommerfeld » Sun Feb 15, 2015 2:02 am

dunno if it's already known:

If u try to use the set input as a remote one:
if u feed it with 0.2 the output shows 0.8 aso...

solution:
Code: Select all
def event i,v
   if i==2
      @value = [0,1-v,1].sort[1]
      output 1-@value # was wrong: only @value (missing the 1-)
   end
end


The Horizontal one is O.K.
User avatar
Walter Sommerfeld
 
Posts: 249
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany

Re: found bug in Slider Vertical (ruby)

Postby billv » Sun Feb 15, 2015 5:47 am

Yeh..it's real wierd in there Walter... :lol: ..don't understand the FS code fully,
but anyway, here's a quick fix...(look in the def event..)
Seems ok....the other guys might come up with better solution ....
PS.(Dont' forget to report the issue if the ruby gurus see it as a bug.)
slider_vertical_fix.fsm
(214.58 KiB) Downloaded 767 times
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: found bug in Slider Vertical (ruby)

Postby Nubeat7 » Sun Feb 15, 2015 9:27 am

the output should be without -1!
so it outputs what its input, if you do 1- value it outputs an inverted 0..1 value...
(to do it right do the output first and then do the sorting which inverts the value for drawing)

but this wouldn't arrive the output of the slider anyway, because it is locked by the interaction boolean!
the set input is only for drawing the slider so the output is not needed (don't know why it is here!?)

so set it from outside in the presetparameter part, use a last switch right before the value input of the presetparameter primitive (like the midi cc)

the 1- value is only for the drawing and setting with the mouse because 0 is at the top while in a slider 0 should be at the bottom

here is like i do it normally, no need to set the interaction boolean to true like billy is doing it - if you do it this way you need to set it back to false also! because other wise it wouldn't draw the the slider on programchanges
Attachments
slider.fsm
(11.45 KiB) Downloaded 779 times
Last edited by Nubeat7 on Sun Feb 15, 2015 9:46 am, edited 1 time in total.
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: found bug in Slider Vertical (ruby)

Postby billv » Sun Feb 15, 2015 10:40 am

Nubeat7 wrote:set it from outside in the presetparameter part

yeh..thats right...we are setting it from the wrong place. thanks nubeat7
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: found bug in Slider Vertical (ruby)

Postby Walter Sommerfeld » Mon Feb 16, 2015 11:10 pm

Thanks for your versions guys...

my little mod works 4 me because i don't use the preset manager... ;)

cheers!
Walter
User avatar
Walter Sommerfeld
 
Posts: 249
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany

Re: found bug in Slider Vertical (ruby)

Postby RJHollins » Wed Feb 18, 2015 3:13 am

Testing the NuBeat vertical slider [fix] ...

Still playing with it ... but a question.

The DEFAULT resetting. The value is set to 0.125, but there doesn't seem to be a way [mouse/key combo] that returns the slider to a default position.

This is a function feature that is important ... at least in my projects.

Just wanted to mention.

Thanks
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: found bug in Slider Vertical (ruby)

Postby Nubeat7 » Wed Feb 18, 2015 9:26 am

@Rj Hollins

i normally use doubleclick for it..
create a "default" input and add:
Code: Select all
def mouseLDouble x,y
    @value = 1-@default
    output 0,@default
end


or for key holding change the mouse capture methode:

Code: Select all
def mouseMoveCaptured x,y
    if isKeyPressed "CTRL"
      @value = 1-@default
      output 0,@default
      output 1,true
      redraw
    else
     sensitivity = ((isKeyPressed "SHIFT") ? 10:1) * @sensitivity
     @value -= (@downY-y)/sensitivity
     @downY = y
     @value = [[@value,1.0].min,0.0].max
     output 0,1-@value
     output 1,true
     redraw
   end
end
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: found bug in Slider Vertical (ruby)

Postby RJHollins » Wed Feb 18, 2015 5:22 pm

Once again, saves the day ... Thank-you NuBeat :D

I'll add in the code for the [CNTRL-click], as that has somehow become a standard in many of the
plugins I use. Want to stay consistent with my little works.

Thanks!

8-)
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: found bug in Slider Vertical (ruby)

Postby RJHollins » Thu Feb 19, 2015 7:24 am

hmm ... I'm getting RUBY errors using the '... for key holding change the mouse capture methode:'

will try again :|
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: found bug in Slider Vertical (ruby)

Postby Nubeat7 » Thu Feb 19, 2015 9:02 am

works here with FS 3.06
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna


Return to General

Who is online

Users browsing this forum: No registered users and 60 guests