Support

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 Knob fully customisable

Post any examples or modules that you want to share here

Re: Ruby Knob fully customisable

Postby steph_tsf » Wed Jul 10, 2013 6:12 pm

@Nubeat7 : such fix is not guaranteed to work. Have you tried on your side ? On my side sometimes (say 20% chances) after a double click the Readout doesn't get updated to "default", even when the output got correctly updated to "default". An explanation to this ? It could be that the "output 1, nil" trigger comes too fast, just after "output 0, @default". Can you redraw the Readout, triggered by a "Ticker 25" ? This would be bullet-proof.
steph_tsf
 
Posts: 249
Joined: Sun Aug 15, 2010 10:26 pm

Re: Ruby Knob fully customisable

Postby MyCo » Wed Jul 10, 2013 6:21 pm

Code: Select all
def event i,v
    redraw 0
end


That's the right way... it means: whenever an input is triggered, repaint view
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: Ruby Knob fully customisable

Postby Nubeat7 » Wed Jul 10, 2013 6:23 pm

thanks myco, this should also fix stephs problem - you dont need the trigger from the knob code to update the read out then
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Ruby Knob fully customisable

Postby Tronic » Wed Jul 10, 2013 6:35 pm

I believe that it is always necessary to separate the calculations in the event method, making them run only if the various inputs or inputs change, and leave in the methodo v.draw draw only the command with the appropriate parameters.

Another thought is to have a sequence from up to down
es.

def someMethod
end

def event
end

def draw
end
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Ruby Knob fully customisable

Postby MyCo » Wed Jul 10, 2013 7:14 pm

@Tronic, you are right. But you have to ensure that all your params are calculated before the first draw happens. For this I use a method recalc and a variable @calced. And then I do something like this:

Code: Select all
def draw(v)
  recalc(v) if @calced.nil?
  ...
end

def recalc(v)
   ...
   @calced = ...
end

def event(i,v)
    ...
    when something important has changed:
    ->   @calced = nil
    ->   redraw
end
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: Ruby Knob fully customisable

Postby steph_tsf » Wed Jul 10, 2013 10:07 pm

I'm posting a .fsm containing a few knobs derived from Nubeat7 initiative, no more Trigger Galore, debugged by MyCo. They are all different, featuring different transfer functions. In the properties you can change the colors and other details. I wanted them to be as simple as possible. There is no MIDI support.
Attachments
knobs.png
knobs.png (81.05 KiB) Viewed 28048 times
knobs properties.png
knobs properties.png (31.1 KiB) Viewed 28048 times
knobs (Nubeat7 steph_tsf MyCo).fsm
(6.56 KiB) Downloaded 1336 times
steph_tsf
 
Posts: 249
Joined: Sun Aug 15, 2010 10:26 pm

Re: Ruby Knob fully customisable

Postby Nubeat7 » Wed Jul 10, 2013 10:28 pm

thanks steph! very useful transfers, after u figured out the redraw issue, u saved my last project, i already was wondering why the readout was looking so crappy when in use :D, i also know now how importand it is to watch the task manager from time to time :lol:
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Ruby Knob fully customisable

Postby Nubeat7 » Wed Jul 17, 2013 11:48 pm

tested the new in place edit in ruby, you can edit the value via left mouseclick now...
Attachments
knoblabel edit.fsm
(2.51 KiB) Downloaded 1313 times
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Ruby Knob fully customisable

Postby Nubeat7 » Sun Jul 21, 2013 9:55 pm

edit: look at the first post to get the latest vertsion!
Last edited by Nubeat7 on Wed Dec 19, 2018 3:59 pm, edited 2 times in total.
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Ruby Knob fully customisable

Postby Nubeat7 » Sun Oct 27, 2013 11:04 am

version 3 offers a complete detouched properties panel. Like this just one knobproperties panel for each knobdesign is needed somewhere in an upper level of the schematic. It has just one rubyvalue out so you can easy do different knobdesigns in your project with just changing one linkname, i also optimized the code which makes the knob really lightweight

edit: look at the first post to get the latest vertsion!
Last edited by Nubeat7 on Wed Dec 19, 2018 4:12 pm, edited 4 times in total.
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

PreviousNext

Return to User Examples

Who is online

Users browsing this forum: No registered users and 23 guests