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
Stream audio, float, and midi between plugin instances?
4 posts
• Page 1 of 1
Stream audio, float, and midi between plugin instances?
Hello. I would like to stream audio, float, and midi between multiple plugin instances that are open simultaneously. What options are on the table so far?
-
guyman - Posts: 207
- Joined: Fri Mar 02, 2018 8:27 pm
Re: Stream audio, float, and midi between plugin instances?
There are several of them. The easiest (and cheatiest) one is to use constants or class variables in Ruby. Ruby interpreter is shared between instances of the same plugin, so when you declare a constant or class variable in one of them, it will be available to all of them.
Constants in Ruby are actually not constant - they are merely guaranteed to stay the same object, but the object itself can change - define a Hash or an array and you can put data into it or remove data from it from any instance:
The problem with this is that the plugins are not synced. You have no guarantee which code in which plugin gets executed first. This is particularly a problem, because you can't define a constant twice (you get error). Google "how to define constant in ruby only if not defined yet?" or something similar to find some workarounds. To share audio, you can pass Frame objects. Naturally, there will be latency and syncing them properly will be a pain.
The value can also be a RubyEdit object, which is the specific module returned by keyword "self". The object has methods "input" and "output" that you can call, which is how the ruby modules communicate with flowstone and each other. This can be powerful, because it means you can send MIDI messages that will be properly time-synced (mostly). I have not actually tested this though.
I can create some example schematics if you like...
Constants in Ruby are actually not constant - they are merely guaranteed to stay the same object, but the object itself can change - define a Hash or an array and you can put data into it or remove data from it from any instance:
- Code: Select all
#in instance 1.
SHARED_DATA=Hash.new
SHARED_DATA["float"]=0.56 #write 0.56 to position named "float"
#in instance 2.
SHARED_DATA["float"] #=> 0.56
The problem with this is that the plugins are not synced. You have no guarantee which code in which plugin gets executed first. This is particularly a problem, because you can't define a constant twice (you get error). Google "how to define constant in ruby only if not defined yet?" or something similar to find some workarounds. To share audio, you can pass Frame objects. Naturally, there will be latency and syncing them properly will be a pain.
The value can also be a RubyEdit object, which is the specific module returned by keyword "self". The object has methods "input" and "output" that you can call, which is how the ruby modules communicate with flowstone and each other. This can be powerful, because it means you can send MIDI messages that will be properly time-synced (mostly). I have not actually tested this though.
I can create some example schematics if you like...
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: Stream audio, float, and midi between plugin instances?
Surely, you can if you would like. After further thought I don't know if the purpose I want to utilize the functions for is practical - so it is not taking precedence at this time for me... so don't bother using too much of your time towards it...
thank you for your response !
perhaps someone else who finds this thread will make use of it if you do tho....
thank you for your response !
perhaps someone else who finds this thread will make use of it if you do tho....
-
guyman - Posts: 207
- Joined: Fri Mar 02, 2018 8:27 pm
Re: Stream audio, float, and midi between plugin instances?
actually scratch that last post... yes if you could... I want to be able to trigger mono or solo buttons across all instances... say for multiband management purposes.... one you solo a band on one instance of the plugin... it solos that band on every instance...
-
guyman - Posts: 207
- Joined: Fri Mar 02, 2018 8:27 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 82 guests