|
|
|
03-03-2019, 05:02 AM
|
#1
|
Human being with feelings
Join Date: Jan 2007
Location: The Underground Bunker
Posts: 705
|
How do I adjust track volume via modifier on mousewheel?
Hi
I would like to use a mouse modifier (say, ctrl) and then use the mousewheel to control the volume of the selected track(s) - is that possible?
I'm not able to use the general setting of using mousewheel to adjust track volume - it always end up in a situation where volumes inadvertently get adjusted when scrolling the tcp. So I have checked 'ignore mouse wheel on all faders'.
Thank you.
-W
__________________
"if DAWs are religions, REAPER is atheism" - The big J
__________________
Windows 10x64 | Asus Z170-a i7, 32GB ram | RME-Digiface USB
|
|
|
03-18-2019, 01:14 AM
|
#2
|
Human being with feelings
Join Date: Jan 2007
Location: The Underground Bunker
Posts: 705
|
Just in case anyone else was wondering - I don't think it can be done.
I ended up using the 'track inspector' (effectively the mixer) as explained here:
https://www.youtube.com/watch?v=iVBZrHktClQ
-W
__________________
"if DAWs are religions, REAPER is atheism" - The big J
__________________
Windows 10x64 | Asus Z170-a i7, 32GB ram | RME-Digiface USB
|
|
|
03-18-2019, 02:41 AM
|
#3
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
Assign this lua script to mousewheel (this also require SWS Extension installed):
Code:
--------------------------------------------------------------------
function main()
local is_new_value,filename,sectionID,cmdID,mode,resolution,val = reaper.get_action_context()
if val == 0 or not is_new_value then return end
if val > 0 then val = 1 else val = -1 end
local incr = 0.1 -- dB
local window, segment, details = reaper.BR_GetMouseCursorContext()
tr = reaper.BR_GetMouseCursorContext_Track()
if not tr then return end
local tr_vol = reaper.GetMediaTrackInfo_Value( tr, 'D_VOL' )
local tr_vol_db = WDL_VAL2DB(tr_vol)
local tr_vol_out = math.max(WDL_DB2VAL(tr_vol_db + val*incr),0)
reaper.SetMediaTrackInfo_Value( tr, 'D_VOL' ,tr_vol_out )
end
--------------------------------------------------------------------
function WDL_DB2VAL(x) return math.exp((x)*0.11512925464970228420089957273422) end --https://github.com/majek/wdl/blob/master/WDL/db2val.h
--------------------------------------------------------------------
function WDL_VAL2DB(x, reduce) --https://github.com/majek/wdl/blob/master/WDL/db2val.h
if not x or x < 0.0000000298023223876953125 then return -150.0 end
local v=math.log(x)*8.6858896380650365530225783783321
if v<-150.0 then return -150.0 else
if reduce then
return string.format('%.2f', v)
else
return v
end
end
end
--------------------------------------------------------------------
main()
|
|
|
03-21-2019, 08:17 AM
|
#4
|
Human being with feelings
Join Date: Jan 2007
Location: The Underground Bunker
Posts: 705
|
Great - thanks!
-W
__________________
"if DAWs are religions, REAPER is atheism" - The big J
__________________
Windows 10x64 | Asus Z170-a i7, 32GB ram | RME-Digiface USB
|
|
|
03-21-2019, 10:21 AM
|
#5
|
Human being with feelings
Join Date: Jan 2007
Location: The Underground Bunker
Posts: 705
|
So, I've been trying to use this script as a mouse modifier (set up via the mouse-mod menu in reaper). I got the script set as a mouse modifier (via 'alt') but it's not working - any help on how to use this would be welcome Thanks again.
-W
__________________
"if DAWs are religions, REAPER is atheism" - The big J
__________________
Windows 10x64 | Asus Z170-a i7, 32GB ram | RME-Digiface USB
|
|
|
03-21-2019, 10:41 AM
|
#6
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
I got it working. I copied all the code above into a file "control faders with mousewheel.lua" and then opened Reaper actions and clicked Load for reascript and then assigned in my case Ctrl+Shift+Mousewheel to the action. Now when I over over my TCP track faders and do Ctrl+Shift+Mousewheel the fader moves. The increment that it moves is silky smooth too !
I hope it helps.
|
|
|
03-21-2019, 10:58 AM
|
#7
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
Thanks MPL for script and Winfield for request.
This is so useful for moving the fader (holding modifier) and having it snap back to it's original value on release.
Great for Automation.
Awesome stuff.
Last edited by J Reverb; 03-21-2019 at 11:04 AM.
|
|
|
03-21-2019, 11:05 AM
|
#8
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
mine doesn't snap back but I don't want it to anyways
|
|
|
03-21-2019, 11:18 AM
|
#9
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
Quote:
Originally Posted by Coachz
mine doesn't snap back but I don't want it to anyways
|
Sorry I meant when using in write mode, handy
|
|
|
03-21-2019, 11:21 AM
|
#10
|
Human being with feelings
Join Date: Jan 2007
Location: The Underground Bunker
Posts: 705
|
Thanks for the how-to-guide i will try it out later.
Could the same script also be made to work on the track pans?
-W
__________________
"if DAWs are religions, REAPER is atheism" - The big J
__________________
Windows 10x64 | Asus Z170-a i7, 32GB ram | RME-Digiface USB
|
|
|
03-21-2019, 11:38 AM
|
#11
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
Quote:
Originally Posted by J Reverb
Sorry I meant when using in write mode, handy
|
Do you mean touch mode which does snap back ?
|
|
|
03-21-2019, 11:45 AM
|
#12
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
Yes like touch but one better as you can adjust the volume before it snaps back on the fly.
Kind of a touch/write
Go into write
Adjust volume
hold modifier and adjust
Release
|
|
|
03-21-2019, 11:51 AM
|
#13
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
not sure. When in write mode here on volume automation my mousewheel modifier doesn't do anything. In read mode it adjusts the fader fine.
|
|
|
03-21-2019, 12:14 PM
|
#14
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
Hold modifier then mouse click and move the fader, release.
Sorry should have explained a bit better.
This obviously isn't what the script is for.. just stumbled upon
|
|
|
03-21-2019, 01:29 PM
|
#15
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
oh yeah that feature has been around for a long time.
|
|
|
03-21-2019, 02:21 PM
|
#16
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
ah ok where is that then ? must have overlooked it, ta.
|
|
|
03-21-2019, 02:57 PM
|
#17
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
Quote:
Originally Posted by J Reverb
ah ok where is that then ? must have overlooked it, ta.
|
where is touch automation ?
https://www.youtube.com/watch?v=4csw2GIT76Q
|
|
|
03-21-2019, 03:11 PM
|
#18
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
Yeah I know touch ?
Touch will always chase/snap to the current envelope value when releasing the fader.
This way you can adjust the initial value on the fly staying in write mode. It's a different behaviour.
Anyway try the two methods side by side and you should see what I'm on about.
|
|
|
03-21-2019, 03:25 PM
|
#19
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
when I used this mousewheel script in write mode nothing happened. Are we talking about the same thing ?
|
|
|
03-21-2019, 04:23 PM
|
#20
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
I'm not sure either hehe
The script is replacing the normal volume control therefore we can use as an extra control layer when in write mode.
If you hold the modifier key and move the volume with the mouse pointer instead of the mouse wheel you will notice it snaps back to the current volume level.
So .. adjusting the volume level with the script (mousewheel) lets you set a level, then using the mouse pointer to drag the volume with the modifier held down while writing automation and it snaps back on release.
Hope that's clear, not sure if we were on the same page there..
|
|
|
03-21-2019, 05:59 PM
|
#21
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
When you are in the read mode, during playback it is reading the automation and any move you make with the fader will snap back to the value that is currently set. I'm not sure what you're trying to do in write mode, but write mode is for writing automation data. Of course latch mode latches the value until the fader is then moved again whereas is touch mode only holds the value until the fader is released. I'm not sure what you're trying to do or demonstrate but that's how automation works regardless of whether you use the mouse pointer on the fader or the mouse wheel over the fader.
|
|
|
03-21-2019, 06:22 PM
|
#22
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
I have used Automation systems for 20 years + .
I don't think you get what I'm saying. I might do a video to explain the difference as it's quite a cool thing to be able to do when in write or latch but NOT touch because that snaps on release to the armed envelopes current values, hence 'touch' or update.
Quote:
I'm not sure what you're trying to do or demonstrate but that's how automation works regardless of whether you use the mouse pointer on the fader or the mouse wheel over the fader.
|
Not if you hold the modifier in write mode and move the fader with the mouse at the same time then release, do that and see what happens
|
|
|
03-22-2019, 02:17 AM
|
#23
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
the fader doesn't move here in write mode using my mousewheel setup
|
|
|
03-24-2019, 04:39 AM
|
#24
|
Human being with feelings
Join Date: Jan 2007
Location: The Underground Bunker
Posts: 705
|
Quote:
Originally Posted by Coachz
I got it working. I copied all the code above into a file "control faders with mousewheel.lua" and then opened Reaper actions and clicked Load for reascript and then assigned in my case Ctrl+Shift+Mousewheel to the action. Now when I over over my TCP track faders and do Ctrl+Shift+Mousewheel the fader moves.
|
So I asigned 'ctrl+,mousewheel' for the script, but when using it on volumen on the tcp i get zooming of the tcp -not volume adjustment. Any tips on what I might do to get it working - thanks!
-W
__________________
"if DAWs are religions, REAPER is atheism" - The big J
__________________
Windows 10x64 | Asus Z170-a i7, 32GB ram | RME-Digiface USB
Last edited by Winfield; 03-24-2019 at 10:31 AM.
|
|
|
03-24-2019, 06:51 AM
|
#25
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
should be default imo
Prefs / Editing Behavior / Mouse
Ignore mousewheel on all faders
Ignore mousewheel on track panel faders
|
|
|
03-24-2019, 10:35 AM
|
#26
|
Human being with feelings
Join Date: Jan 2007
Location: The Underground Bunker
Posts: 705
|
Quote:
Originally Posted by Coachz
should be default imo
Prefs / Editing Behavior / Mouse
Ignore mousewheel on all faders
Ignore mousewheel on track panel faders
|
Sorry I don't get it - I have set my prefs a suggested above - please someone spell it out.
Thanks
-W
__________________
"if DAWs are religions, REAPER is atheism" - The big J
__________________
Windows 10x64 | Asus Z170-a i7, 32GB ram | RME-Digiface USB
|
|
|
03-24-2019, 12:10 PM
|
#27
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
open actions and click find shortcut, then do Ctrl+Mousewheel. That should be assigned to the script that you should have imported.
control faders with mousewheel.lua
If not, import it and make the assignment.
|
|
|
04-28-2019, 11:52 PM
|
#28
|
Human being with feelings
Join Date: Jan 2007
Location: The Underground Bunker
Posts: 705
|
So, I'm still not getting this to work - when using the assignment 'ctrl+mousewheel' on the tcp I get resize on all tracks (something I would like to get totally rid of).
Any (more) help appreciated, thanks!
__________________
"if DAWs are religions, REAPER is atheism" - The big J
__________________
Windows 10x64 | Asus Z170-a i7, 32GB ram | RME-Digiface USB
|
|
|
04-23-2021, 06:44 AM
|
#29
|
Human being with feelings
Join Date: Sep 2020
Location: India
Posts: 283
|
Quote:
Originally Posted by mpl
Assign this lua script to mousewheel (this also require SWS Extension installed):
Code:
--------------------------------------------------------------------
function main()
local is_new_value,filename,sectionID,cmdID,mode,resolution,val = reaper.get_action_context()
if val == 0 or not is_new_value then return end
if val > 0 then val = 1 else val = -1 end
local incr = 0.1 -- dB
local window, segment, details = reaper.BR_GetMouseCursorContext()
tr = reaper.BR_GetMouseCursorContext_Track()
if not tr then return end
local tr_vol = reaper.GetMediaTrackInfo_Value( tr, 'D_VOL' )
local tr_vol_db = WDL_VAL2DB(tr_vol)
local tr_vol_out = math.max(WDL_DB2VAL(tr_vol_db + val*incr),0)
reaper.SetMediaTrackInfo_Value( tr, 'D_VOL' ,tr_vol_out )
end
--------------------------------------------------------------------
function WDL_DB2VAL(x) return math.exp((x)*0.11512925464970228420089957273422) end --https://github.com/majek/wdl/blob/master/WDL/db2val.h
--------------------------------------------------------------------
function WDL_VAL2DB(x, reduce) --https://github.com/majek/wdl/blob/master/WDL/db2val.h
if not x or x < 0.0000000298023223876953125 then return -150.0 end
local v=math.log(x)*8.6858896380650365530225783783321
if v<-150.0 then return -150.0 else
if reduce then
return string.format('%.2f', v)
else
return v
end
end
end
--------------------------------------------------------------------
main()
|
it didnt worked on my system.
Let me tell you what i did:-
I first copied the code from start to end then opened reaper and action list and new action and new reascript. Then i Saved it as "Adjust the volume of selected track (Mousewheel).lua". Then i restarted Reaper and assigned it to "Ctrl + Alt + Shift + Mousewheel". Then selected the track and Hover over tcp volume knob.
And nothin Happens
Editted : It Worked when i Unchecked Prefs / Editing Behavior / Mouse
Ignore mousewheel on all faders
Ignore mousewheel on track panel faders
but i didnt wanted to check the boxes as now it will randomly adjst the volume when i wanted to scroll through tracks either in tcp or mixer
Last edited by Kaxaze music; 04-23-2021 at 06:54 AM.
Reason: I got it Just right
|
|
|
09-20-2023, 01:54 AM
|
#30
|
Human being with feelings
Join Date: Oct 2021
Location: Milan, Italy
Posts: 12
|
Quote:
Originally Posted by mpl
Assign this lua script to mousewheel (this also require SWS Extension installed):
Code:
--------------------------------------------------------------------
function main()
local is_new_value,filename,sectionID,cmdID,mode,resolution,val = reaper.get_action_context()
if val == 0 or not is_new_value then return end
if val > 0 then val = 1 else val = -1 end
local incr = 0.1 -- dB
local window, segment, details = reaper.BR_GetMouseCursorContext()
tr = reaper.BR_GetMouseCursorContext_Track()
if not tr then return end
local tr_vol = reaper.GetMediaTrackInfo_Value( tr, 'D_VOL' )
local tr_vol_db = WDL_VAL2DB(tr_vol)
local tr_vol_out = math.max(WDL_DB2VAL(tr_vol_db + val*incr),0)
reaper.SetMediaTrackInfo_Value( tr, 'D_VOL' ,tr_vol_out )
end
--------------------------------------------------------------------
function WDL_DB2VAL(x) return math.exp((x)*0.11512925464970228420089957273422) end --https://github.com/majek/wdl/blob/master/WDL/db2val.h
--------------------------------------------------------------------
function WDL_VAL2DB(x, reduce) --https://github.com/majek/wdl/blob/master/WDL/db2val.h
if not x or x < 0.0000000298023223876953125 then return -150.0 end
local v=math.log(x)*8.6858896380650365530225783783321
if v<-150.0 then return -150.0 else
if reduce then
return string.format('%.2f', v)
else
return v
end
end
end
--------------------------------------------------------------------
main()
|
This works perfectly, but is there a way to have it working ONLY when cursor is on the Fader, instead of the track?
Thanks!
EDIT: Or even better, is there a way to have it working with EVERY parameter under the cursor? (Fader, knobs, plugin parameters, ecc)
Last edited by CLVMTT; 09-20-2023 at 02:20 AM.
Reason: More specific request
|
|
|
10-18-2023, 06:47 AM
|
#31
|
Human being with feelings
Join Date: Sep 2023
Posts: 428
|
I managed to create a lua file and import it inside the action list, but how do I assign it to a mousewheel modifier? I looked at the mouse modifiers preferences but couldn't find it...
Any help?
|
|
|
10-18-2023, 07:56 AM
|
#32
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
Quote:
Originally Posted by fourdogslong
I managed to create a lua file and import it inside the action list, but how do I assign it to a mousewheel modifier? I looked at the mouse modifiers preferences but couldn't find it...
Any help?
|
Go in the actions window in go to the section to assign a shortcut and when the shortcut window opens up for you to do the assignment simply hold down the control key and move your mouse wheel. Or whatever key combination you want with the mouse wheel
|
|
|
10-18-2023, 08:20 AM
|
#33
|
Human being with feelings
Join Date: Sep 2023
Posts: 428
|
Quote:
Originally Posted by Coachz
Go in the actions window in go to the section to assign a shortcut and when the shortcut window opens up for you to do the assignment simply hold down the control key and move your mouse wheel. Or whatever key combination you want with the mouse wheel
|
Wow I was looking way too far in the preferences haha! So simple, thank you, it works perfectly!
That is gonna be one very useful feature for me, nice
|
|
|
10-18-2023, 08:32 AM
|
#34
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
Quote:
Originally Posted by fourdogslong
Wow I was looking way too far in the preferences haha! So simple, thank you, it works perfectly!
That is gonna be one very useful feature for me, nice
|
That's great news. Yeah that type of shortcut is a must-have and a no-brainer to assign so Reaper yay
|
|
|
10-18-2023, 04:31 PM
|
#35
|
Human being with feelings
Join Date: Sep 2023
Posts: 428
|
Quote:
Originally Posted by Coachz
That's great news. Yeah that type of shortcut is a must-have and a no-brainer to assign so Reaper yay
|
It's very clever!
I assigned control/window/alt + mouse wheel to track volume and control/alt + mouse wheel to item volume, works amazingly.
I wonder though if there's a way to make this contextual, so that I could use the same control/window/alt + mouse wheel command to control either track OR item volume depending on where my mouse pointer is(TCP or over item)?
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:10 AM.
|