Old 10-15-2015, 02:40 PM   #1
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default gmem

Hi Experts

I did a suite of multiple JSFXes that can be installed with multiple instances. They use an array of some 1000 gmem slots to communicate.

Is there a recommended way to "allocate" the memory range in a way that multiple 3rd party plugins do not interfere ?

-Michael
mschnell is online now   Reply With Quote
Old 10-15-2015, 02:58 PM   #2
snooks
Banned
 
Join Date: Sep 2015
Posts: 1,650
Default

Yes...

http://reaper.fm/sdk/js/basiccode.php#js_ops

snooks is offline   Reply With Quote
Old 10-15-2015, 03:00 PM   #3
James HE
Human being with feelings
 
James HE's Avatar
 
Join Date: Mar 2007
Location: I'm in a barn
Posts: 4,467
Default

just after the desc, use

options: gmem=whatever



usually i use the effect name as whatever. you can be even more specific by including the developer (your) name, anything you want.
James HE is offline   Reply With Quote
Old 10-16-2015, 01:07 AM   #4
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

Thanks snooks and James,

Found the Namespace option

-Michael

Last edited by mschnell; 10-16-2015 at 01:13 AM.
mschnell is online now   Reply With Quote
Old 08-14-2018, 11:07 AM   #5
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Sorry for necroposting and some stupid questions.

Ok so when I force value to gmem like gmem[some_id], I can share 1,048,576 slots per track/project/all_projects_tabs.
Quote:
options:gmem=someUniquelyNamedSpace
which will make gmem[] refer to a larger shared buffer, accessible by any plugin that uses options:gmem=<the same name>.
8 million entries per someUniquelyNamedSpace or per all namespace memory slots counted together? This option also increases the size of gmem[] to be 8 million entries (from the default 1 million). -- REAPER 4.6+
Any limitations for name, ex. can I use FX GUID as name?

I asked Justin for ability to link FX parameter across tracks
He said:
Quote:
Can't do that -- tracks are processed asynchronously from each other, so while you could link the parameters, it wouldn't work reliably...
but I can put a JSFX which have slider linked to some plugin parameter, then send this value to gmem, and further get gmem value on different track/FX. It works here (just tested). What possible problems and "stability issues" I can have in this area except I guess some samples delay.
mpl is offline   Reply With Quote
Old 08-14-2018, 01:34 PM   #6
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

I understand that by "reliable" he means timing. In fact much more that just "some samples delay".

The processing of two tracks by one of the available CPUs can differ multiple sample-blocks in time. In fact for playback supposedly as many as the latency defined in the sound card driver, and when rendering off-line virtually unlimited many.

So transferring anything that needs to be in any way sample accurate via gmem[] is a no-go.

With my Life setup I in fact do use gmem[] for some realtime parameters (e.g. global transpose of the keyboards). But for the Live usage, of course the latency is set rather small, anyway.

-Michael

Last edited by mschnell; 08-14-2018 at 09:39 PM.
mschnell is online now   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 02:55 AM.


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