PDA

View Full Version : Q: pass data between scripts


DarkStar
09-18-2016, 08:40 AM
I would like to get some info from an oscii-bot script into a ReaScript (.lua, .eel or even a JS FX). And, perhaps, back in the other direction.

How can I do that? Are there any Actions that can be used? I tried using gmem[] but that did not work for me.

Why? I am looking for a way to display some status info in Reaper based on what I do on the Control Surface. For example, controller mode, last changed element, change value. A "head-up display" for the controller, if you like.

==================
Some oscii-bot scripts use their own graphics window. Docking that into Reaper or pinning it on top could be OK.

Xenakios
09-19-2016, 06:07 AM
I would like to get some info from an oscii-bot script into a ReaScript (.lua, .eel or even a JS FX). And, perhaps, back in the other direction.

How can I do that? Are there any Actions that can be used? I tried using gmem[] but that did not work for me.

Why? I am looking for a way to display some status info in Reaper based on what I do on the Control Surface. For example, controller mode, last changed element, change value. A "head-up display" for the controller, if you like.

==================
Some oscii-bot scripts use their own graphics window. Docking that into Reaper or pinning it on top could be OK.

I don't think any of that is possible at the moment. OsciiBot and Reaper are separate processes, so something like gmem isn't going to work. (The "global" in gmem means global memory within a single process, not global memory on the whole operating system.)

DarkStar
09-19-2016, 07:16 AM
OK, thank you.

I tried gmem as (I thought that) I had read that gmem was memory shared by all scripts and I had presumed that as oscii-bot was used by an OSC Control Surface in Reaper then the gmem memory space would be shared wit by the oscii-bot, lua, EEL and JS FX scripts.

Xenakios
09-19-2016, 08:53 AM
OK, thank you.

I tried gmem as (I thought that) I had read that gmem was memory shared by all scripts

Shared memory between script instances on the same scripting engine within the same process. For example while ReaScript does run Eel code, it does not share the scripting engine with JesuSonic, so they don't share the memory. (Technically since they are within the same process, they could share memory but that has not been implemented by Cockos and probably so for good reasons.)