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 cablepatcher
43 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Re: Ruby cablepatcher
@dj brynte
just change the size in the main view, the red frame in the properties always shows the cablepatcher mainview.
@OM
thank for the explanation, thats really comfortable had several looks on the web about it (already a while ago) but it never was explained that clear
just change the size in the main view, the red frame in the properties always shows the cablepatcher mainview.
@OM
thank for the explanation, thats really comfortable had several looks on the web about it (already a while ago) but it never was explained that clear
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Ruby cablepatcher
There's a catch with attribute accessors, though. As long as you are the only one using the class, it doesn't matter. But if others will use it, your class could get in trouble, because you have no chance to check the provided values.
Let's have a look at TheOm's example:
You can now do something like
Great! But alas, you could also do something like that
Sure enough you will want to have coordinates given as Numerics.
So be careful using attr_accessor. It is mostly avoided, instead attr_reader is used, while the setter function is mostly done like in my example, since you can then check for the correct value type before setting the value.
Let's have a look at TheOm's example:
- Code: Select all
class Point
attr_accessor :x, :y
end
You can now do something like
- Code: Select all
p = Point.new
p.x = 10.5
Great! But alas, you could also do something like that
- Code: Select all
p = Point.new
q = Point.new
p.x = q
Sure enough you will want to have coordinates given as Numerics.
So be careful using attr_accessor. It is mostly avoided, instead attr_reader is used, while the setter function is mostly done like in my example, since you can then check for the correct value type before setting the value.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Ruby cablepatcher
thanks tulamide for the pointing this out
ok, finally i changed the cablepatcher, so you now can change connections when dragging with the right mousebutton,
if you release the button not on a target the connection will be deleted.
maybe some of you could test it if it is proof, you need to release the button inside the cablepatcher area, otherwise dragging will continue, i don't know if this could be a problem but sadly there is no mouseRUpCaptured methode implemented...
additional things:
- you can set the cabledeepness (how deep the curve will be)
- cable deepness will be set automatically to the bottom if the curve would go deeper then the patcher area
- you can set cablecurve (how round the curve will be - this is to set from 0..1)
EDIT:
fixed bug, after presetchange changing of cable connection was bugged (see next post)
ok, finally i changed the cablepatcher, so you now can change connections when dragging with the right mousebutton,
if you release the button not on a target the connection will be deleted.
maybe some of you could test it if it is proof, you need to release the button inside the cablepatcher area, otherwise dragging will continue, i don't know if this could be a problem but sadly there is no mouseRUpCaptured methode implemented...
additional things:
- you can set the cabledeepness (how deep the curve will be)
- cable deepness will be set automatically to the bottom if the curve would go deeper then the patcher area
- you can set cablecurve (how round the curve will be - this is to set from 0..1)
EDIT:
fixed bug, after presetchange changing of cable connection was bugged (see next post)
Last edited by Nubeat7 on Sat Jul 25, 2015 6:50 pm, edited 1 time in total.
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Ruby cablepatcher
ok finally i think i have it, after presetchange the changing of a cable connection was bugged (forgot to convert the preset values back to integers! )
another bug was that the selected cables were getting confused when changing cable connections, this is also fixed now and while you create or change a cableconnection the cable stays in the selection color!
i also cleaned up some code parts a little bit..
so everyrhing should work well now, any feedback, testresults, or inspirations are welcome!
updated version is in the first post.
another bug was that the selected cables were getting confused when changing cable connections, this is also fixed now and while you create or change a cableconnection the cable stays in the selection color!
i also cleaned up some code parts a little bit..
so everyrhing should work well now, any feedback, testresults, or inspirations are welcome!
updated version is in the first post.
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Ruby cablepatcher
after testing it in "reallife" i found out that it is very uncomfortable to add and delete or to rename any sources or targets, so i changed the process properties to create,delete and renaming the sources and targets, this can be done now with right mouseclick, depending if you are on a source or target or in empty space a droplist will open and ask you what to do (creating sources or targets , deleting them or renaming them)
this update really makes it very easy now to add, delete or rename sources and targets while working on your projects without placing all new again after sources or targets have changed...
latest version 007 is up in the first post.
this update really makes it very easy now to add, delete or rename sources and targets while working on your projects without placing all new again after sources or targets have changed...
latest version 007 is up in the first post.
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Ruby cablepatcher
Great
Very keen to try this when i get time in the studio again!
Very keen to try this when i get time in the studio again!
- glitchcpt
- Posts: 54
- Joined: Wed Oct 01, 2014 3:42 pm
Re: Ruby cablepatcher
just had a chance to play with this briefly.
Wow ... really cool. Nice work NuBeat !
Wow ... really cool. Nice work NuBeat !
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Ruby cablepatcher
thank you guys , finally after some more optimisations the project is ready for version 1.00.
changes:
- some important performance optimisations
source and target connections are both with single bus extracts and bus creates for each connection now, like this only the changed connection is getting updated (recompiled) instead of the all connections
also the ruby code changed, the connections array include only the int indexes of the connections now instead of all the stringnames
- added JackSize to the properties
you can define the jacksize in the properties now
- added max cables (maximum cableconnections) to the properties
limits the max amount of possible connections, if the max is reached you will get a popup window which will inform you that you are out of cables
- changed cabledrawing from curve to beziers
this allows a better control over the cabledeepness, like this the cables cannot hang down out of the viewarea
- i also added a detailed description inside the schematic
changes:
- some important performance optimisations
source and target connections are both with single bus extracts and bus creates for each connection now, like this only the changed connection is getting updated (recompiled) instead of the all connections
also the ruby code changed, the connections array include only the int indexes of the connections now instead of all the stringnames
- added JackSize to the properties
you can define the jacksize in the properties now
- added max cables (maximum cableconnections) to the properties
limits the max amount of possible connections, if the max is reached you will get a popup window which will inform you that you are out of cables
- changed cabledrawing from curve to beziers
this allows a better control over the cabledeepness, like this the cables cannot hang down out of the viewarea
- i also added a detailed description inside the schematic
Last edited by Nubeat7 on Wed Dec 19, 2018 4:54 pm, edited 1 time in total.
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Ruby cablepatcher
Only just got round to checking this out.
Excellent work Nubeat this is really good! thanks for sharing.
Thank the lord for Ruby, stuff like this used to be a massive pain in the arse in the old days.
Excellent work Nubeat this is really good! thanks for sharing.
Thank the lord for Ruby, stuff like this used to be a massive pain in the arse in the old days.
- Exo
- Posts: 426
- Joined: Wed Aug 04, 2010 8:58 pm
- Location: UK
Re: Ruby cablepatcher
thank you exo, yes without ruby i think i never would started it, i know the SM version which some of the early gurus did, and this is amazing but i would need weeks to fully understand all the mechanisms there..
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
43 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Who is online
Users browsing this forum: No registered users and 43 guests