Re: Any use for this?
Posted: Fri Nov 16, 2012 4:04 am
MyCo wrote:but with global variables you could do this the other way around, too (polling a global variable and then change the output)
...and with a global Module, you get this...
Kind of a virtual wireless patchbay for Ruby modules, including the ability for updating a parameter to pass the value and trigger multiple inputs or outputs anywhere in the schematic. The storage of the links values inside the module means that it should be possible to save the link data to HDD and restore it again.
Experimental still, and not one you'd use every day, I think - normal connections would be more efficient than a load of method calls - but maybe useful for a big 'global preferences network".
Oh, and another thing to ponder...
Remember the warning in the manual about the shared namespace if you have multiple schematics open?
Well, it is the same for exported plugins too - only one instance of Ruby is opened for all running FS3 VSTs.
Good or Bad? Hmmm.
Lots of chances for weird bugs once we all start using Ruby in our plugins. Ruby seems pretty good at dealing with variable scopes etc. - but it will still take some effort from programmers to avoid namespace clashes, and to resist the temptation to take shortcuts by re-defining methods that everyone else relies on.
OTOH - you can send values between plugins. I haven't tested extensively to look at timing yet, so maybe only good for preferences etc., but the values definitely get back and forth - even Modules and Classes defined in one plugin are available in the others.