Old 08-15-2019, 04:09 PM   #1
Mr. Green
Human being with feelings
 
Join Date: Jul 2010
Posts: 373
Default Reaper opening FX on the wrong monitor

How do I get Reaper to open FX plugin windows on Monitor 1 instead of Monitor 3? Really could use some help on this one. Losing a lot of time dragging windows over. And over. And over again.
Mr. Green is offline   Reply With Quote
Old 08-15-2019, 09:36 PM   #2
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,204
Default

What I did was to open a separate docker for effects.

I have 4 dockers total, 2 for toolbars around the TCP on Monitor 1, one for the mixer and a couple other tabs on Monitor 2, and the 4th one for Effects plus a few more tabs on Monitor 3.

I set preferences->Plugins to Auto-dock new FX chain windows. The first time I did it, it opened the FX window in the wrong docker and I just dragged the tab to the correct docker. It opens there now every time. To keep Effect tabs in that docker from piling up, I also checked 'Only allow one FX chain open at a time'.
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams
Philbo King is online now   Reply With Quote
Old 08-16-2019, 12:39 AM   #3
Skorobagatko
Human being with feelings
 
Skorobagatko's Avatar
 
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
Default

You can use this script: https://forum.cockos.com/showthread....Lbx+positioner
Skorobagatko is offline   Reply With Quote
Old 08-16-2019, 01:10 PM   #4
Mr. Green
Human being with feelings
 
Join Date: Jul 2010
Posts: 373
Default

Quote:
Originally Posted by Philbo King View Post
What I did was to open a separate docker for effects.

I have 4 dockers total, 2 for toolbars around the TCP on Monitor 1, one for the mixer and a couple other tabs on Monitor 2, and the 4th one for Effects plus a few more tabs on Monitor 3.

I set preferences->Plugins to Auto-dock new FX chain windows. The first time I did it, it opened the FX window in the wrong docker and I just dragged the tab to the correct docker. It opens there now every time. To keep Effect tabs in that docker from piling up, I also checked 'Only allow one FX chain open at a time'.
This is an interesting approach, but I should have specified up front that I am referring to Floating FX windows rather than the FX Chain window, so I don't think this will work in my case. Unless it will and I am missing something. Thanks though!
Mr. Green is offline   Reply With Quote
Old 08-16-2019, 01:12 PM   #5
Mr. Green
Human being with feelings
 
Join Date: Jul 2010
Posts: 373
Default

Quote:
Originally Posted by Skorobagatko View Post
The problem I'm running into with this script is that it seems to affect ALL open FX windows, and I need to affect new Floating windows only. Explaining why next...
Mr. Green is offline   Reply With Quote
Old 08-16-2019, 01:26 PM   #6
Mr. Green
Human being with feelings
 
Join Date: Jul 2010
Posts: 373
Default

So I've managed to figure out the reason for this behavior is because, on my three monitor setup, I like the third monitor - off to one side - to have a number of plugins permanently parked there to show levels and gain reduction activity in certain busses throughout the mix. Kind of like my own "rackmount" giving me constant feedback. Whereas I have my Mixer parked on monitor one and the TCP on monitor two.

Since I manually manage which Floating FX windows I have open as I need them over the Mixer (directly in front of me on monitor one), the issue arises once I close the last open Floating FX window on my Mixer monitor, work in the Mixer for a bit, then add a new plug which is set to open automatically as Floating. Since I have an assortment of open windows on the third monitor, Reaper (incorrectly) assumes I want a new instance to open there instead of the Mixer monitor I am working from.

It's not really as messy as it might sound. I just really need a way to instruct Reaper to ALWAYS open a new Floating FX window on a specific monitor - or coordinates like on that script mentioned earlier - while leaving the FX on monitor three unaltered, remaining in place. Any suggestions would be welcome.

(I'm hoping that Edgemeal might be able to add a MTM function for New Floating FX windows to his AOT script, but no word on that yet)

edit: my current, somewhat weird workaround at the moment is to have one Floating FX window constantly open and shrunken to it's smallest state, parked in a corner of the Mixer monitor. It's annoying, but at least then the FX open where they should.

Last edited by Mr. Green; 08-16-2019 at 01:31 PM.
Mr. Green is offline   Reply With Quote
Old 08-16-2019, 11:36 PM   #7
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 2,167
Default

I've the same issue happening on my dual monitor setup.

Most times the NEW FX window is hidden behing the other ones [monitor 2].

Sure messes with the workflow.
RJHollins is offline   Reply With Quote
Old 08-17-2019, 05:36 AM   #8
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
Default

Care to test an (Windows only) idea?
Open and position the FX windows you want to stay put, then in WinScreen.exe select the target monitor and tick the 'Enable' checkbox. If the checkbox is already ticked then toggle it (on-off-on). Any new FX windows should get moved to the center of the target monitor.

Note, if a FX window opens on the target monitor then the app currently ignores it.

Last edited by Edgemeal; 10-23-2019 at 05:54 AM.
Edgemeal is offline   Reply With Quote
Old 08-17-2019, 08:01 AM   #9
Mr. Green
Human being with feelings
 
Join Date: Jul 2010
Posts: 373
Default

Quote:
Originally Posted by Edgemeal View Post
Care to test an (Windows only) idea?
Open and position the FX windows you want to stay put, then in WinScreen.exe select the target monitor and tick the 'Enable' checkbox. If the checkbox is already ticked then toggle it (on-off-on). Any new FX windows should get moved to the center of the target monitor.

Note, if a FX window opens on the target monitor then the app currently ignores it.
Oh WOW!!!
Seriously man - did you just make this??
First tests are awesome - better than I could hope to ask!
I won't have time to do thorough testing until tomorrow, but a quick test here does the following:

-Opening a session with windows already in place, enabling WinScreen, then opening a new Floating FX positions the new FX dead center on the Target Monitor - exactly as described.

-After re-positioning and closing any FX windows, positions are restored correctly when reopened later - EXCEPT when moved to monitor 3, in which case once reopened, the window is re-positioned and re-centered on the Target Monitor.

-Opening a session with WinScreen left enabled, open FX windows on monitor 1 and 2 retain their positions correctly, while any FX windows on monitor 3 are re-positioned to the Target Monitor. Also (and boy is this nitpicking) one open FX window stored with the session missed the AOT command (also running in the background) to "stay on top", and had to be pulled out from behind the mixer.

Honestly, just where it stands right now, I am THRILLED with this little app! Do you have further plans for it?

Big thanks Edgemeal!!
Mr. Green is offline   Reply With Quote
Old 08-17-2019, 08:33 AM   #10
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
Default

No plans to develop, was just messing around since it was raining and got bored LOL, heres the source code as is, have fun!

Some quick changes, v0.5.
Remove Fx window counter.
Compile as AnyCPU, and Single Instance app.
Set CboMonitor to 'DropDownList' so user can't enter invalid monitor #.
Minor performance tweak for Function EnumFxWindows
Add option to ignore fx chain windows.

Last edited by Edgemeal; 04-13-2022 at 12:47 PM.
Edgemeal is offline   Reply With Quote
Old 08-17-2019, 08:54 AM   #11
poetnprophet
Human being with feelings
 
poetnprophet's Avatar
 
Join Date: Jan 2018
Posts: 1,651
Default

Subscribing so I can try this out, thank you!
__________________
https://www.kdubbproductions.com/
https://www.youtube.com/channel/UCpC...2dGA3qUWBKrXQQ
i7 8700k,4.9Ghz,Win10,Reaper 6,Motu 828es, Cranborne ADAT500
poetnprophet is offline   Reply With Quote
Old 08-17-2019, 10:41 AM   #12
WolfJames
Human being with feelings
 
WolfJames's Avatar
 
Join Date: Feb 2009
Location: Nashville, TN
Posts: 209
Default

Quote:
Originally Posted by Edgemeal View Post
No plans to develop, was just messing around since it was raining and got bored LOL, heres the source code as is, have fun!

Some quick changes, v0.5.
Remove Fx window counter.
Compile as AnyCPU, and Single Instance app.
Set CboMonitor to 'DropDownList' so user can't enter invalid monitor #.
Minor performance tweak for Function EnumFxWindows
Add option to ignore fx chain windows.
Thank you for this!
WolfJames is offline   Reply With Quote
Old 08-20-2019, 09:52 AM   #13
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
Default

Took a crack at Lua version, but don't see how to enumerate displays so you'd have to edit the script and set your target area/monitor bounds. Script currently setup for my second 1080p monitior.

Last edited by Edgemeal; 10-23-2019 at 05:53 AM.
Edgemeal is offline   Reply With Quote
Old 08-20-2019, 10:39 AM   #14
Mr. Green
Human being with feelings
 
Join Date: Jul 2010
Posts: 373
Default

Quote:
Originally Posted by Edgemeal View Post
Took a crack at Lua version, but don't see how to enumerate displays so you'd have to edit the script and set your target area/monitor bounds. Script currently setup for my second 1080p monitior.


Code:
-- Move new FX windows to target area/monitor
-- Edgemeal - Aug 20, 2019
-- Requires: MS Windows, js_ReaScriptAPI extension.
-- Testing: Windows 10 / REAPER 5.982+dev0817 / js_ReaScriptAPI v0.989

------------- USER SETTINGS ----------------
-- Bounds for target monitor
tX = 1921 -- left position of target monitor.
tY = 0   -- top position (usually zero).
tW = 1920 -- workarea width
tH = 1080  -- workarea height
--------------------------------------------

WinInUse = {}
 
function contains(t, val)
  for i = 1, #t do
    if t[i] == val then return true end
  end
  return false
end

function RemoveInvalid() 
  for i = #WinInUse, 1, -1 do 
    if not reaper.JS_Window_IsWindow(WinInUse[i]) then table.remove(WinInUse, i) end
  end 
end

function GetBounds(hwnd)
  ret, left, top, right, bottom = reaper.JS_Window_GetRect(hwnd)
  return left, top, right-left, bottom-top
end

function WindowsInUse()
  local wiu_index = #WinInUse
  local arr = reaper.new_array({}, 1024)
  reaper.JS_Window_ArrayAllTop(arr)
  local adr = arr.table()
  for i = 1, #adr do
    local hwnd = reaper.JS_Window_HandleFromAddress(adr[i])
    if reaper.JS_Window_GetClassName(hwnd) == "#32770" then 
      if IsFxWindow(hwnd) then
        wiu_index = wiu_index + 1
        WinInUse[wiu_index] = hwnd 
      end
    end
  end
end

function IsFxWindow(hwnd)
  local container = reaper.JS_Window_FindChildByID(hwnd, 0)
  if container then
    local cntrl = reaper.JS_Window_FindChildByID(container, 1000)
    if cntrl then
      if reaper.JS_Window_GetClassName(cntrl) == "ComboBox" then
        return true
      end 
    end
  end
  return false
end

function MoveFxWindows() 
  local wiu_index = #WinInUse
  local arr = reaper.new_array({}, 1024)
  reaper.JS_Window_ArrayAllTop(arr)
  local adr = arr.table()
  for i = 1, #adr do
    local hwnd = reaper.JS_Window_HandleFromAddress(adr[i]) 
    if reaper.JS_Window_GetClassName(hwnd) == "#32770" then
      if IsFxWindow(hwnd) and contains(WinInUse, hwnd) == false then
        wiu_index = wiu_index + 1
        WinInUse[wiu_index] = hwnd 
        local x,y,w,h = GetBounds(hwnd)
        if x<0 then x=0 end 
        if y<0 then y=0 end  
        if x >= tX and x < tX+tW then
        -- do nothing?
        else -- move FX to center of target area
          local cX = math.floor((tW - w) / 2)
          local cY = math.floor((tH - h) / 2)
          reaper.JS_Window_Move(hwnd, tX+cX, tY+cY) 
        end 
      end
    end
  end
end

relax = 3
function Main()
  relax = relax -1
  if relax < 0 then
    relax = 3
    RemoveInvalid()
    MoveFxWindows()
  end
  reaper.defer(Main)
end

WindowsInUse()
Main()
Oh wow - this TOTALLY works -lol! :-D
My desired monitor is actually monitor #1, so setting those first two parameters to 0 works perfect.

I have only one question - how could I modify a copy of the script to either turn the script off (if it is already running) or do nothing (if the script is not running)? Having this would allow me to setup an auto-start to my sessions that would disable the script (if it is running) to prevent parked open windows from being re-positioned when loading a new session.

btw - this seriously needs to be a permanent addition to the script library!

edit: actually, this may not be necessary, as auto-starting with the current script doesn't actually kick in until after the windows are opened. Putting in an auto-start kill command won't get there in time anyway, so...

No worries! :-)

Last edited by Mr. Green; 08-20-2019 at 11:01 AM.
Mr. Green is offline   Reply With Quote
Old 08-20-2019, 11:04 AM   #15
Mr. Green
Human being with feelings
 
Join Date: Jul 2010
Posts: 373
Default

Ok - so how about this (sorry)...

Would it be possible to put something in the script that would automatically kill the script when a project is closed?
Mr. Green is offline   Reply With Quote
Old 08-20-2019, 11:08 AM   #16
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
Default

If you try and run a second instance of the script REAPER should pop up a message, there you tell it to remember your choice and click terminate. After that if the script is already running and you try to run it REAPER closes it, so acts like a toggle on/off thing.
Edgemeal is offline   Reply With Quote
Old 08-20-2019, 11:10 AM   #17
Mr. Green
Human being with feelings
 
Join Date: Jul 2010
Posts: 373
Default

Quote:
Originally Posted by Edgemeal View Post
If you try and run a second instance of the script REAPER should pop up a message, there you tell it to remember your choice and click terminate. After that if the script is already running and you try to run it REAPER closes it, so acts like a toggle on/off thing.
Right. So now I'm thinking I might set up a macro for the "close project" command that would include this one as well - instant toggle off. :-)
Mr. Green is offline   Reply With Quote
Old 08-20-2019, 11:24 AM   #18
Mr. Green
Human being with feelings
 
Join Date: Jul 2010
Posts: 373
Default

Hey Edgemeal,
How do I reset that preferences window so that it shows up again?
Mr. Green is offline   Reply With Quote
Old 08-20-2019, 12:04 PM   #19
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
Default

Quote:
Originally Posted by Mr. Green View Post
Hey Edgemeal,
How do I reset that preferences window so that it shows up again?
It looks like 'reaper-kb.ini' gets updated, I exit reaper, in 'reaper-kb.ini' I see the line for the script starts with,
SCR 260 0
I changed it to,
SCR 4 0
restart reaper, Msg pops up again.
Edgemeal is offline   Reply With Quote
Old 08-20-2019, 12:49 PM   #20
Mr. Green
Human being with feelings
 
Join Date: Jul 2010
Posts: 373
Default

Quote:
Originally Posted by Edgemeal View Post
It looks like 'reaper-kb.ini' gets updated, I exit reaper, in 'reaper-kb.ini' I see the line for the script starts with,
SCR 260 0
I changed it to,
SCR 4 0
restart reaper, Msg pops up again.
Perfect!
Looks like the best way for me is to auto-terminate (toggle).
The only way I can "trip it up" now is to revert a session (reload) - in which case it terminates before the open fx windows are fully positioned, leaving their original position intact. Then all I have to do is reload the script.

Love it! :-)
Mr. Green is offline   Reply With Quote
Old 08-21-2019, 11:53 AM   #21
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
Default Re-Post

NOTE: I've only tested these scripts on Windows!

EDIT Dec 09, 2109 - I've added another script that only moves the FX window, this one doesn't set the fx topmost or hide the REAPER window pins.
---------

BTW, If your only using my AOT app to make the FX windows stay on top, you may not want to try this script...

Note: Just like the AOT app its best to not use REAPER's topmost pins (they are hidden by the script). To make sure REAPER doesn't set the topmost window pins (it saves them from your previous usages) you can delete the file 'reaper-pinstates.ini' in REAPER resources folder.

Last edited by Edgemeal; 04-13-2022 at 12:47 PM.
Edgemeal is offline   Reply With Quote
Old 08-21-2019, 12:54 PM   #22
Mr. Green
Human being with feelings
 
Join Date: Jul 2010
Posts: 373
Default

Quote:
Originally Posted by Edgemeal View Post
BTW, If your only using my AOT app to make the FX windows stay on top, you may not want to try this script...

Note: Do not use REAPER's topmost pins, doing so will disable any windows set topmost by the script. To make sure REAPER doesn't set the topmost window pins (it saves them from your previous usages) you'll want to delete the file 'reaper-pinstates.ini' in REAPER resources folder.

One thing I completely forgot about is that (REAPER bug?) when you restore REAPER from a minimized state all topmost windows are reset to normal, would at least need the IsIconic API function to detect if reaper is in a minimized state.

EDIT Attached v1.02. I made my own IsIconic function by checking REAPER's height and width, should be good enough. This script sets FX topmost (and resets them if REAPER was minimized). This script also hides REAPER's topmost pins.
Works perfect so far!
I'll try it out in lieu of AOT for a while and see how that works out. :-)
Mr. Green is offline   Reply With Quote
Old 01-27-2020, 11:59 AM   #23
Tower Studio
Human being with feelings
 
Tower Studio's Avatar
 
Join Date: Jul 2010
Location: Montpellier, France
Posts: 194
Default

I'm having the same problem as you (for the same exact reasons actually, having a screen with all my "monitoring" plugins), except I'm on a Mac and apparently the scripts don't work here :'(
Tower Studio is offline   Reply With Quote
Old 04-29-2020, 09:35 AM   #24
bFooz
Human being with feelings
 
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
Default

I recently switched to Win10 when I started to experience this problem. Previously on Win7 it was OK.

While the script is a solution partly, I made a bug report here: https://forum.cockos.com/showthread.php?t=233562
bFooz 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 09:08 AM.


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