Ruby Questions

For general discussion related FlowStone
Post Reply
rlr
Posts: 27
Joined: Tue Jul 13, 2010 9:17 pm

Ruby Questions

Post 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?
DSP
Posts: 150
Joined: Fri May 14, 2010 10:55 pm

Re: Ruby Questions

Post by DSP »

You can run lot's of ruby modules rather than one big one with out any effects on CPU etc.
User avatar
support
Posts: 151
Joined: Fri Sep 07, 2012 2:10 pm

Re: Ruby Questions

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