Old 07-07-2015, 01:01 AM   #1
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,687
Default common memory

Hi experts,

I know that there is a common memory array that all loaded EEL2 JSFXes can use and transfer data via same.

Here I have two questions:

1) Can EEL2 ReaScript instances access the same memory (e.g. to transfer Data from a JSFX to a ReaScript ?

2) I suppose JSFXes (and ReaScript instances) can run in multiple threads. Is it appropriate to install a sophisticated mutual access management (semaphores etc) when using the shared memory ?


A related question regarding just Reascript: is there a way to have a code snipped in my script be called at a predefined regular time schedule, unrelated to the sample Rate etc. ?

Thanks,
-Michael

Last edited by mschnell; 07-07-2015 at 01:19 AM.
mschnell is offline   Reply With Quote
Old 07-07-2015, 05:29 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by mschnell View Post
Hi experts,

I know that there is a common memory array that all loaded EEL2 JSFXes can use and transfer data via same.

Here I have two questions:

1) Can EEL2 ReaScript instances access the same memory (e.g. to transfer Data from a JSFX to a ReaScript ?

2) I suppose JSFXes (and ReaScript instances) can run in multiple threads. Is it appropriate to install a sophisticated mutual access management (semaphores etc) when using the shared memory ?


A related question regarding just Reascript: is there a way to have a code snipped in my script be called at a predefined regular time schedule, unrelated to the sample Rate etc. ?

Thanks,
-Michael
No, I don't think the JSFX and ReaScript have a shared memory region.

The JSFX audio processing code sections may be run in multiple threads. ReaScript only runs in the main/GUI thread. EEL has some support for mutex protecting variables but as far as I know that is very expensive to use.

ReaScript has the defer-mechanism which is run by a GUI timer, so is not guaranteed to run your function at exact time intervals.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 07-07-2015, 12:30 PM   #3
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,687
Default

Thanks a lot for your answers !
-Michael
mschnell 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 01:48 PM.


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