Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gmem source and target #933

Open
helgoboss opened this issue Jul 6, 2024 · 2 comments
Open

gmem source and target #933

helgoboss opened this issue Jul 6, 2024 · 2 comments
Labels
enhancement New feature or request realearn Related to ReaLearn

Comments

@helgoboss
Copy link
Owner

helgoboss commented Jul 6, 2024

Some info here by mschnell: https://forum.cockos.com/showpost.php?p=2794223&postcount=4320 and https://forum.cockos.com/showthread.php?p=2794246#post2794246

@helgoboss helgoboss added the enhancement New feature or request label Jul 6, 2024
@helgoboss helgoboss added the realearn Related to ReaLearn label Jul 25, 2024
@helgoboss
Copy link
Owner Author

Just wrote to Justin after realizing that there's currently no safe way to read/write gmem from C++ extensions. Amazingly, he replied very quickly and added a way to read/write safely. Will be in next dev version. I don't know yet whether it will be official and documented, let's check the next changelog.

The question is now how this new possibility could be used in ReaLearn. I suppose starting with a ReaLearn "gmem source" would be most useful. The way I imagine it to work is this:

  1. A JSFX writes a single numeric (64-bit double) value to the start of a gmem segment with name bla. If that value is supposed to be an absolute value, it should be normalized (a number between 0.0 and 1.0 where 0.0 represents the minimum and 1.0 the maximum). If that value is supposed to be a relative discrete adjustment, any negative or positive integer is allowed.
  2. The ReaLearn source must be configured with the same name (bla). It then picks up any change of the first value of that gmem segment. Also, there's a character dropdown that allows the user to pick between "Absolute normalized" and " "Relative discrete" (so that the values are interpreted correctly).
  3. Whenever ReaLearn detects a change of that value, the source fires with the corresponding control value.
  4. As a result, it can trigger anything!

@mschnell1
Copy link

mschnell1 commented Aug 18, 2024

This sounds amazing ! !

It was a really weird situation that ELL and LUA are able to work with gmem, but C++ can't :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request realearn Related to ReaLearn
Projects
None yet
Development

No branches or pull requests

2 participants