![]() |
#1 |
Human being with feelings
Join Date: May 2014
Location: France
Posts: 30
|
![]()
Hi, I am trying to fix an issue with Reaper API in Lua and I think there is a potential Issue with Min and Max Values inverted in my example with ReaSurround Pan and the param "scene X":
I am using W11 Pro 23H2 and Reaper v7.12. Here is the an example of the output in my console: > reaper.TrackFX_GetParamName(tr, 0, 3) {true, "scene X"} > reaper.TrackFX_GetParamEx(tr, 0, 3) {1.0, 1.0, 0.0, 0.5} > reaper.TrackFX_GetParamNormalized(tr, 0, 3) 0.0 > reaper.TrackFX_SetParamNormalized(tr, 0, 3, 1) true > reaper.TrackFX_GetParamNormalized(tr, 0, 3) 0.0 > reaper.TrackFX_SetParamNormalized(tr, 0, 3, 0) true > reaper.TrackFX_GetParamNormalized(tr, 0, 3) 1.0 |
![]() |
![]() |
![]() |
#2 |
Human being with feelings
Join Date: May 2014
Location: France
Posts: 30
|
![]()
I think the issue is at SetParamNormalized which doesnt handle rare case of params which have a minValue >= to maxValue.
|
![]() |
![]() |
![]() |
#3 |
Administrator
Join Date: Mar 2007
Location: NY
Posts: 17,115
|
![]()
The 'scene X' parameter in ReaSurroundPan is inverted, as you noticed, in order to match the convention with track pan where positive values mean pan left and negative values mean pan right.
For consistency with other functions I'm not sure whether it's better to fix SetParamNormalized() or GetParamNormalized(), but they do need to be consistent, so we will fix that, thanks for the report. Last edited by schwa; 04-08-2024 at 04:43 AM. |
![]() |
![]() |
![]() |
#4 |
Human being with feelings
Join Date: Apr 2021
Posts: 676
|
![]()
Heh, think I just ran into this myself yesterday with my very first time writing code to interface with Reaper.
I'll be following along to see which solution is chosen to see if I need to remove a '-' from my code or not. ![]() |
![]() |
![]() |
![]() |
#5 | |
Human being with feelings
Join Date: May 2014
Location: France
Posts: 30
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#6 |
Human being with feelings
Join Date: Sep 2019
Posts: 1,447
|
![]()
Interesting perspective, i've always thought that the the position in the stereo field was relative to the listener facing the source rather than the player facing the listener. And this is born out in the track pan behavior, when the UI shows X%L the value returned by the Info_Value function is negative and when it shows X%R the value is positive
__________________
♦ https://github.com/Buy-One/REAPER-scripts (237) Latest: Remove invalid project references from 'Recent projects' menu.lua |
![]() |
![]() |
![]() |
Thread Tools | |
|
|