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
Ruby redraw?
3 posts
• Page 1 of 1
Ruby redraw?
Hi all, can someone tell me how to make Ruby Redraw?
The only method I have seen which counteracts fl studio glitching bg's and graphics is by using the bitmap animated frame method like with sliders.
That's possible too I guess. the BG could be made two frames and when editor is open it could automatically cycle simple. But I was wondering does someone know How to translate trigger events to a ruby redraw for the sake of experimentation?
Thanks alot,
Robert
The only method I have seen which counteracts fl studio glitching bg's and graphics is by using the bitmap animated frame method like with sliders.
That's possible too I guess. the BG could be made two frames and when editor is open it could automatically cycle simple. But I was wondering does someone know How to translate trigger events to a ruby redraw for the sake of experimentation?
Thanks alot,
Robert
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
Re: Ruby redraw?
There are two different ways that you could force a Ruby GUI redraw.
1) Add a trigger input to the Ruby primitive. In the 'event' method, test for the input ID of this input, and when it is triggered call the Ruby redraw method (the input value can be ignored for trigger inputs.) If no argument is given, the redraw method assumes that the GUI input will be the first one; if not, supply the method with a numeric index for the correct input; e.g. redraw(1).
2) Place a Redraw primitive in the RubyEdit prim's yellow GUI link and trigger it as you would normally - this will force an "implicit" redraw where the draw method gets called without going via the event method. In general, RubyEdits will implicitly be redrawn if they overlap some other component which gets redrawn (a Ruby background behind a primitive control, for example.)
To check whether redraws are happening as expected when I'm prototyping, I quite often use an instance variable counter that's incremented and sent to a dummy integer output within the 'draw' method - it can be surprising how often RubyEdit GUIs get redrawn without the Ruby code explicitly asking for it.
1) Add a trigger input to the Ruby primitive. In the 'event' method, test for the input ID of this input, and when it is triggered call the Ruby redraw method (the input value can be ignored for trigger inputs.) If no argument is given, the redraw method assumes that the GUI input will be the first one; if not, supply the method with a numeric index for the correct input; e.g. redraw(1).
2) Place a Redraw primitive in the RubyEdit prim's yellow GUI link and trigger it as you would normally - this will force an "implicit" redraw where the draw method gets called without going via the event method. In general, RubyEdits will implicitly be redrawn if they overlap some other component which gets redrawn (a Ruby background behind a primitive control, for example.)
To check whether redraws are happening as expected when I'm prototyping, I quite often use an instance variable counter that's incremented and sent to a dummy integer output within the 'draw' method - it can be surprising how often RubyEdit GUIs get redrawn without the Ruby code explicitly asking for it.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Ruby redraw?
Thanks, printing the page as a pdf. I appreciate that Trogluddite
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 102 guests