Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 07-15-2018, 11:53 AM   #1
puddi
Human being with feelings
 
puddi's Avatar
 
Join Date: Jun 2018
Posts: 375
Default Action to disable (and not toggle) multichannel metering?

I know there's the action Track: Toggle full multichannel metering but does anyone have one that only disables it? The toggle action is kind of useless for me given that on some tracks it might be enabled and vice versa, so I can't just select all tracks and disable it.

I have no use for multichannel metering and wish that a flexible DAW like Reaper would allow me to disable it by default for new tracks. Oh well, maybe one of you smart guys have a script for this?

Thanks!
puddi is offline   Reply With Quote
Old 07-15-2018, 03:16 PM   #2
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,203
Default

I can't help but I agree.
Seems surprising that there's no action / option for turning it off, I also don't need it (most of the time) and get slightly annoyed having to turn it off per track when doing sidechaining.

edit:
Seems at least turning it off for all current tracks could be scripted. No API for multichannel metering (if I didn't miss) but I think it could be done via track chunk ('VU ...' line).

edit2:
Added actions to en-/disable multichannel metering for next SWS version.

Last edited by nofish; 07-16-2018 at 11:21 AM.
nofish is offline   Reply With Quote
Old 01-17-2019, 12:45 PM   #3
Pinknoise
Human being with feelings
 
Pinknoise's Avatar
 
Join Date: Aug 2012
Location: Around Montréal
Posts: 1,117
Default

Has this action been added ? Can't find it.
Pinknoise is offline   Reply With Quote
Old 01-17-2019, 07:16 PM   #4
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,203
Default

Next SWS version (where this is added) is not out yet, unfortunately.
nofish is offline   Reply With Quote
Old 02-03-2019, 10:17 AM   #5
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 4,035
Default

Quote:
Originally Posted by nofish View Post
Next SWS version (where this is added) is not out yet, unfortunately.
I just tried the new 'SWS/NF: multichannel metering actions' in SWS v2.10.0 pre-release, wasn't expecting them to be so slow..

Select all tracks, enable multichannel metering, run action to disable,
SWS: 3.95 seconds.
Script: 0.386 seconds.

128 tracks - multi-chan.RPP
https://stash.reaper.fm/35344/128%20...multi-chan.RPP

testing on REAPER 5.965/ Win7 / x64

Last edited by Edgemeal; 04-13-2022 at 12:43 PM.
Edgemeal is offline   Reply With Quote
Old 02-03-2019, 10:35 AM   #6
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,203
Default

Wow, that's surprising indeed.
SWS actions also use chunk parsing as your script as there's no native API but I woudn't have expected to be this slow.
I'll look into it, thanks.

edit:
I see in your script you use

Code:
reaper.Main_OnCommand(41726, 0) -- Track: Toggle full multichannel metering
I do chunk patching instead, maybe this makes a difference.

edit2:
Actually no need for overlapping functionality anyway I think. For anything that's scriptable (as in this case) I think scripts (in ReaPack) are preferred anyway to not bloat SWS, so I'd think about removing these actions for next SWS version. I think the speed improvement in SWS (if any) would be minimal in this case, as it basically does the same thing as your script.
Would you consider putting it in ReaPack?

Last edited by nofish; 02-03-2019 at 10:54 AM.
nofish is offline   Reply With Quote
Old 01-18-2019, 12:42 AM   #7
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 4,035
Default

Quote:
Originally Posted by nofish View Post
Seems at least turning it off for all current tracks could be scripted. No API for multichannel metering (if I didn't miss) but I think it could be done via track chunk ('VU ...' li).

edit2:
Added actions to en-/disable multichannel metering for next SWS version.
Great! Any word when new SWS will be released?

I came up with this a few weeks ago, gets pretty slow with say 100 tracks, a lot fx, midi, etc. But for my simple/small project usage it does the job for now.

Code:
-- Disable multichannel metering on selected tracks
-- Edgemeal -- Dec 15, 2018
-- If you have ~128 tracks with a lot of fx, midi data,
-- it may take up to one second to run! (i7-3770 @ 4ghz)

local tracks = reaper.CountSelectedTracks()
if tracks == 0 then return end

--init_time = reaper.time_precise() -- For benchmarking code.

reaper.PreventUIRefresh(1)

-- get selected tracks
trk={}
for i = 0, tracks-1 do
  trk[i+1] = reaper.GetSelectedTrack(0, i)
end

reaper.Main_OnCommand(40297, 0)  -- Track: Unselect all tracks

-- disable multichannel for selected tracks
for i = 1, #trk do 
  local ret, str = reaper.GetTrackStateChunk(trk[i],"",false) 
  for line in str:gmatch('[^\r\n]+') do
    if line == 'VU 2' then -- multichannel metering is on.
      reaper.SetTrackSelected(trk[i], true)
      reaper.Main_OnCommand(41726, 0) -- Track: Toggle full multichannel metering
      reaper.SetTrackSelected(trk[i], false)
      break 
    elseif line:find("TRACKHEIGHT ") then -- went past VU line, skip to next track.
      break 
    end
  end
end

-- restore selected tracks
for i = 1, #trk do  
  reaper.SetTrackSelected(trk[i], true)
end

reaper.PreventUIRefresh(-1)

-- >>> For benchmarking code,...
-- duration = reaper.time_precise() - init_time
-- reaper.ShowConsoleMsg(tostring(duration) .. "\n")
-- <<<
Edgemeal is offline   Reply With Quote
Old 01-18-2019, 06:09 AM   #8
Pinknoise
Human being with feelings
 
Pinknoise's Avatar
 
Join Date: Aug 2012
Location: Around Montréal
Posts: 1,117
Default

Well that's a good start hopefully we will get an action that auto disable this by default. Edgemeal saving my ass again.

Last edited by Pinknoise; 01-18-2019 at 02:59 PM.
Pinknoise 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 06:13 PM.


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