Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools
Old 11-12-2023, 06:11 AM   #1
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 1,447
Default TakeFX_CopyToTake doesn't cause LASTSEL value update in the chunk

The issue is relevant for closed FX chain. In the open one selection does follow the movements of FX instance.

In the animation i'm moving take FX 5 (idx 4) up 1 position.

After it's been moved, the FX 4 which replaced it at index 4 assumes selection.

Didn't test with TrackFX function, but it's probably also affected.

Keeping selection intact makes sense when moving/copying between takes/tracks, but within the same FX chain i think it makes sense to have selected state follow the FX movements (especially when it does follow them in the open FX chain) or at least to have an option to retain its selection. This will obviate using chunk to update it.

(Other issues)

__________________
https://github.com/Buy-One/REAPER-scripts (237)
Latest: Remove invalid project references from 'Recent projects' menu.lua

Last edited by Buy One; 11-21-2023 at 09:32 AM.
Buy One is offline   Reply With Quote
Old 11-12-2023, 08:23 PM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 16,335
Default

Hmm with the UI open the selection state is somewhat arbitrary and incidental based on the control/focus.
Justin is offline   Reply With Quote
Old 11-13-2023, 12:55 AM   #3
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 1,447
Default

In the open FX chain if FX is selected it keeps being selected after being moved with the function. Why should it lose selection in a closed chain?
__________________
https://github.com/Buy-One/REAPER-scripts (237)
Latest: Remove invalid project references from 'Recent projects' menu.lua
Buy One is offline   Reply With Quote
Old 11-15-2023, 05:38 PM   #4
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 16,335
Default

Quote:
Originally Posted by Buy One View Post
In the open FX chain if FX is selected it keeps being selected after being moved with the function. Why should it lose selection in a closed chain?
How about an API to set the last-selected explicitly for the chain? I think that would be more useful.
Justin is offline   Reply With Quote
Old 11-16-2023, 03:12 AM   #5
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 1,447
Default

Quote:
Originally Posted by Justin View Post
How about an API to set the last-selected explicitly for the chain? I think that would be more useful.
As far as i'm concerned the more API the better and i don't object such function because it helps to avoid dealing with the chunk. In FRs i also recently asked for ability to get last selected with Track/TakeFX_GetNamedConfigParm.

But the problem described here is the unexpected, in my opinion, or undocumented behavior of the function. If not augmenting it with new functionality at least supplying with a note in the ReaScript doc that another function, which you propose, should complement it in cases where preservation of selection is required.
__________________
https://github.com/Buy-One/REAPER-scripts (237)
Latest: Remove invalid project references from 'Recent projects' menu.lua

Last edited by Buy One; 11-16-2023 at 09:27 AM.
Buy One is offline   Reply With Quote
Old 11-16-2023, 05:40 AM   #6
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 5,001
Default

Quote:
Originally Posted by Justin View Post
How about an API to set the last-selected explicitly for the chain? I think that would be more useful.
Sorry for intruding this thread with random request, but since you are talking about adding APIs can we also have GetSetEnvelopeVisibility?
https://forum.cockos.com/showthread.php?t=285018

I'm using very weird code with hacks to overcome the problem when envelope is "Inactive" to make it show since chunk/modifications are not responding anymore in that state?

Code:
r.GetFXEnvelope(TRACK, PM_INSPECTOR_FXID, p_id, true)
local enabled_previously
--! WEIRD HACK TO BRING ENVELOPE BACK VISIBLE WHEN CHUNK IS NOT RESPONDING
if not is_visible and fx_env then
  r.TrackList_AdjustWindows(false)
  enabled_previously = true
end
if env_chunk then
  local vis = env_chunk:match("VIS (%d+)")
  if vis == "1" then
      env_chunk = env_chunk:gsub("VIS 1", "VIS 0", 1)
  elseif vis == "0" and not enabled_previously then
      env_chunk = env_chunk:gsub("VIS 0", "VIS 1", 1)
  end
  if not enabled_previously then
      r.SetEnvelopeStateChunk(fx_env, env_chunk, false)
  end
end
r.TrackList_AdjustWindows(false)
This is all just for toggle visible on/off
Sexan is offline   Reply With Quote
Old 07-11-2024, 07:34 PM   #7
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 16,335
Default

Quote:
Originally Posted by Sexan View Post
Sorry for intruding this thread with random request, but since you are talking about adding APIs can we also have GetSetEnvelopeVisibility?
https://forum.cockos.com/showthread.php?t=285018

I'm using very weird code with hacks to overcome the problem when envelope is "Inactive" to make it show since chunk/modifications are not responding anymore in that state?

Code:
r.GetFXEnvelope(TRACK, PM_INSPECTOR_FXID, p_id, true)
local enabled_previously
--! WEIRD HACK TO BRING ENVELOPE BACK VISIBLE WHEN CHUNK IS NOT RESPONDING
if not is_visible and fx_env then
  r.TrackList_AdjustWindows(false)
  enabled_previously = true
end
if env_chunk then
  local vis = env_chunk:match("VIS (%d+)")
  if vis == "1" then
      env_chunk = env_chunk:gsub("VIS 1", "VIS 0", 1)
  elseif vis == "0" and not enabled_previously then
      env_chunk = env_chunk:gsub("VIS 0", "VIS 1", 1)
  end
  if not enabled_previously then
      r.SetEnvelopeStateChunk(fx_env, env_chunk, false)
  end
end
r.TrackList_AdjustWindows(false)
This is all just for toggle visible on/off

ah yeah, adding some ways to tweak these directly. vis/arm/active/show in lane, what else?
Justin is offline   Reply With Quote
Reply

Thread Tools

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 10:34 PM.


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