Basic questions about Ruby and Flowstone (need answers)
Posted: Wed Nov 06, 2019 6:26 pm
I'd like to start a discussion clarifying some basic things. If anyone would like to converse I'd appreciate it. Check any part with a quote if you care to.
Be warned some of this may read like declarations of the truth, but these are my assumptions based on my current understanding. There is some info here for the uninitiated, some good questions raised and asked, and some guesses that need corrected...
I am under the current assumption that :
-Ruby in Flowstone is processing any input data (frame,gui,midi,ANY GREEN) at the same speed (sample rate), as streams, in sync with streams. This has to do with the buffers running in the background (as recently described to me by tulamide)..
-Though it analyzes all inputs instantaneously, it takes time to generate midi events. That time has to fall under the length of one buffer, with the buffer length set by the soundcard/asio. So with an ample buffer length ruby can be treated as "real time" like a stream. I believe this is the same case with turning signals into ruby frames (that can come later)...
(personally my computer/soundcard is set to 3ms currently(I record), but I guess I'll have to extend that for some functions I may want in the future.)
-When turning streams into green with mono2float, or poly to float array, or graph prims... it is real time, BUT the float is generated by samples taken at an instant == tick (tick25,tick100,custom), thus is open to inaccurate timing, and missing signal parts... as stream is running at sample rate (it is basically assembly language in clothing), and tick is (insert cpu clock jargon???)...
-you can reliably run green into streams, and the stream will = green, but not vice verse, and anything in green tangles will be open to these timing/accuracy issues...
BUT is this the case with the ruby input/output? If ruby is processing at sample rate like a stream is, at the same level(buffer) as a stream, is the output to be trusted? Like if I process an INT array in ruby at sample rate, and output an INT... is that INT accurate, or is even that in/output hole subject to green inaccuracy? Can I run out of that ruby INT output directly into a stream?
(picture below)
If I do, is it at sample rate speed accuracy? essentially creating an uninterrupted stream from inside the ruby module processes, out of the INT out, directly into a STREAM in on a DSPCODE box, and out the other side? Is that whole chain sample accurate? or is that one step of green ruining it?
If it is unreliable,
-is that problem avoided by using a frame out?
-then frame > mono?
-is that sample accurate?
-is it instantaneous?
-it takes time (I think a buffer) to go from mono to frame (UNUSABLE AS IT SEND CPU INTO SATANIC FURY)..
-Does it take time for a frame to go mono??
-Does it take hella CPU?
what if I want to output an array? can an array go out in a frame? frame to poly? mem? huh?
(let's get out of the deep end)...
-Are my assumptions about ruby's internal processing and accuracy correct?
-Are the outputs to be treated with that same level of accuracy?
-Is a green input/output inaccurate at the point of ruby out, or upon connection to green mechanisms?
-If I send a midi event into Ruby, use ruby to dissect it into it's constituent parts, and output them as INT/string, are
-those INTs/strings as instantaneous as midi>voices>poly? is it faster? is it as accurate?
-Is midi > ruby >green out realtime/sample rate?
If you can't tell, I am trying to ditch green as much as possible. Ruby can do what green can, at sample rate/accuracy (I believe
)... with significant CPU savings.. && stream is the only way to process realtime/living data as it is running at sample rate..
I'm trying to use the above questions/thoughts to clarify ruby's mechanisms, and understand the best ways to translate between streams/ruby/midi, the timing issue, and limitations...
~~~~
If only there was one fluid ether, layed out all flowstone point and clicky (for my liwwle brain) that could accomplish everything I could ever dream of, without considering buffers, with complete accuracy, at sample rate, in realtime, capable of processing streams, conditional and statements, expressions, midi, and guis.. and tuck me in at night, and give me hot cocoa when im cold and and and

Be warned some of this may read like declarations of the truth, but these are my assumptions based on my current understanding. There is some info here for the uninitiated, some good questions raised and asked, and some guesses that need corrected...
I am under the current assumption that :
-Ruby in Flowstone is processing any input data (frame,gui,midi,ANY GREEN) at the same speed (sample rate), as streams, in sync with streams. This has to do with the buffers running in the background (as recently described to me by tulamide)..
-Though it analyzes all inputs instantaneously, it takes time to generate midi events. That time has to fall under the length of one buffer, with the buffer length set by the soundcard/asio. So with an ample buffer length ruby can be treated as "real time" like a stream. I believe this is the same case with turning signals into ruby frames (that can come later)...
(personally my computer/soundcard is set to 3ms currently(I record), but I guess I'll have to extend that for some functions I may want in the future.)
-When turning streams into green with mono2float, or poly to float array, or graph prims... it is real time, BUT the float is generated by samples taken at an instant == tick (tick25,tick100,custom), thus is open to inaccurate timing, and missing signal parts... as stream is running at sample rate (it is basically assembly language in clothing), and tick is (insert cpu clock jargon???)...
-you can reliably run green into streams, and the stream will = green, but not vice verse, and anything in green tangles will be open to these timing/accuracy issues...
BUT is this the case with the ruby input/output? If ruby is processing at sample rate like a stream is, at the same level(buffer) as a stream, is the output to be trusted? Like if I process an INT array in ruby at sample rate, and output an INT... is that INT accurate, or is even that in/output hole subject to green inaccuracy? Can I run out of that ruby INT output directly into a stream?
(picture below)
If I do, is it at sample rate speed accuracy? essentially creating an uninterrupted stream from inside the ruby module processes, out of the INT out, directly into a STREAM in on a DSPCODE box, and out the other side? Is that whole chain sample accurate? or is that one step of green ruining it?
If it is unreliable,
-is that problem avoided by using a frame out?
-then frame > mono?
-is that sample accurate?
-is it instantaneous?
-it takes time (I think a buffer) to go from mono to frame (UNUSABLE AS IT SEND CPU INTO SATANIC FURY)..
-Does it take time for a frame to go mono??
-Does it take hella CPU?
what if I want to output an array? can an array go out in a frame? frame to poly? mem? huh?
(let's get out of the deep end)...
-Are my assumptions about ruby's internal processing and accuracy correct?
-Are the outputs to be treated with that same level of accuracy?
-Is a green input/output inaccurate at the point of ruby out, or upon connection to green mechanisms?
-If I send a midi event into Ruby, use ruby to dissect it into it's constituent parts, and output them as INT/string, are
-those INTs/strings as instantaneous as midi>voices>poly? is it faster? is it as accurate?
-Is midi > ruby >green out realtime/sample rate?
If you can't tell, I am trying to ditch green as much as possible. Ruby can do what green can, at sample rate/accuracy (I believe
I'm trying to use the above questions/thoughts to clarify ruby's mechanisms, and understand the best ways to translate between streams/ruby/midi, the timing issue, and limitations...
~~~~