Page 1 of 1

Ruby Questions

Posted: Sun Aug 26, 2012 3:39 pm
by rlr
What's the preferred way to to implement user interface controls (button, slider, displays, etc) using the Ruby module (yes I did read the manuals before):
- use an Ruby module for each control?
- use a single Ruby module that contains all controls?
How efficient is the Ruby module (CPU, memory)? Does Flowstone start an instance of a Ruby interpreter for each Ruby module? Or is there only one interpreter?

Re: Ruby Questions

Posted: Thu Sep 06, 2012 4:02 pm
by DSP
You can run lot's of ruby modules rather than one big one with out any effects on CPU etc.

Re: Ruby Questions

Posted: Sat Sep 08, 2012 6:51 pm
by support
Hi rlr!

In FlowStone 3 we'll be providing updates to all the current interface controls using Ruby.

However, in FlowStone 2 we have a few controls already that use Ruby. These are under the 'vintage' heading. If you search for 'Vintage Knob' you'll see how we've used Ruby to make an animated knob (one that has a bitmap frame for each rotation).

In this module we decided to separate the drawing from the interaction and used a Ruby component for each. This is likely to be the way that we approach other interface control modules.

Have a look inside. Compared to the existing knobs which don't use Ruby I hope you'll find it's much easier to follow. In addition it uses around 90% fewer components.