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

Reply
 
Thread Tools Display Modes
Old 07-07-2023, 10:50 PM   #1
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default Right projects tabs not accessible and blocked by MONITOR FX button [FIXED]

Last projects tab(s) are not accessible if there are lot of tabs - they are blocked by MONITOR FX button !!! (deserves a fix, please...)

< and > arrows in tabs bar to navigate to the right or left within tabs would be nice.


!!! EDIT 20230720: This issue was fixed in version 6.81+dev0720a. Thank you.

Last edited by akademie; 07-20-2023 at 03:11 PM.
akademie is offline   Reply With Quote
Old 07-18-2023, 03:18 PM   #2
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

pretty please
akademie is offline   Reply With Quote
Old 07-18-2023, 05:11 PM   #3
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,649
Default

Maybe use a couple Lua scripts/functions? Something like,..

Code:
  -- Select next project.lua
  local p = reaper.EnumProjects(-1)
  for i = 0, 99 do
    if p == reaper.EnumProjects(i) and reaper.EnumProjects(i+1) ~= nil then
      reaper.SelectProjectInstance(reaper.EnumProjects(i+1))
      break
    end
  end
Code:
  -- Select previous project.lua
  local p = reaper.EnumProjects(-1)
  for i = 0, 99 do
    if p == reaper.EnumProjects(i) and reaper.EnumProjects(i-1) ~= nil then
      reaper.SelectProjectInstance(reaper.EnumProjects(i-1))
      break
    end
  end
Edgemeal is offline   Reply With Quote
Old 07-18-2023, 05:38 PM   #4
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,050
Default

The Dev Builds have all the select project tabs needed.

I’m looking fwd for it to be in the public build.
For now I work with the dev builds no problems
lexaproductions is offline   Reply With Quote
Old 07-19-2023, 02:42 AM   #5
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

no, dev builds have no way to "see" what projects are open in tabs to the right if there are many of them (and with longer names).

This is obviously a bug, the project tab bar should end right before the MonitorFX button to be able to simply click the right-most project tab to activate it.

As an addition, scrolling the project tab bar would be super nice to have.

I do not want to select e.g. Project tab #20 (which is not visible) directly using actions, because I only want to inspect what is openend in tab #19, #20 and #21, then I would select appropriate tab manually depending what I decide to choose.
akademie is offline   Reply With Quote
Old 07-19-2023, 02:57 AM   #6
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

Quote:
Originally Posted by Edgemeal View Post
Maybe use a couple Lua scripts/functions? Something like,..
<snip>...
[/CODE]
Thanks, but for that there are also native actions "Project tabs: Switch to previous project tab" and "Project tabs: Switch to next project tab" which I have to use and sometimes even create these two buttons in my main toolbar.

Working workaround, but still this way I have to activate all tabs in between, while browsing next>next (or prev<prev) so if the tabs contain big projects it loads=activate projects which I even do not need.

E.g. to activate project tab #23, if active tab is #3 and total open tabs is 50, means to click the last visible and accessible tab in tab bar, let's say it is #15 (it will load=activate project), then use the" next" action 8 times (it will activate 7 big projects one by one unnecessarily) and finally activate the tab I needed. BAD
akademie is offline   Reply With Quote
Old 07-19-2023, 05:25 AM   #7
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,050
Default

Quote:
Originally Posted by akademie View Post
no, dev builds have no way to "see" what projects are open in tabs to the right if there are many of them (and with longer names).

This is obviously a bug, the project tab bar should end right before the MonitorFX button to be able to simply click the right-most project tab to activate it.

As an addition, scrolling the project tab bar would be super nice to have.

I do not want to select e.g. Project tab #20 (which is not visible) directly using actions, because I only want to inspect what is openend in tab #19, #20 and #21, then I would select appropriate tab manually depending what I decide to choose.
Ah ok I understand…
This is the main reason why I built my own tablist in Realive years ago.
lexaproductions is offline   Reply With Quote
Old 07-19-2023, 07:04 AM   #8
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,649
Default

Quote:
Originally Posted by akademie View Post
I do not want to select e.g. Project tab #20 (which is not visible) directly using actions, because I only want to inspect what is openend in tab #19, #20 and #21, then I would select appropriate tab manually depending what I decide to choose.
Maybe devs could add a list, something like?...

Experimental script: Project tab selector.lua

Edgemeal is offline   Reply With Quote
Old 07-19-2023, 07:52 AM   #9
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

Yes, a native list of projects would be fine (without need of imGui though

In any case thanks for the script Edgemeal

Last edited by akademie; 07-19-2023 at 08:01 AM.
akademie is offline   Reply With Quote
Old 07-19-2023, 08:40 PM   #10
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,050
Default

Quote:
Originally Posted by Edgemeal View Post
Maybe devs could add a list, something like?...

Experimental script: Project tab selector.lua

Pretty cool to do it with ImGui. Wondering if it's more efficient than doing it with the gfx stuff.

Just a side note. I think REAPER allows up to 127 or 128 Opened project tabs, so you might want to use that max value in your for loop.
lexaproductions is offline   Reply With Quote
Old 07-20-2023, 07:23 AM   #11
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,649
Default

Probably the most efficient way would be to just use a submenu, only need to get list of open projects once, can show checkmark next to current active project, allows user to see all open projects and select one. REAPER already has a million menus, what's one more?
Edgemeal is offline   Reply With Quote
Old 07-20-2023, 01:02 PM   #12
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,534
Default

Adapted it to show the list in a menu (+ checkbox for current tab, shortcuts for the first 10 projects, filename tooltip, support for up to infinity project tabs, fixed selection if >1 tabs have the same name):



Code:
dofile(reaper.GetResourcePath() ..
       '/Scripts/ReaTeam Extensions/API/imgui.lua')('0.8')

local ImGui = {}
for name, func in pairs(reaper) do
  name = name:match('^ImGui_(.+)$')
  if name then ImGui[name] = func end
end

local ctx = ImGui.CreateContext('Project tab selector',
  ImGui.ConfigFlags_NoSavedSettings())
local sans_serif = ImGui.CreateFont('sans-serif', 13)
ImGui.Attach(ctx, sans_serif)

local function tooltipForItem(text)
  if ImGui.IsItemHovered(ctx, ImGui.HoveredFlags_DelayNormal()) and
      ImGui.BeginTooltip(ctx) then
    ImGui.PushTextWrapPos(ctx, ImGui.GetFontSize(ctx) * 35)
    ImGui.Text(ctx, text)
    ImGui.PopTextWrapPos(ctx)
    ImGui.EndTooltip(ctx)
  end
end

local function projectItem(n, project, filename, current)
  local name = reaper.GetProjectName(project, '')
  if name:len() < 1 then name = ('[Unsaved %d]'):format(n) end

  local shortcut, shortcutPressed
  if n <= 10 then
    shortcut = tostring(n):sub(-1)
    local key = ImGui['Key_' .. shortcut]()
    shortcutPressed = ImGui.IsKeyPressed(ctx, key)
  end

  if ImGui.MenuItem(ctx, name, shortcut, current) or shortcutPressed then
    reaper.SelectProjectInstance(project)
  end
  if shortcutPressed then
    ImGui.CloseCurrentPopup(ctx)
  end
  if filename:len() > 0 then
    tooltipForItem(filename)
  end
end

local function projectList()
  local currentProject = reaper.EnumProjects(-1)

  for i = 0, math.huge do
    local project, filename = reaper.EnumProjects(i)
    if not project then break end

    ImGui.PushID(ctx, i)
    projectItem(i + 1, project, filename, project == currentProject)
    ImGui.PopID(ctx)
  end
end

local function loop()
  if ImGui.IsWindowAppearing(ctx) then
    ImGui.SetNextWindowPos(ctx,
      ImGui.PointConvertNative(ctx, reaper.GetMousePosition()))
    ImGui.OpenPopup(ctx, 'Select a project')
  end

  ImGui.PushFont(ctx, sans_serif)
  if ImGui.BeginPopup(ctx, 'Select a project', ImGui.WindowFlags_TopMost()) then
    projectList()
    ImGui.End(ctx)
    reaper.defer(loop)
  end
  ImGui.PopFont(ctx)
end

reaper.defer(loop)

Last edited by cfillion; 07-20-2023 at 02:40 PM.
cfillion is offline   Reply With Quote
Old 07-20-2023, 01:33 PM   #13
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

It looks pretty cool cfillion, yeah

But still, ImGui cannot be used (=is not working) on most older laptops (I think due to low OpenGL versions)
akademie is offline   Reply With Quote
Old 07-20-2023, 01:37 PM   #14
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,534
Default

Quote:
Originally Posted by akademie View Post
But still, ImGui cannot be used (=is not working) on most older laptops (I think due to low OpenGL versions)
Solved that a while ago in v0.8 with the addition of a DirectX 10 renderer and automatic fallback to software rendering if the GPU is too ancient. Any machine running Windows Vista* or newer is compatible now (unless there's another problem I'm not aware of? if so, what error message do you get?).

(* The DirectX 10 software rasterizer component is pre-installed on Windows 7 and up. On Vista it came with the update KB971644.)

Last edited by cfillion; 07-20-2023 at 02:07 PM.
cfillion is offline   Reply With Quote
Old 07-20-2023, 02:25 PM   #15
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

Oh heavens, that's a very good news.
Thank you, I will try it tomorrow or during weekend.

(There is some openGL emulator DLL which kind of worked, but it was too much hassle to add all of that to installations, so I limited myself to native only Reaper
Of course I can have and sometimes I have version where some extensions, SWS, js_ReaAPI etc. have installed, but mainly focusing on doing most from what is available directly

Anyway imGui is now rather standard for large number of cool scripts which require graphic controls so I am glad for your updated info and code of ReaImGUI

So again, thank you.
akademie is offline   Reply With Quote
Old 07-20-2023, 03:13 PM   #16
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

BTW, the issue was fixed in version 6.81+dev0720a.
Thank you devs.

I still appreciate additional approaches, like list of project tabs etc. presented here in the thread...
akademie is offline   Reply With Quote
Old 07-28-2023, 02:04 PM   #17
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 925
Default

Another one, for collection, uses regular REAPER menu, no dependencies

__________________
https://github.com/Buy-One/REAPER-scripts
REAPER is a DAW whose user guide file is larger than its installation file
Buy One is online now   Reply With Quote
Old 07-28-2023, 02:10 PM   #18
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

^^^^^^^ Oh, yeah, well done Buy One. Thanks

EDIT:
just one minor graphics glitch, see screenshot

Last edited by akademie; 07-28-2023 at 02:32 PM.
akademie is offline   Reply With Quote
Old 07-29-2023, 12:00 AM   #19
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 925
Default

Not sure what this is in the screenshot. I didn't notice anything odd while testing. When the menu opens a small GUI box opens at the top left corner of the screen because the menu is part of the ReaScript gfx library, maybe this is it, although on Windows it looks different and is located higher. Unfortunately cannot look into this further because i have no access to a Mac.
__________________
https://github.com/Buy-One/REAPER-scripts
REAPER is a DAW whose user guide file is larger than its installation file
Buy One is online now   Reply With Quote
Old 07-29-2023, 09:26 AM   #20
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,649
Default

It unlikely the OS will allow a window to be zero size (especially one that has borders/titlebar), a simple way to hide a window is to move it off the screen (on Windows at least),
gfx.init( '',0,0,0, -100, -100 )
But that doesn't work, the gfx window is still visible at top-left on my Win10.
Edgemeal is offline   Reply With Quote
Old 07-29-2023, 01:08 PM   #21
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 925
Default

What i tried was to hide it behind the menu but this method is hit and miss because the location the menu will open at is not obvious in advance, it seems to depend on both the mouse position and menu length.
__________________
https://github.com/Buy-One/REAPER-scripts
REAPER is a DAW whose user guide file is larger than its installation file
Buy One is online now   Reply With Quote
Old 07-29-2023, 02:39 PM   #22
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,050
Default

Here is a simple version version with no gfx window:



Last edited by lexaproductions; 07-30-2023 at 11:34 AM.
lexaproductions is offline   Reply With Quote
Old 07-29-2023, 02:56 PM   #23
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,050
Default

As a bonus, here's a version with the full list length

lexaproductions is offline   Reply With Quote
Old 07-29-2023, 11:55 PM   #24
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

Thank you lexaproductions, but these require SWS|S&M - JS_API extensions, so I will stick with Buy One's version which is simply "native".
akademie is offline   Reply With Quote
Old 07-30-2023, 12:09 AM   #25
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 925
Default

Quote:
Originally Posted by lexaproductions View Post
Here is a simple version version with no gfx window
Pored over the code trying to figure out what the trick was. But on Windows the menu doesn't load and i have all the listed extensions installed although i don't see calls to them in the script. So does this mean that on MacOS gfx.init can be omitted for the menu?
__________________
https://github.com/Buy-One/REAPER-scripts
REAPER is a DAW whose user guide file is larger than its installation file
Buy One is online now   Reply With Quote
Old 07-30-2023, 12:43 AM   #26
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

^^^^^^ oh yeah, for me it didn't work at all also and I though it's becasue of the required extensions.

But now, trying to paste gfx.init('', 0, 0) to the code it started to work, but with the same result = part of the main window detached from the list.
akademie is offline   Reply With Quote
Old 07-30-2023, 02:51 AM   #27
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,050
Default

I think because it’s a menu, you must start it with a key command. Have you tried?

I don’t think you need a gfx init for this

Not sure you need sws either. Not in front of the code right now so can’t tell.
lexaproductions is offline   Reply With Quote
Old 07-30-2023, 03:14 AM   #28
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

Quote:
Originally Posted by lexaproductions View Post
I think because it’s a menu, you must start it with a key command. Have you tried?

I don’t think you need a gfx init for this

Not sure you need sws either. Not in front of the code right now so can’t tell.
Sure I did. I mapped a key to the action and nothing happens. When I added the gfx init code line it started to show the list, but again with the micro window bar somewhere in the left.
akademie is offline   Reply With Quote
Old 07-30-2023, 06:39 AM   #29
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,050
Default

That’s interesting
I’ll look it up on a pc
lexaproductions is offline   Reply With Quote
Old 07-30-2023, 06:42 AM   #30
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,649
Default

@ lexaproductions
No menu shown on Win10 here for either script, I see 'GDI Object' counter for reaper.exe increases by 2 for a ~sec then decreases by 2, so can only guess its trying to load/show it but silently fails. I always thought you had to have a gfx window to use the gfx menu?
Edgemeal is offline   Reply With Quote
Old 07-30-2023, 07:15 AM   #31
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,050
Default

Must be a windows thing as it works on my Mac.

I’ll investigate.
lexaproductions is offline   Reply With Quote
Old 07-30-2023, 07:21 AM   #32
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 925
Default

akademie seems to also be using Mac, so the reason could lie deeper, like in the version of MacOS or other factors.
__________________
https://github.com/Buy-One/REAPER-scripts
REAPER is a DAW whose user guide file is larger than its installation file
Buy One is online now   Reply With Quote
Old 07-30-2023, 07:40 AM   #33
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

it was only your (Buy One) script that I used on Mac (Monterey).

Then both, your and lexaproductions' scripts I am using during weekend on Windows 10

I can try the lexaproductions ones in Monterey later today or tomorrow just to confirm if working in vanilla Reaper in Mac.
akademie is offline   Reply With Quote
Old 07-30-2023, 11:08 AM   #34
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 925
Default

Ah, OK, that would help to clear things up
__________________
https://github.com/Buy-One/REAPER-scripts
REAPER is a DAW whose user guide file is larger than its installation file
Buy One is online now   Reply With Quote
Old 07-30-2023, 11:25 AM   #35
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,050
Default

Quote:
Originally Posted by Buy One View Post
akademie seems to also be using Mac, so the reason could lie deeper, like in the version of MacOS or other factors.
FWIW, I just made a totally clean portable install without SWS or any other user plugin installed.

Loaded the script in the action list and assigned the key [0] to it. It's working.

I have an M2 macbook pro running ventura.

That being said, I did find a small bug in the bug. Please download again

Last edited by lexaproductions; 07-30-2023 at 11:32 AM.
lexaproductions is offline   Reply With Quote
Old 07-30-2023, 05:49 PM   #36
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,686
Default

OK, I tried the last lexaproductions' script "Realive_ProjectTab_Menu With List Length.lua" and it WORKS in macOS Monterey 12.3.1, but DOES NOT WORK in Windows 10 (32-bit).

macOS Monterey 12.3.1 and REAPER v6.81+dev0719 = WORKING OK
Windows 10 (32-bit) and REAPER v6.81+dev0730 = NOT WORKING

Last edited by akademie; 07-30-2023 at 06:02 PM.
akademie is offline   Reply With Quote
Old 07-30-2023, 11:48 PM   #37
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 925
Default

Thank you academie, that's a bit of a revelation. May ask Justin as to why this is so.
__________________
https://github.com/Buy-One/REAPER-scripts
REAPER is a DAW whose user guide file is larger than its installation file
Buy One is online now   Reply With Quote
Old 07-31-2023, 09:06 AM   #38
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,050
Default

So can somebody with a PC confirm that this simple script won't show anything on a window's computer?

Code:
gfx.showmenu('1. Menu Line|2. Menu Line')
lexaproductions is offline   Reply With Quote
Old 07-31-2023, 10:33 AM   #39
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,751
Default

Quote:
Originally Posted by lexaproductions View Post
So can somebody with a PC confirm that this simple script won't show anything on a window's computer?
Quote:
gfx.showmenu('1. Menu Line|2. Menu Line')
This line alone doesn't show anything.

As far as I know, this function only works when a gfx window was initialized first <-- EDIT: I remembered it wrong, see the next posts

So the issue in the example code below is that you'll have to get the mouse cursor (x and y) positions before initializing the window (probably with a non-native function):
Otherwise the gfx window will have x=0, y=0 as starting coordinates.

Code:
gfx.x, gfx.y = gfx.mouse_x, gfx.mouse_y
reaper.ShowConsoleMsg(gfx.x .. " / " .. gfx.y .. "\n")

gfx.init(" ", 0, 0, 0, gfx.x, gfx.y) -- gfx.init("name"[,width,height,dockstate,xpos,ypos] )

gfx.x, gfx.y = gfx.mouse_x, gfx.mouse_y
reaper.ShowConsoleMsg(gfx.x .. " / " .. gfx.y)

gfx.showmenu("1. Menu Line|2. Menu Line")
Can't remember exactly if hiding the gfx windows completely is possible. So you'll probably have to use functions of one of the extensions for this.


EDIT: Just did a test on Windows so far. Haven't tried it on macOS yet.
__________________
ReaLauncher

Last edited by solger; 07-31-2023 at 10:52 AM.
solger is offline   Reply With Quote
Old 07-31-2023, 10:42 AM   #40
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,050
Default

Quote:
Originally Posted by solger View Post
This line alone doesn't show anything. As far as I know this function only works inside a gfx window
So the issue in the example code below is that you'll have to get the mouse cursor (x and y) positions before initializing the window (probably with a non-native function):

Code:
gfx.x, gfx.y = gfx.mouse_x, gfx.mouse_y
reaper.ShowConsoleMsg(gfx.x .. " / " .. gfx.y .. "\n")

gfx.init(" ", 0, 0, 0, gfx.x, gfx.y) -- gfx.init("name"[,width,height,dockstate,xpos,ypos] )

gfx.x, gfx.y = gfx.mouse_x, gfx.mouse_y
reaper.ShowConsoleMsg(gfx.x .. " / " .. gfx.y)

gfx.showmenu("1. Menu Line|2. Menu Line")
Thanks Solger, I understand what you're saying. But why is this working then?

lexaproductions 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 07:22 AM.


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