Old Today, 05:02 AM   #1
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 135
Default Mixer scrolling query....

There have been many threads on this - the mixer scrolls by about 7 channels in one scroll wheel click, it's quite disorienting... here's what's interesting though. The little arrows on either side of the scroll bar at the bottom of the mixer DO move it by one track in either direction... is this function accessible via scripting?

Surely it's possible to script a mouse scrolling action that overrides the normal mixer scrolling, and simply triggers one of those little arrow buttons in the mixer when you scroll in your desired direction, and then it should scroll smoothly? It will still 'click' from one track to the next so it won't be super smooth, but that's preferable to me than this super long scroll jump we're getting at the moment.

Also, I frequently find myself trying to adjust a volume fader in the mixer with my mousewheel and scrolling by mistake (instantly ending up in a completely different area of the mixer because it scrolls so far), does anyone know of a way of limiting mixer mousewheel scroll to a modifier, or limiting the scroll response to when the cursor is over a certain area of the mixer (like just the scroll bar), or if not, a way to turn it off altogether and assign a key command to the little left/right arrows in the mixer?

Thanks.
Joe90 is offline   Reply With Quote
Old Today, 08:53 AM   #2
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,441
Default

Quote:
Originally Posted by Joe90 View Post
There have been many threads on this - the mixer scrolls by about 7 channels in one scroll wheel click, it's quite disorienting... here's what's interesting though. The little arrows on either side of the scroll bar at the bottom of the mixer DO move it by one track in either direction... is this function accessible via scripting?
Maybe that depends on what layout you have because here it takes two mouse clicks to scroll mixer one full track width.

FWIW, here is a simple script example I testing on Windows 10 with current REAPER Pre-Releases,.. Note this Requires SWS and js_ReaScriptAPI extensions.

Code:
-- Scroll mixer one track width

function msg(str)
  reaper.ShowConsoleMsg(tostring(str) .. '\n')
end

function ScrollMixer(amount)
  local mixer, _ = reaper.BR_Win32_GetMixerHwnd()
  if not mixer then msg('Mixer window not found') return end 

  local hwnd1 = reaper.JS_Window_FindEx(mixer, mixer, 'REAPERMCPDisplay', 'master') -- get child window
  local container = reaper.JS_Window_FindEx(mixer, hwnd1, 'REAPERMCPDisplay', '') -- get 2nd child with same classname
  if not container then msg('Mixer container not found! Requires Pre-Release!') return end
  
  -- get current horizontal scroll position
  local _, position, pageSize, min, max, trkpos = reaper.JS_Window_GetScrollInfo(container, "SB_HORZ") 
  -- scroll amount
  reaper.JS_Window_SetScrollPos(container, "SB_HORZ",  position + amount) 
end

track = reaper.GetTrack(0,0) -- Get 1st track
tr_width = reaper.GetMediaTrackInfo_Value(track, 'I_MCPW') -- get width of track in MCP
ScrollMixer(tr_width) -- positive value scrolls right

Example For REAPER released version (5.984) on Windows, note there is no API to get track size, and mixer layout is different,
Code:
function ScrollMixer(amount)
  local mixer, _ = reaper.BR_Win32_GetMixerHwnd()
  if not mixer then msg('Mixer window not found') return end 
 
  local container = reaper.JS_Window_FindEx(mixer, mixer, '#32770', '')
  if not container then msg('Mixer container not found! Requires Non-Pre-Release!') return end
  
  local _, position, pageSize, min, max, trkpos = reaper.JS_Window_GetScrollInfo(container, "SB_HORZ") 
  reaper.JS_Window_SetScrollPos(container, "SB_HORZ",  position + amount) 
end

ScrollMixer(68) -- amount in pixels / positive value scrolls right

Last edited by Edgemeal; Today at 11:12 AM. Reason: add example for v5.984 / released version
Edgemeal is offline   Reply With Quote
Old Today, 09:49 AM   #3
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 135
Default

Thanks for your reply Edgemeal... so it is technically possible. That's great!

Quote:
Originally Posted by Edgemeal View Post
Maybe that depends on what layout you have because here it takes two mouse clicks to scroll mixer one full track width.
I think you are referring to clicking on the little left and right arrows on the mixer right? I was referring to just simply scrolling with mousewheel in the mixer (I used the word click which was misleading of me, I use a logitech mouse on which the standard scroll wheel clicks by default, but I can switch it to smooth scrolling and it makes no difference) .

As far as I can tell, when scrolling horizontally in the mixer using the standard mousewheel scroll, the smallest increment you can move by is those 7 track chunks (roughly half a page of the mixer). If this is not true and you have different behaviour when mousewheel scrolling in the mixer then that's awesome as I'm obviously just missing a setting somewhere.

If that's not the case, then I'm wondering if you (or any of you other scripting wizards) would consider expanding this script so that it works in both directions when assigned to the mousewheel (which I'm guessing is straightforward), and have it override and replace the standard mixer mousewheel scrolling so it doesn't need a modifier (which I'm guessing is not)? I would happily make a donation for the cause.

Thank you!
Joe90 is offline   Reply With Quote
Old Today, 09:54 AM   #4
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 135
Default

Quote:
Originally Posted by Edgemeal View Post
Code:
-- Scroll mixer one track width

function msg(str)
  reaper.ShowConsoleMsg(tostring(str) .. '\n')
end

function ScrollMixer(amount)
  local mixer, _ = reaper.BR_Win32_GetMixerHwnd()
  if not mixer then msg('Mixer window not found') return end 

  local hwnd1 = reaper.JS_Window_FindEx(mixer, mixer, 'REAPERMCPDisplay', 'master') -- get child window
  local container = reaper.JS_Window_FindEx(mixer, hwnd1, 'REAPERMCPDisplay', '') -- get 2nd child with same classname
  if not container then msg('Mixer container not found! Requires Pre-Release!') return end
  
  -- get current horizontal scroll position
  local _, position, pageSize, min, max, trkpos = reaper.JS_Window_GetScrollInfo(container, "SB_HORZ") 
  -- scroll amount
  reaper.JS_Window_SetScrollPos(container, "SB_HORZ",  position + amount) 
end

track = reaper.GetTrack(0,0) -- Get 1st track
tr_width = reaper.GetMediaTrackInfo_Value(track, 'I_MCPW') -- get width of track in MCP
ScrollMixer(tr_width) -- positive value scrolls right
You just edited this right? It was working in one direction before, just re copied and pasted as I saw you edited it, and now it doesn't work at all... Haven't tried the one below as I'm on the latest pre-release version.
Joe90 is offline   Reply With Quote
Old Today, 10:02 AM   #5
serr
Human being with feelings
 
Join Date: Sep 2010
Posts: 8,395
Default

Quote:
Originally Posted by Joe90 View Post
There have been many threads on this - the mixer scrolls by about 7 channels in one scroll wheel click, it's quite disorienting... here's what's interesting though. The little arrows on either side of the scroll bar at the bottom of the mixer DO move it by one track in either direction... is this function accessible via scripting?

Surely it's possible to script a mouse scrolling action that overrides the normal mixer scrolling, and simply triggers one of those little arrow buttons in the mixer when you scroll in your desired direction, and then it should scroll smoothly? It will still 'click' from one track to the next so it won't be super smooth, but that's preferable to me than this super long scroll jump we're getting at the moment.

Also, I frequently find myself trying to adjust a volume fader in the mixer with my mousewheel and scrolling by mistake (instantly ending up in a completely different area of the mixer because it scrolls so far), does anyone know of a way of limiting mixer mousewheel scroll to a modifier, or limiting the scroll response to when the cursor is over a certain area of the mixer (like just the scroll bar), or if not, a way to turn it off altogether and assign a key command to the little left/right arrows in the mixer?

Thanks.
The first thing is your OS System Preferences mouse/trackpad scrolling speed. It isn't Reaper. You can easily have it set to take 20 wheel clicks to scroll a single track worth, for example.

The second thing: You really have to place the pointer over the fader or 'scroll the mixer tracks' takes over. Pretty sure there's a preference to disable that but don't know it off the top of my head.
serr is offline   Reply With Quote
Old Today, 11:07 AM   #6
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,441
Default

Quote:
Originally Posted by Joe90 View Post
You just edited this right? It was working in one direction before, just re copied and pasted as I saw you edited it, and now it doesn't work at all... Haven't tried the one below as I'm on the latest pre-release version.
I just copied that code to new script and works just fine here, not sure what you did.

I don't think its possible to override how mousewheel works in the Mixer, and Windows 10 mousewheel scroll options have no effect on Mixer here, and even if it did I wouldn't want to change the behavior of all my other apps!

Maybe someday they'll add a mousewheel mouse modifier for the Mixer?
Edgemeal is offline   Reply With Quote
Old Today, 12:30 PM   #7
Tone Ranger
Human being with feelings
 
Tone Ranger's Avatar
 
Join Date: Jan 2019
Location: Toronto, Canada
Posts: 164
Default

I REALLY hope they fix this (Mac OS here). In the TCP I find the vertical scrolling a bit slow, but in the MCP the horizontal scrolling is WAY too fast. This is Reaper, not my mouse settings, as they work predictably in any other program I use....it's only Reaper where the scrolling speed is different (either too fast for the MCP horizontal scrolling, or too slow for the TCP vertical scrolling). I love using Reaper, but this is one of the few pet peeves I have with it!!

I could deal with the TCP being too slow, but the MCP scrolling is close to unusable for anything other than rapidly getting from one end of the MCP to the other.....

Would be so great to have a workaround.....or a native fix!! :-)
Tone Ranger is offline   Reply With Quote
Old Today, 12:48 PM   #8
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 135
Default

Having no luck with it here, I can't script myself but I know enough to know I'm not saving it in the wrong file format or making another obvious error (tried recopying and saving again in case I copied it incorrectly)... very odd, especially as it was kind of working before as well. W10 here too, latest version.

Serr - thanks for your help, I was about to reply but Edgemeal covered what I was going to say.

Edgemeal - I realise I'm getting cheeky now, but is there any chance I could get a couple of scripts to assign those left and right nudge arrows on the mixer to their own separate actions? Then I can assign them to the sideways nudge on my mousewheel (which I can assign to whatever key combination I like using the logitech software) and do it that way.
Joe90 is offline   Reply With Quote
Old Today, 01:28 PM   #9
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,441
Default

AFAIK there is no way to associate a script to any part of the mixer scrollbars. So I think all you could do is try setting these scripts to a key,button or whatever works.
Attached Files
File Type: lua Scroll mixer one track width left.lua (1.1 KB, 0 views)
File Type: lua Scroll mixer one track width right .lua (1.1 KB, 0 views)
Edgemeal 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 10:07 PM.


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