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
Re: Ruby cablepatcher
maybe i'm missing something
Re: Ruby cablepatcher
oh i just saw that it doesn't update when adding new sources or tartegs, i reuploaded the fixed version.
just add them to the sources or targets in the properties panel, also don't forget to add them in the bus part inside the routing matrix, there you need to add single bus extracts in the targets extract module, this is needed because if i extract all targets with one bus extract busnames with the same name don't get added together.
also take care that you add enough targets, you will see how much you need to add at the sources bus extract,
it automatically adds all possible connections (sources x targets)
Re: Ruby cablepatcher
Re: Ruby cablepatcher
maybe it would make sense to use rightclick and drag to change the destination and double rightclick to delete it, or use leftclick on the target slot to disconnect and drag it to another target and leave the single rightclick to delete the connection?
what you think?
Re: Ruby cablepatcher
Hopefully you won't lose control over the complexity with future revisions. Your question is quite interesting. I instantly thought of Reason, where no multiple ins or outs are allowed, though. There, leftclicking on an already existing connection frees the cable to be patched with another input/output. And releasing the mouse while the cable is floating (connected just to one end) deletes it. It's an intuitive and fast workflow.
(Multiple ins or outs are managed through a seperate module called splitter/merger)
Re: Ruby cablepatcher
after a target could have more connections it would be needed to select the right connection you want to change,
the right mouse button is because cables sometimes are hanging over some knob and then it could happen easily to disconnect a cable when you just want to set a knob value,
sadly i ran into some troubles with the rightmouseclicks and the mousecapturing, which fucked the whole idea up for now
look here: viewtopic.php?f=2&t=2925
about the complexity, yeah its not so bad atm but sure it would look much better to pack all the stuff into classes, sadly i'm not used to do classes and its really difficult for me to write some, maybe this would be a good idea for the FS guru to provide a simple tutorial how to write and use classes in FS, i really don't get it by myself
but for sure it would make things much easier to use class objects then multidimensional arrays with strings and numbers inside which makes it often complicated to follow, i also don't like some ways i've programmed it;
only the faczt that i use 3 multidimensional arrays to get everything under one hat (connections, cablepoints and the preset array) is really ugly and uncomfortable to use, specially for other people to follow..
Re: Ruby cablepatcher
Classes in Ruby are pretty much straight-forward.
Code: Select all
class Myclass
# class names have to start with a capital letter
endThere you are. You're very own class. You get an instance of it by calling
Code: Select all
myclass = Myclass.newWhen .new is called, Ruby looks for a method inside the class called 'initialize', so you can init values and the like.
Code: Select all
class Myclass
def initialize
@myvar = 1.0
end
def getvalue
@myvar
end
endNow the class is initialized with @myvar set to 1.0, but you can't access the instance variable (its scope is the class), so you define a method to get access to the value.
Code: Select all
myclass = Myclass.new
value = myclass.getvalue
#value is now 1.0To set a value, you again define a method
Code: Select all
def setvalue=(n)
#The '=' directly after the method name defines a 'setter'-function. You can now call it the math way: setvalue = n
@myvar = n
endTo use it, do this:
Code: Select all
myclass = Myclass.new
myclass.setvalue = 3.5
value = myclass.getvalue
#value is now 3.5But I will see if I can do a little more intense tutorial soon.
Re: Ruby cablepatcher
some tutorial would be very appreciated
i remember the day i started to write my own methodes and understood how great this is to use, i think with classes its the same, once you understood it and you did some by yourself it starts to be an easy thing and it is as normal to use as using methodes.
Re: Ruby cablepatcher
These are just shorthands for generating basic getters and setters because its very annoying to some programmers(me) to write these getters and setters when you really just want a public field.
As the names suggest attr_reader generates only getters attr_writer generates setters and attr_accessor generates both at once. The names of the member variables must be given as :symbols.
Here's a simple example:
Code: Select all
class Point
attr_accessor :x, :y
end
is just much quicker than
Code: Select all
class Point
def x
@x
end
def x= v
@x = v
end
def y
@y
end
def y= v
@y = v
end
end