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 for noobs!
26 posts
• Page 2 of 3 • 1, 2, 3
Re: Ruby for noobs!
Nubeat7 wrote:...is the load and save state needful in this example to work correct with a presetmanager?
Not any reason that I can see - the input and output values of the Ruby prim' are always stored anyway - but that will only affect the values when you first load a 'clean' copy of the plugin - once it's in a song, the preset manager should just take over.
Might help to keep the handle synce'd with the output values at load time though, so I wouldn't scrap them.
Couple of other little things I just noticed...
- With the drag behaviour changed, @x and @y aren't needed in the mouse routines any more - they get defined in the 'draw' method anyway..
- The 'event' parts for the 'set' input values could do with redraws, otherwise the handle may not move when you send preset values into them.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Ruby for noobs!
ok, i included preset parameters to use it with presetmanager, so XY Pad is finished now.
hope it is a good help for ruby noobs to understand some things bit better..
hope it is a good help for ruby noobs to understand some things bit better..
- Attachments
-
- xy pad.fsm
- (8.72 KiB) Downloaded 1346 times
Last edited by Nubeat7 on Mon Jan 28, 2013 7:51 pm, edited 5 times in total.
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Ruby for noobs!
Thanks Nubeat!
But...
If you apply value 1 to the set y input, the y output is 0, and vice versa.
I do not know ... That's right?
But...
If you apply value 1 to the set y input, the y output is 0, and vice versa.
I do not know ... That's right?
- pall
- Posts: 31
- Joined: Thu Dec 09, 2010 1:27 pm
- Location: Transilvania
Re: Ruby for noobs!
[url][/url]oh, yeah i left a challenge! .....
should work right now! i reuploaded the FSM...
its just one thing left, it don`t redraw the position when setting it with the presetmanager?? hmm
- Code: Select all
if i==10
@valy = [0,1-v,1].sort[1]
output 1, 1-@valy
redraw
end
should work right now! i reuploaded the FSM...
its just one thing left, it don`t redraw the position when setting it with the presetmanager?? hmm
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Ruby for noobs!
normally the preset module should send set value when doing a presetchange but this is not happening, sadly i cannot say why.... when watching the stock slider it is working but everything is the same inside the preset module, or?
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Ruby for noobs!
Hi Nubeat7,
have a look @ the Interact Bool,
def mouseMoveCaptured x,y => output 2 is always TRUE...
have a look @ the Interact Bool,
def mouseMoveCaptured x,y => output 2 is always TRUE...
-
Walter Sommerfeld - Posts: 249
- Joined: Wed Jul 14, 2010 6:00 pm
- Location: HH - Made in Germany
Re: Ruby for noobs!
Walter Sommerfeld wrote:Hi Nubeat7,
have a look @ the Interact Bool,
def mouseMoveCaptured x,y => output 2 is always TRUE...
the missing code:
- Code: Select all
def mouseLUpCaptured x,y
output 2,false
releaseMouse
thank you walter! shure when i dont tell ruby that it should be false when finish the mouse action, it cannotwork correct! ... so reuploaded again! now it really should work correctly
i also deleted the triggerswitches inside the preset module to make manual set val possible..
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Ruby for noobs!
i thightened the code a bit and fixed a little bug : interact was turning true in the mousemovecaptured section - only when moving - now it turns true when leftmousebuttondown, so it reacts already when you click in the mousearea
- Attachments
-
- xy pad 01.fsm
- (2.27 KiB) Downloaded 1327 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Ruby for noobs!
Hmm,
none of ur versions sets the right Preset after changes with the arrows...
Saving the param works and its only correctly set (placed on GUI coordinates) after reload the preset...
damn - i hate doing this
none of ur versions sets the right Preset after changes with the arrows...
Saving the param works and its only correctly set (placed on GUI coordinates) after reload the preset...
damn - i hate doing this
-
Walter Sommerfeld - Posts: 249
- Joined: Wed Jul 14, 2010 6:00 pm
- Location: HH - Made in Germany
Re: Ruby for noobs!
hmm, you checked the latest version too (xy pad 01) ? because it works here on my pc... i downloaded it and added a presetmanager and everything workes right the the coordinates and the values as well!
anyway it sounds weird because when changing a preset the presetparameter prim sends the values directly to the outputs and also to the ruby to set the position as well so when it sets the position right it has to set the values right as well because the datas are from the same source - the current value output of the presetparameter primitive! the only situation where this is happening is when you set the values from outside because before the value from the rubymodule arrives the presetparameter prim there is a triggerswitch which allows signals only while mouseinteract is true but when setting from outside it is false because there is no mouseaction... because of that i removed this option but it could easily added again, just add a lastswitch after the triggerswitch for setting values from outside similar to the one for midicc
anyway it sounds weird because when changing a preset the presetparameter prim sends the values directly to the outputs and also to the ruby to set the position as well so when it sets the position right it has to set the values right as well because the datas are from the same source - the current value output of the presetparameter primitive! the only situation where this is happening is when you set the values from outside because before the value from the rubymodule arrives the presetparameter prim there is a triggerswitch which allows signals only while mouseinteract is true but when setting from outside it is false because there is no mouseaction... because of that i removed this option but it could easily added again, just add a lastswitch after the triggerswitch for setting values from outside similar to the one for midicc
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
26 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 65 guests