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

Ruby cablepatcher

Post any examples or modules that you want to share here

Re: Ruby cablepatcher

Postby Nubeat7 » Sun Nov 02, 2014 12:01 pm

@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 :)
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Ruby cablepatcher

Postby tulamide » Mon Nov 03, 2014 2:59 am

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:
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

:o 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: 2686
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Ruby cablepatcher

Postby Nubeat7 » Wed Nov 05, 2014 9:18 am

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)
Last edited by Nubeat7 on Sat Jul 25, 2015 6:50 pm, edited 1 time in total.
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Ruby cablepatcher

Postby Nubeat7 » Wed Nov 05, 2014 9:17 pm

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! :roll: )

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.
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Ruby cablepatcher

Postby Nubeat7 » Sun Nov 09, 2014 8:55 pm

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.
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Ruby cablepatcher

Postby glitchcpt » Tue Nov 11, 2014 7:42 am

Great :D

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

Postby RJHollins » Tue Nov 11, 2014 8:47 am

just had a chance to play with this briefly.

Wow ... really cool. Nice work NuBeat !
8-)
RJHollins
 
Posts: 1567
Joined: Thu Mar 08, 2012 7:58 pm

Re: Ruby cablepatcher

Postby Nubeat7 » Wed Nov 12, 2014 10:48 am

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
Last edited by Nubeat7 on Wed Dec 19, 2018 4:54 pm, edited 1 time in total.
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Ruby cablepatcher

Postby Exo » Thu Nov 13, 2014 10:56 pm

Only just got round to checking this out.

Excellent work Nubeat this is really good! thanks for sharing. :D

Thank the lord for Ruby, stuff like this used to be a massive pain in the arse in the old days.
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
Exo
 
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK

Re: Ruby cablepatcher

Postby Nubeat7 » Fri Nov 14, 2014 9:33 am

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..
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 41 guests