Ruby redraw?

For general discussion related FlowStone
Post Reply
User avatar
wlangfor@uoguelph.ca
Posts: 912
Joined: Tue Apr 03, 2018 5:50 pm
Location: North Bay, Ontario, Canada
Contact:

Ruby redraw?

Post by wlangfor@uoguelph.ca »

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

Image
My youtube channel: DSPplug
My Websites: www.dspplug.com KVRaudio flowstone products
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Ruby redraw?

Post by trogluddite »

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.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
wlangfor@uoguelph.ca
Posts: 912
Joined: Tue Apr 03, 2018 5:50 pm
Location: North Bay, Ontario, Canada
Contact:

Re: Ruby redraw?

Post by wlangfor@uoguelph.ca »

Thanks, printing the page as a pdf. I appreciate that Trogluddite :)
My youtube channel: DSPplug
My Websites: www.dspplug.com KVRaudio flowstone products
Post Reply