Old 07-02-2019, 02:03 AM   #1
Tiggerdyret
Human being with feelings
 
Join Date: Jan 2016
Posts: 428
Default ReaEQ turn off band with shortcut

Hi, is it possible to map ReaEQ band enable/disable to a shortcut. I have tried with the midi link and looked through the scripts in ReaPack with no luck. Anyone know how to do this?

I might as well also ask this question. Is it possible to force ReaEQ to focus on the last touched band, if it is changed by a midi controller? When I use my MFT to control the plugin I can't see what frequency I'm at unless I select the band with my mouse.
Tiggerdyret is offline   Reply With Quote
Old 07-09-2019, 07:54 PM   #2
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

the only way I can think of is this:

Lokasenna has a lua script, you can get on Reapack

when you run it asks what track 4 and which fx slot number to toggle on\off
and then you can save a new named instance of the script that does only that. Like all actions and scripts you can then give it a key command.

so, with that you could have several instances of ReaEQ, and have one of them ONLY have the band you want to toggle on\off
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 07-09-2019, 08:30 PM   #3
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

The script API does have:
Code:
 reaper.TrackFX_SetEQParam( track, fxidx, bandtype, bandidx, paramtype, val, isnorm )
...but the usage is a bit strange - you have to tell it a band type (HPF, low shelf, band, etc) and an index, and then it counts only bands of the type you selected when using that index.

If you had the same set of bands in all of your ReaEQ instances a script could give you consistent control over bands 1,2,3,4,etc as they're labelled in the plugin, but if you have ReaEQs with different numbers or types of bands then it would be a complete crapshoot.

ReaEQ also doesn't expose the bands' Bypass checkboxes as a parameter that can be automated or controlled via MIDI. :/
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate

Last edited by Lokasenna; 07-10-2019 at 08:01 AM.
Lokasenna is offline   Reply With Quote
Old 07-10-2019, 07:16 AM   #4
Tiggerdyret
Human being with feelings
 
Join Date: Jan 2016
Posts: 428
Default

I might be misunderstanding, but these methods seems a bit too comprehensive, so I think I'll just have to use the mouse or find another EQ.
Tiggerdyret is offline   Reply With Quote
Old 07-13-2019, 12:27 AM   #5
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Quote:
Originally Posted by Lokasenna View Post
ReaEQ also doesn't expose the bands' Bypass checkboxes as a parameter that can be automated or controlled via MIDI. :/
Code:
TrackFX_GetNamedConfigParm( tr, fx, 'BANDENABLED'..band_idx )
Code:
  function main()
    local  retval, tracknumber, fx, paramnumber = reaper.GetLastTouchedFX() 
    if not (retval  and fx >= 0) then return end
    local tr = reaper.CSurf_TrackFromID( tracknumber, false )
    local isReaEQ = reaper.TrackFX_GetEQParam( tr, fx, 0 )
    if not isReaEQ then return end
    local num_params = reaper.TrackFX_GetNumParams( tr, fx )
    local cur_band  = math.floor(paramnumber/3)+1
     ret, state = reaper.TrackFX_GetNamedConfigParm( tr, fx, 'BANDENABLED'..cur_band-1 )  
    reaper.TrackFX_SetNamedConfigParm( tr, fx, 'BANDENABLED'..cur_band-1, math.abs(1-state) ) 
  end
  
  reaper.Undo_BeginBlock2( 0 )
  main()
  reaper.Undo_EndBlock2( 0, 'Toggle mute last touched ReaEQ band', -1 )

Last edited by mpl; 07-13-2019 at 12:35 AM.
mpl is offline   Reply With Quote
Old 02-25-2023, 02:17 AM   #6
Hermani
Human being with feelings
 
Join Date: Feb 2021
Posts: 28
Default reaEQ automate enable band by tab index

Hi all ,

Perhaps also interesting for other folks :
The following script enables/disables Rea-Eq band based on index. ( regardless of type , although the band alt types don't seem to work )

It uses the first reaEq plugin on the selected track


Code:
function queryBandTypes()
      -- Get the number of bands in the ReaEQ plugin
      local num_params = reaper.TrackFX_GetNumParams(track, fx_idx)
      -- we assume for each band there exist a parameter called Freq-BAND [index] 
      for i = 0, num_params - 1 do
        _,param_name =  reaper.TrackFX_GetParamName(track,fx_idx,i)
        startsWithFreq = string.find(param_name,"^Freq")
        if startsWithFreq then
          local btype = string.sub(param_name,6)
          btype = string.gsub(btype," %d","")
      --    reaper.ShowConsoleMsg(btype .. " \n")
          bandTypes[#bandTypes+1] = btype
          end
      end
end


function toggleEQBandEnable(index )
 queryBandTypes()
  instanceNo = 0
  for i = 1,index-1 do
    if bandTypes[i] == bandTypes[index] then 
      instanceNo = instanceNo +1
      end 
  end
  if bandTypes[index] == "High Pass" then bandType_idx = 0 
  elseif bandTypes[index] == "Low Shelf" then bandType_idx = 1
  elseif bandTypes[index] == "Band" then bandType_idx = 2  
  elseif bandTypes[index] == "Notch" then bandType_idx = 3  
  elseif bandTypes[index] == "High Shelf" then bandType_idx = 4
  elseif bandTypes[index] == "Low Pass" then bandType_idx = 5  
  elseif bandTypes[index] == "Band Pass" then bandType_idx = 6  
  elseif bandTypes[index] == "Parallel Band Pass" then bandType_idx = 7
  elseif bandTypes[index] == "Band (alt)" then bandType_idx = 8 -- not sure if supported
  --  -1=master gain, 0=hipass, 1=loshelf, 2=band, 3=notch, 4=hishelf, 5=lopass, 6=bandpass, 7=parallel bandpass.
  end 
  
  if bandType_idx ~=nil then 
    enabled = reaper.TrackFX_GetEQBandEnabled(track, fx_idx, bandType_idx,instanceNo)
    reaper.TrackFX_SetEQBandEnabled(track,fx_idx,bandType_idx,instanceNo, not enabled )
    end 
end 

-- band tab index
band_index = 3
bandTypes = {}
-- Get the selected track
track = reaper.GetSelectedTrack(0, 0)
if track ~= nil then
  -- Get the first instance of ReaEQ on the track
  fx_idx = reaper.TrackFX_GetByName(track, "ReaEQ", false)
  if fx_idx ~= -1 then
    toggleEQBandEnable(band_index)
    end
  end
Hermani 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 05:04 AM.


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