Old 07-15-2018, 11:53 AM   #1
puddi
Human being with feelings
 
puddi's Avatar
 
Join Date: Jun 2018
Posts: 31
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: 8,404
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: 731
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: 8,404
Default

Next SWS version (where this is added) is not out yet, unfortunately.
nofish is offline   Reply With Quote
Old 01-18-2019, 12:42 AM   #5
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 970
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   #6
Pinknoise
Human being with feelings
 
Pinknoise's Avatar
 
Join Date: Aug 2012
Location: Around Montréal
Posts: 731
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
Old 02-03-2019, 10:17 AM   #7
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 970
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
Attached Files
File Type: lua Disable multichannel metering on selected tracks.lua (1.2 KB, 16 views)

Last edited by Edgemeal; 02-03-2019 at 10:29 AM.
Edgemeal is offline   Reply With Quote
Old 02-03-2019, 10:35 AM   #8
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,404
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 02-03-2019, 10:43 AM   #9
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 970
Default

Quote:
Originally Posted by nofish View Post
How did you measure the SWS actions processing time btw.?
Same way basically,
Code:
init_time = reaper.time_precise() -- For benchmarking code.

reaper.Main_OnCommand(reaper.NamedCommandLookup('_NF_DISABLE_MULTICHAN_MTR_SEL'), 0) -- SWS/NF: Disable multichannel metering (selected tracks)

duration = reaper.time_precise() - init_time
reaper.ShowConsoleMsg(tostring(duration) .. "\n")
Edgemeal is offline   Reply With Quote
Old 02-03-2019, 11:10 AM   #10
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,404
Default

Quote:
Originally Posted by Edgemeal View Post
Same way basically,
Sorry, I figured that shortly after posting, that's why I edited the question out meanwhile.
Thanks though.
nofish is offline   Reply With Quote
Old 02-03-2019, 03:30 PM   #11
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 970
Default

Quote:
Originally Posted by nofish View Post
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?
OK Done.
Edgemeal is offline   Reply With Quote
Old 02-03-2019, 04:15 PM   #12
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,404
Default

Thanks.

Out of curiousity, I tried to optimize the SWS version, if you want you can check:
https://www.dropbox.com/s/i5e7zf755b...sws64.dll?dl=1

It seems a bit faster here now than your script.
If you test, you think the speed improvement (if any) is worth keeping the SWS version?
nofish is offline   Reply With Quote
Old 02-03-2019, 04:23 PM   #13
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 970
Default

Quote:
Originally Posted by nofish View Post
Thanks.

Out of curiousity, I tried to optimize the SWS version, if you want you can check:
https://www.dropbox.com/s/i5e7zf755b...sws64.dll?dl=1

It seems a bit faster here now than your script.
If you test, you think the speed improvement (if any) is worth keeping the SWS version?
WOW, thats MUCH faster now!

SWS...: 0.053
Script: 0.386

How do I remove my script from reapack?
Edgemeal is offline   Reply With Quote
Old 02-03-2019, 04:52 PM   #14
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,404
Default

Thanks for pointing me to that flaw (it was in the chunk patching, wouldn't have expected that).
And sorry for the hassle, I should have checked if I can improve it before suggesting uploading your script to ReaPack.

That said, personally I'd think it's not bad having the functionality also available as script on ReaPack, as maybe not all Reaper users might use SWS.

If you want to remove it, ask a ReaTeam maintainer (cfillion, X-Raym, ...) to do, I guess.

Last edited by nofish; 02-03-2019 at 05:00 PM.
nofish is offline   Reply With Quote
Old 02-12-2019, 08:47 AM   #15
sammydix
Human being with feelings
 
sammydix's Avatar
 
Join Date: Apr 2008
Location: Atlanta
Posts: 2,611
Default

It's in the newest version, but it's still enabled for any new tracks (unless I'm doing something wrong). It just won't go away.
sammydix is offline   Reply With Quote
Old 02-12-2019, 02:23 PM   #16
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,404
Default

Yeah, the SWS actions only work on existing tracks.
I'd find a preference / option for this nice too.
nofish 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 03:42 PM.


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