Combination Circuits/Schematics

For general discussion related FlowStone
Post Reply
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Combination Circuits/Schematics

Post by Nubeat7 »

you can exchange the ticker with the old version which should be in your toolbox..
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: Combination Circuits/Schematics

Post by RJHollins »

ah ... ok.

I replaced the 'ticker' module, and all is working.

I fed the 'state' Boolean into the stock 'ticker' module and everything starts and re-sets nicely.

Also changed the LED to GREEN when active.
User avatar
tiffy
Posts: 400
Joined: Wed May 08, 2013 12:14 pm

Re: Combination Circuits/Schematics

Post by tiffy »

RJHollins wrote:ah ... ok.

I replaced the 'ticker' module, and all is working.

I fed the 'state' Boolean into the stock 'ticker' module and everything starts and re-sets nicely.

Also changed the LED to GREEN when active.


Glad your (my) problem is solved mate. However, I would still like to have a look at the old Ruby Ticker code just to see where the difference is between the old & the new. Would it be inconvenient to ask you to post the old Ruby ticker here, as I don't have a copy of v3.0.4 ?

Thanks for the help from Tulamide & Nubeat7.
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: Combination Circuits/Schematics

Post by RJHollins »

Absolutely !

Here is the Graphics CountDown schematic you posted, with my changes.
Graphic Count Down Timer (Ruby) v3.fsm
(35.91 KiB) Downloaded 1228 times
User avatar
tiffy
Posts: 400
Joined: Wed May 08, 2013 12:14 pm

Re: Combination Circuits/Schematics

Post by tiffy »

RJHollins wrote:Absolutely !

Here is the Graphics CountDown schematic you posted, with my changes.
Graphic Count Down Timer (Ruby) v3.fsm


Thank you, appreciate.
User avatar
tiffy
Posts: 400
Joined: Wed May 08, 2013 12:14 pm

Re: Combination Circuits/Schematics

Post by tiffy »

ONE DROPLIST ONLY (RUBY) + 2 x SELECTORS WITH DROP LISTS (RUBY):

Please note that the two Ruby Selectors are not exactly the same as the one has a static label and the other a dynamic label which corresponds to the item selected. The Ruby Drop List Only has intentionally no background and can be used as a hidden Drop list.

I don't know if anyone noticed that the previous Ruby Selectors & Ruby Drop List I uploaded to the DSP Forum some time ago, although they all retained their settings the setting displayed on their Drop lists reverted to 0 after a shutdown and a restart of the schematic.

So, that bug were fixed in this upload and I think the schematics is also a bit neater.
Attachments
Droplist + 2 Selectors (Ruby).fsm
(6.11 KiB) Downloaded 1219 times
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Combination Circuits/Schematics

Post by Nubeat7 »

there are a few things to say about..

1. to place a redraw inside the draw methode forces an endless redraw loop
2. if you redraw inside ruby, no extra redraw primitives are needed
3. "d = @inside ? 20:0" - no variable of this line is used..
4. "output 2,v.height" - there is no output 2
5. it is a useless overload, to load all pc fonts on each start of the app, you can purgeable this
6. the init methode - @index = @index - better check if nil or?
7. preset management would be helpful too

i also wouldn't initialise "b" 2 times because it is confusing to have one variable which does 2 different things in one methode..

ps: you don't need to delete everything again, i stopped commenting your stuff, this is just an exception, because i'm bored, i promise ;)
User avatar
tiffy
Posts: 400
Joined: Wed May 08, 2013 12:14 pm

Re: Combination Circuits/Schematics

Post by tiffy »

RUBY RANDOM NUMBER GENERATOR (FROM A RANGE).

I am not sure if this is the best Ruby method I used for the Random Number Generator, however I tried to keep the Ruby Code as simple and as short as possible.

So, please first test it before using it in any application.
Attachments
RandomNumberGenerator (Ruby).fsm
(4.97 KiB) Downloaded 1152 times
Last edited by tiffy on Sun Jul 23, 2017 6:21 pm, edited 1 time in total.
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Combination Circuits/Schematics

Post by Spogg »

Hey tiffy that's great and gone into my toolbox!

Cheers

Spogg
User avatar
tiffy
Posts: 400
Joined: Wed May 08, 2013 12:14 pm

Re: Combination Circuits/Schematics

Post by tiffy »

RUBY RANGES:

Ruby supports ranges and allows us to use ranges in a variety of ways:

1) Ranges as Sequences

2) Ranges as Conditions

3) Ranges as Intervals

Just in case someone wonders what the "range.to_a" method (convert a range to a list) does in the Random Number Generator I posted previously, here is a link that explains it quite well:

https://www.tutorialspoint.com/ruby/ruby_ranges.htm
Post Reply