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 modules collection
30 posts
• Page 1 of 3 • 1, 2, 3
Ruby modules collection
I've just dropped in anything in the tool box that looked interesting and useful. Feel free to add some Ruby stuff of your own. We can create a kinda nice mini Ruby data base here
Cheers!
Cheers!
- Attachments
-
- (RUBY COLLECTION).fsm
- (913.78 KiB) Downloaded 1236 times
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
Re: Ruby modules collection
Fantastic, thanks
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
Re: Ruby modules collection
Awesome ! I would love to add to the collection but I am working on the Alpha version.
-
lalalandsynth - Posts: 600
- Joined: Sat Oct 01, 2016 12:48 pm
Re: Ruby modules collection
This is a great idea!
When I was learning a bit about Ruby I set myself little exercises to make some basic functional modules. So I’ve attached these as my rather sad and weak contribution.
The quality of the coding and the style varies considerably as I made progress.
It might be useful to get comments about how stuff could be done better, or issues that I didn’t spot at the time.
Cheers
Spogg
When I was learning a bit about Ruby I set myself little exercises to make some basic functional modules. So I’ve attached these as my rather sad and weak contribution.
The quality of the coding and the style varies considerably as I made progress.
It might be useful to get comments about how stuff could be done better, or issues that I didn’t spot at the time.
Cheers
Spogg
- Attachments
-
- Spogg's Ruby stuff.fsm
- (163.98 KiB) Downloaded 1217 times
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Ruby modules collection
Great idea! I'll certainly have a rummage to see what generic Ruby modules I've got knocking around.
A couple of general comments...
- I think we need to be careful to distinguish between practical "drop-in" modules and code examples. For example, a Ruby 'sample and hold' will generally be far less efficient than a 'green' one. So, I wouldn't encourage people to use it as a "drop-in" toolbox module, but at the same time, it is a good example of how to handle triggers in Ruby.
- I noticed that the 'Windows Bell Sound' in Spogg's schematic uses the Win32API module. Unfortunately this doesn't work any more in plugin exports unless the customer also installs the correct Ruby library file in the right location. It's easy to get caught out by this as, when testing plugins on our own PC, our FS installation already includes the necessary file.
A couple of general comments...
- I think we need to be careful to distinguish between practical "drop-in" modules and code examples. For example, a Ruby 'sample and hold' will generally be far less efficient than a 'green' one. So, I wouldn't encourage people to use it as a "drop-in" toolbox module, but at the same time, it is a good example of how to handle triggers in Ruby.
- I noticed that the 'Windows Bell Sound' in Spogg's schematic uses the Win32API module. Unfortunately this doesn't work any more in plugin exports unless the customer also installs the correct Ruby library file in the right location. It's easy to get caught out by this as, when testing plugins on our own PC, our FS installation already includes the necessary file.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Ruby modules collection
Nice one, spogg thanks!
Trog, waiting to see what you are hiding there
By the way, can all that Ruby stuff get merged into one FS system file? If it does, maybe we can create one collection file that can be updated from time to time.
Trog, waiting to see what you are hiding there
By the way, can all that Ruby stuff get merged into one FS system file? If it does, maybe we can create one collection file that can be updated from time to time.
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
Re: Ruby modules collection
trogluddite wrote:G- I noticed that the 'Windows Bell Sound' in Spogg's schematic uses the Win32API module. Unfortunately this doesn't work any more in plugin exports unless the customer also installs the correct Ruby library file in the right location. It's easy to get caught out by this as, when testing plugins on our own PC, our FS installation already includes the necessary file.
Are you sure?
From the manual I get two informations:
"Currently VST plugins generated by FlowStone cannot make use of Ruby extensions or Gems."
"However, if you create an exported exe that uses the extension and want to pass this to someone else then either they will need to have FlowStone installed on their system or you will have to distribute the \ruby\libraries\win32 folder (including the ruby and libraries parent folders). The ruby parent folder should then be inside the same folder and at the same level as your exported exe as shown in the picture below" [with no picture following ]
For me this means no VST at all, even with a proper folders installation. And exe works fine if provided with the folders.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Ruby modules collection
trogluddite wrote:- I think we need to be careful to distinguish between practical "drop-in" modules and code examples. For example, a Ruby 'sample and hold' will generally be far less efficient than a 'green' one. So, I wouldn't encourage people to use it as a "drop-in" toolbox module, but at the same time, it is a good example of how to handle triggers in Ruby.
This is presumably because the Ruby sample & hold is interpreted whereas the green prim is hard coded in something fast…?
My understanding is that Ruby excels at doing stuff better than green where there would be a lot of complexity and triggers generated. One example is the array uniq and sort module. Try doing that with green prims!
What’s not so easy for me to determine is the break-point at which a RubyEdit will perform better than its green counterpart. If you take my monostable as an example, this kind of thing can be done in green with a counter and greater-than prims etc. But is the Ruby version guaranteed to be “better”? My view (which is fully open to being corrected) is that the Ruby one will be more accurately timed and less likely to be thrown off the scent by other simultaneous green activity in the schematic.
BTW I’m glad you mentioned possible issues with the Windows bell sound module. I maybe shouldn’t have included that one but it was just there as one of my little exercises.
Cheers
Spogg
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Ruby modules collection
@tulamide
Yes, you're right; my bad!
I was forgetting about the change to the Ruby interpreter linking for plugins, which does indeed disable the ability to use C++ Ruby extensions in plugins (though plain Ruby code will still "require" OK.)
In part, yes; though the Ruby interpreter does translate the code text into "byte-codes" so that the code doesn't need to be parsed every time it's used. Ruby also deals only with "objects", which is a very different way to store values than green uses. For example, a green float is just a 32/64-bit region of memory, which can simply be overwritten when a value changes. OTOH, in Ruby, a new Float object has to be created for each new value, and whenever Ruby starts to run out of space for new objects, the garbage collector has to scan the objects to see which ones can be thrown away to make space. So there can be quite a bit of overhead for all of this copying/converting between green values and Ruby objects, especially for "containers" such as long Strings or Arrays. Green and Ruby also run in different threads AFAIK, so there's likely some overhead for synchronising the threads, too.
Ruby "Value" links can help to some extent - they pass just a reference to an existing object rather than creating a copy. However, this has to be used with care, as any change to the object will be visible everywhere else that it's used, even in places "earlier" in the chain of links.
OTOH, the many, many built-in methods which Ruby objects have are all coded in C++ behind the scenes. So complex operations on "containers" of data can be very efficient if you can use the built-in methods to do what you need. And, of course, Ruby has all sorts of goodies that would be extremely difficult to emulate in green!
Yes, you're right; my bad!
I was forgetting about the change to the Ruby interpreter linking for plugins, which does indeed disable the ability to use C++ Ruby extensions in plugins (though plain Ruby code will still "require" OK.)
Spogg wrote:This is presumably because the Ruby sample & hold is interpreted whereas the green prim is hard coded in something fast…?
In part, yes; though the Ruby interpreter does translate the code text into "byte-codes" so that the code doesn't need to be parsed every time it's used. Ruby also deals only with "objects", which is a very different way to store values than green uses. For example, a green float is just a 32/64-bit region of memory, which can simply be overwritten when a value changes. OTOH, in Ruby, a new Float object has to be created for each new value, and whenever Ruby starts to run out of space for new objects, the garbage collector has to scan the objects to see which ones can be thrown away to make space. So there can be quite a bit of overhead for all of this copying/converting between green values and Ruby objects, especially for "containers" such as long Strings or Arrays. Green and Ruby also run in different threads AFAIK, so there's likely some overhead for synchronising the threads, too.
Ruby "Value" links can help to some extent - they pass just a reference to an existing object rather than creating a copy. However, this has to be used with care, as any change to the object will be visible everywhere else that it's used, even in places "earlier" in the chain of links.
OTOH, the many, many built-in methods which Ruby objects have are all coded in C++ behind the scenes. So complex operations on "containers" of data can be very efficient if you can use the built-in methods to do what you need. And, of course, Ruby has all sorts of goodies that would be extremely difficult to emulate in green!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Ruby modules collection
Hello all and thank you for providing these modules, kortezzz.
May I ask the question, whether anybody would know whether it is possible to program a ruby module that gets triggered by some input (poly for example) and the adds a probabilistic value from a normal distribution to it.
Why do I ask?
a) I wouldn't know how to do it myself. b) it would be really useful in combination with a sequencer to produce alternating sequences.
I wish you all a good week-end, thanks again, kortezzz
Best Regards
Phil
May I ask the question, whether anybody would know whether it is possible to program a ruby module that gets triggered by some input (poly for example) and the adds a probabilistic value from a normal distribution to it.
Why do I ask?
a) I wouldn't know how to do it myself. b) it would be really useful in combination with a sequencer to produce alternating sequences.
I wish you all a good week-end, thanks again, kortezzz
Best Regards
Phil
-
Phil Thalasso - Posts: 150
- Joined: Tue Jun 27, 2017 12:42 pm
- Location: Munich, Germany
30 posts
• Page 1 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 7 guests