Old 11-16-2019, 05:02 AM   #1
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 275
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 online now   Reply With Quote
Old 11-16-2019, 08:53 AM   #2
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,496
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 REMOVED, See ReaPack.

Last edited by Edgemeal; 11-21-2019 at 08:08 AM.
Edgemeal is offline   Reply With Quote
Old 11-16-2019, 09:49 AM   #3
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 275
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 online now   Reply With Quote
Old 11-16-2019, 09:54 AM   #4
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 275
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 online now   Reply With Quote
Old 11-16-2019, 10:02 AM   #5
serr
Human being with feelings
 
Join Date: Sep 2010
Posts: 8,478
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 11-16-2019, 11:07 AM   #6
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,496
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 11-16-2019, 12:30 PM   #7
Tone Ranger
Human being with feelings
 
Tone Ranger's Avatar
 
Join Date: Jan 2019
Location: Toronto, Canada
Posts: 183
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 11-16-2019, 12:48 PM   #8
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 275
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 online now   Reply With Quote
Old 11-16-2019, 01:28 PM   #9
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,496
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.

Last edited by Edgemeal; 11-17-2019 at 08:47 PM. Reason: remove buggy scripts
Edgemeal is offline   Reply With Quote
Old 11-17-2019, 04:57 PM   #10
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 275
Default

Quote:
Originally Posted by Edgemeal View Post
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.
Thanks again Edgemeal, this still wasn't working for me... it took a lot of trial and error but I finally figured it out. I always have a few hidden armed tracks that I use for retrospective record and LBX smartknobs, and they are always track numbers 1-3 because they are saved into my default project template.

What I eventually figured out is that if track number 1 is hidden in the MCP, this script doesn't work, so it's an easy workaround at least - I just the move the hidden tracks down in the tracklist.

Now that it's working, it's AWESOME, I can nudge the mousewheel left and right, using the same modifier I use for horizontal scroll in the arrange window, and the mixer moves exactly as I wanted. When I hold it down it actually glides really smoothly, but you can still move with precision one click/track at a time. I'm also really enjoying being able to scroll the mixer without actually having it in focus and without changing track selection... I'd be surprised if this doesn't become a popular script (although to get the most out of it you need to be able to map the mousewheel left and right nudge to send keyboard messages to Reaper).

If there is an easy fix for the above issue with hidden tracks then that would be great, but if not then it's not a big deal. It's still awesome and I've made a donation.

Thanks again.

Last edited by Joe90; 11-17-2019 at 04:58 PM. Reason: grammar
Joe90 is online now   Reply With Quote
Old 11-17-2019, 08:15 PM   #11
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 275
Default

Quote:
Originally Posted by Edgemeal View Post
Thanks but not seeing a donation (Paypal rip us off?).

Give these a try.
Works perfectly now. Thank you!

Just checked and you're right, didn't go through at all... not sure what happened there, possibly I clicked away from the browser too early before the last confirmation. Glad you said something as I probably wouldn't have noticed. Re-sending now.
Joe90 is online now   Reply With Quote
Old 11-17-2019, 08:20 PM   #12
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,496
Default

Quote:
Originally Posted by Joe90 View Post
Works perfectly now. Thank you!

Just checked and you're right, didn't go through at all... not sure what happened there, possibly I clicked away from the browser too early before the last confirmation. Glad you said something as I probably wouldn't have noticed. Re-sending now.
Got it, Thanks for the donation, and glad I could help.
Edgemeal is offline   Reply With Quote
Old 11-18-2019, 07:00 PM   #13
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,496
Default

Seems possible to do the same thing using REAPER API only, no extensions needed, should work on release and pre-releases too, unless I overlooked something?

e.g., Scroll mixer one track left,
Code:
function ScrollOneTrackLeft()
  local t = {}
  local tr_count = reaper.CountTracks(0)-1
  for i = 0, tr_count do
    local track = reaper.GetTrack(0,i)
    if track and reaper.IsTrackVisible(track, true) then -- true = MCP, false = TCP 
      t[#t+1] = track 
    end
  end 
  local tr = reaper.GetMixerScroll()
  for i = #t, 2, -1  do
    if tr == t[i] then 
      reaper.SetMixerScroll(t[i-1])
      break
    end
  end
end
Download scripts,
Scroll mixer one track left.lua
Scroll mixer one track right.lua

Last edited by Edgemeal; 11-19-2019 at 09:25 AM. Reason: add script names to url links
Edgemeal is offline   Reply With Quote
Old 11-19-2019, 02:10 PM   #14
blunderbust
Human being with feelings
 
Join Date: Feb 2013
Posts: 6
Default

This issue drives me completely nuts..... so while I still have a few strands of hair left would someone please walk me through exactly how to get this to work? I put the two files in the Scripts folder, loaded and ran them but no change and clearly I am not experienced at this whole scripting thing. My Track 1 in the MCP is active too btw in reference to the previously stated anomaly. Any help would greatly be appreciated.
blunderbust is offline   Reply With Quote
Old 11-19-2019, 03:02 PM   #15
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 275
Default

Quote:
Originally Posted by blunderbust View Post
This issue drives me completely nuts..... so while I still have a few strands of hair left would someone please walk me through exactly how to get this to work? I put the two files in the Scripts folder, loaded and ran them but no change and clearly I am not experienced at this whole scripting thing. My Track 1 in the MCP is active too btw in reference to the previously stated anomaly. Any help would greatly be appreciated.
Hi Blunderbust. These actions won't override your standard mixer scroll, they are an alternative scroll method, so you need to assign the actions to a keyboard shortcut (something like '<' and '>' would work well) and then use these keyboard shortcuts to scroll one track at a time more smoothly. If you have third party software to configure your mouse controls for specific programs (I use a logitech mouse which allows this) then you could use that to assign mouse buttons to trigger those actions like I have.

I believe these scripts also require the latest pre-release version of Reaper, which you can find in the pre-release section of this forum.

Edit - I just realised Edgemeal uploaded another version of these scripts - I haven't tested those, I'm still using the previous version that Edgemeal uploaded, as they worked perfectly for me, and I'm on the latest pre-release anyway.
Joe90 is online now   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 04:07 AM.


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