Old 01-03-2019, 01:30 PM   #1
Nogla
Human being with feelings
 
Join Date: Apr 2018
Location: Kaliningrad
Posts: 38
Default Solo in front dim level request

Which API command should I use to get current dim level from REAPER to adjust that level from the control surface's encoder?
I'm mostly interested in a C++ method. There's also this THING "get_config_var" which is an uncharted territory to me, but maybe it's possible to request current level with it?

Last edited by Nogla; 01-03-2019 at 01:41 PM.
Nogla is offline   Reply With Quote
Old 01-04-2019, 05:56 PM   #2
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Quote:
Originally Posted by Nogla View Post
...
There's also this THING "get_config_var" which is an uncharted territory to me, but maybe it's possible to request current level with it?
This is still only available in pre-release Reaper:
Code:
retval, buf = reaper.get_config_var_string("solodimdb10")
This and SET version is in regular releases (requires SWS):
Code:
C: int SNM_GetIntConfigVar(const char* varname, int errvalue)

EEL: int extension_api("SNM_GetIntConfigVar", "varname", int errvalue)

Lua: integer reaper.SNM_GetIntConfigVar(string varname, integer errvalue)

Python: Int SNM_GetIntConfigVar(String varname, Int errvalue)

[S&M] Returns an integer preference (look in project prefs first, then in general prefs). Returns errvalue if failed (e.g. varname not found).
"solodimdb10" for varname in those too. I have some scripts in ReaPack for mousewheel/keyboard shortcut. Here is discussion: https://forum.cockos.com/showthread.php?t=195464
FnA is offline   Reply With Quote
Old 01-06-2019, 10:10 AM   #3
Nogla
Human being with feelings
 
Join Date: Apr 2018
Location: Kaliningrad
Posts: 38
Default

Thanks. That's helpful.

Last edited by Nogla; 01-06-2019 at 10:50 AM.
Nogla is offline   Reply With Quote
Old 01-06-2019, 11:27 AM   #4
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

I don’t know how to address the things I left out of the quotation. I should mention Get_Action_Context() function, I suppose, for some ability to interact with controllers. That’s about all I got unfortunately.
FnA is offline   Reply With Quote
Old 01-06-2019, 12:13 PM   #5
Nogla
Human being with feelings
 
Join Date: Apr 2018
Location: Kaliningrad
Posts: 38
Default

It's actually working almost as I suspected. Thanks again.
The thing is that there's a short mute for dimmed tracks happening around 0 dB, though the meter is showing that the signal is still passed to the master channel from all those tracks.
In reality I'm gradually increasing dimmed track level up until the point when suddenly only the soloed tracks can be heard. Then, I turn my encoder one tick more, clockwise, and the sound is back again for those dimmed tracks. Can't figure out why is this happening.

Here's my current code which would be adjusted later, so that "solodimdb10" won't go higher than 0 dB or lower than (I guess) -250 dB. Is it the right range?

Nogla is offline   Reply With Quote
Old 01-06-2019, 02:29 PM   #6
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Quote:
Originally Posted by Nogla View Post
...higher than 0 dB or lower than (I guess) -250 dB. Is it the right range?...
If I recall correctly, I modeled my script's limits on what the native REAPER dimming action would go up/down to. I believe it is -0.1dB down to -60.0dB. I think it may have worked outside those limits, but I stuck with them, for whatever reason/just in case.
FnA is offline   Reply With Quote
Old 01-06-2019, 03:31 PM   #7
Nogla
Human being with feelings
 
Join Date: Apr 2018
Location: Kaliningrad
Posts: 38
Default

Done. Thanks.


Last edited by Nogla; 01-06-2019 at 03:48 PM.
Nogla 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 03:20 PM.


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