Old 11-29-2018, 08:13 PM   #1
ausbaxter
Human being with feelings
 
Join Date: Apr 2016
Posts: 37
Default Reascript Global Memory?

Hello forum,

I'm hoping someone can shine some light on this: Is there a way to access (read/write) global reascript memory. I'm desperately looking for a solution to share a few objects between multiple deferred scripts, and seem to be killing my system reading/writing from extstate.

I found a post discussing gmem[] specifically in JS/OSCIIBOT, but am interested if there is the equivalent in reascript, there's no mention within the API.

Post in question:
https://forum.cockos.com/showthread.php?t=181580

Thanks for any info!
ausbaxter is offline   Reply With Quote
Old 11-30-2018, 03:53 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,214
Default

Untested, but from prerelease:


Code:
v5.961+dev1029 - October 29 2018   + ReaScript: add reaper.gmem_attach()/gmem_read()/gmem_write() to Lua for interacting with JSFX/Video Processors/EEL2 ReaScripts gmem[] segments
I wonder if this works through different ReaScripts or only between JSFX and ReaScripts.
X-Raym is offline   Reply With Quote
Old 11-30-2018, 05:45 AM   #3
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,197
Default

Yes, it works for anything.
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 12-01-2018, 08:01 AM   #4
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,342
Default

As I understand it, EEL ReaScripts have had gmem for a long time. The upcoming pre stuff is just for interaction between JSFX and ReaScripts.

https://www.cockos.com/EEL2/index.php#basic (5th and 6th bullet points)

I've never actually used it in a script though. Don't know if Lua and Python have anything similar.
IXix is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.