Page 3 of 5

Re: Ruby cablepatcher

PostPosted: Sun Nov 02, 2014 12:01 pm
by Nubeat7
@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 :)

Re: Ruby cablepatcher

PostPosted: Mon Nov 03, 2014 2:59 am
by tulamide
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.

Re: Ruby cablepatcher

PostPosted: Wed Nov 05, 2014 9:18 am
by Nubeat7
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)

Re: Ruby cablepatcher

PostPosted: Wed Nov 05, 2014 9:17 pm
by Nubeat7
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.

Re: Ruby cablepatcher

PostPosted: Sun Nov 09, 2014 8:55 pm
by Nubeat7
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.

Re: Ruby cablepatcher

PostPosted: Tue Nov 11, 2014 7:42 am
by glitchcpt
Great :D

Very keen to try this when i get time in the studio again!

Re: Ruby cablepatcher

PostPosted: Tue Nov 11, 2014 8:47 am
by RJHollins
just had a chance to play with this briefly.

Wow ... really cool. Nice work NuBeat !
8-)

Re: Ruby cablepatcher

PostPosted: Wed Nov 12, 2014 10:48 am
by Nubeat7
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

Re: Ruby cablepatcher

PostPosted: Thu Nov 13, 2014 10:56 pm
by Exo
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.

Re: Ruby cablepatcher

PostPosted: Fri Nov 14, 2014 9:33 am
by Nubeat7
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..