Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 10-23-2015, 02:23 AM   #1
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default Activate and Arm ALL FX parameter envelopes on selected tracks

Title says it all. As it turns out, it's a simple LUA script.

Activate and Arm all FX parameter envelopes on selected tracks

Updated to v1.01 - Thanks Justin.
Make sure Preferences / Editing Behavior / Envelope Display
Checkbox Show new envelopes in separate envelope lanes is cleared
The script is available here:
https://stash.reaper.fm/v/25508/Activ...d%20tracks.lua

How to use
  • Select your tracks

  • Execute this script

    If you did not clear Show new envelopes in separate envelope lanes, the envelopes will show up now. This could take a second or two with many envelopes. Hide them AFTER you've written you're little bit of automation.

  • Place the play cursor at the project end

  • Switch all tracks to WRITE mode

  • Hit PLAY and then STOP a second later. You have now written a bit of automation at the end of your project, and can safely write things with an end value already in place.

    If you didn't clear the Show new envelopes in separate envelope lanes in the preferences, you can now hide them with the action Envelope: Hide all envelopes for all tracks.

And here's the code for inspection :

Code:
-- Lua Script for Reaper 5.0 and up
-- Activate and arm all FX parameters on selected tracks
-- v1.01
-- Written by Anthony "Airon" Oetzmann
-- This script is public domain
-- Post your feedback and alternate versions at
-- http://forum.cockos.com/showthread.php?t=167880
function main()
  reaper.Undo_BeginBlock()

  selected_tracks_count = reaper.CountSelectedTracks(0) -- Get number of selected tracks
  if selected_tracks_count == 0 then
    dbug ("No track selected\n")
  end
  for i = 0, selected_tracks_count-1  do                -- Loop over every selected track
    track = reaper.GetSelectedTrack(0, i)               -- Get a track
    track_fx_count = reaper.TrackFX_GetCount(track)     -- how many fx on that track ?
    for j = 0, track_fx_count-1  do
      track_fxparam_count = reaper.TrackFX_GetNumParams(track, j) -- Get number of fx in track
      for k = 0, track_fxparam_count-1  do -- Loop over each parameter of this track
        -- This will create(& thus activate) and arm the FX envelope
        envelope = reaper.GetFXEnvelope(track, j, k, 1)
      end -- ENDLOOP through FX parameters
    end -- ENDLOOP through FX
  reaper.TrackList_AdjustWindows(0)
  end -- ENDLOOP through selected tracks
  reaper.Undo_EndBlock("Activate and Arm all FX Parameter envelopes on selected tracks", 0)
end

main() -- Execute your main function
reaper.UpdateArrange() -- Update the arrangement
Maybe someone can add filtering to this, so Bypass and Wet/Dry is not activated and armed. Not sure how to do that yet. This script is public domain, so do whatever you wish with it.

Problems
The script itself is fast.

Reaper however wants to display all the envelopes you have created AS SOON AS YOU WRITE TO THEM, and that's a big problem when I do this to 100 tracks with an 8-band ReaEQ and Reacomp. It takes a few seconds for those envelopes to display.

Maybe Cockos finally creates some actions to cover this. Not displaying them when they're activated would be a big plus too, so that's an option I humbly request.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom

Last edited by airon; 10-23-2015 at 08:13 AM.
airon is offline   Reply With Quote
Old 11-04-2015, 08:06 AM   #2
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default


Write down any ideas and requests you may have in this thread. Or share you own improvements or changes. This script is public domain.

Possible improvements and alternate strategies
Activating all parameters is not always necessary.

As soon as Reaper lets you choose whether newly activated and armed envelopes appear on the track or not, I'll more often choose to let Reaper activate and arm parameters as soon as I begin adjusting them in one of the writing modes.


Improvements could be made in several ways.

First, filters, whether that's "arm only parameters containing these strings" or "exclude parameters that contain these strings", but creating the kind of string handling is a bit outside my current programming competence. Reaper has stuff like that internally already but it's likely not accessible via the API.

Hardcoded exlusion lists could of course be done. People could create different versions of the script to handle specific tasks, like automate all EQs but not the bypass of the plugins.

I still need to find out how to get plugin and parameter names. The documentation could be more detailed. It was a lot of trial and error just to get this far.
The Future
The request for Preview-like functionality has gotten attention. The use for this function is understood by the Cockos gentlemen and I'm confident this function will make it in to Reaper in the near future.

Together with envelopes no longer popping up and some smarter activation & arming procedures (simple click&swipe ala Routing-Matrix for the envelope window, right-clicking on an insert and activating&arming all its parameters) Reaper becomes an even more attractive mixing environment.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 11-04-2015, 10:31 AM   #3
snooks
Banned
 
Join Date: Sep 2015
Posts: 1,650
Default

Quote:
Originally Posted by airon View Post
I still need to find out how to get plugin and parameter names.
Code:
tr=reaper.GetTrack(0,0) --0=current project, 0=first track

ok,name=reaper.TrackFX_GetFXName(tr,0,"") --0=first FX name

ok,name=reaper.TrackFX_GetParamName(tr,0,0,"") --0=first fx, 0=first param name
That should help with the names bit anyway.
snooks is offline   Reply With Quote
Old 11-04-2015, 11:31 AM   #4
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default

Thanks. That's very helpful.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 04-06-2016, 02:40 PM   #5
analogexplosions
Human being with feelings
 
analogexplosions's Avatar
 
Join Date: May 2011
Location: Nashville
Posts: 360
Default a very sincere thank you!

Airon, this is incredible. Thank you for making this; it kinda just changed my life!
__________________
www.dungeonbeach.com
analogexplosions is offline   Reply With Quote
Old 08-10-2016, 08:26 PM   #6
RobinGShore
Human being with feelings
 
Join Date: May 2013
Location: New York
Posts: 781
Default

Woah. Can't believe I'm just discovering this now. I've been wanting to be able to do this forever. If there were some way the script could be modified so that it didn't include the bypass parameter that would be even more amazing
RobinGShore is offline   Reply With Quote
Old 09-07-2016, 02:27 AM   #7
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default

You don't say.

Might be possible now. We did get some API updates and we're all better at Lua as well. I'm just mixing and researching a lot right now, so it'll be in two weeks before begin to think about improving this.

How can we add this filter for the last parameter that includes bypass in its name ?

This code is public domain AFAIK, so anyone can mess with it, improve it, change it and hopefully put it in to one of the ReaPack repositories.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 03-01-2017, 04:38 PM   #8
cretaceous
Human being with feelings
 
Join Date: May 2010
Posts: 122
Default

Great stuff thanks!
Been figuring someone had to have made a script for this and stumbled on this randomly after looking around for days.
Seek and ye shall find.. but only after the issue you wanted to address has been dealt with already.
cretaceous is offline   Reply With Quote
Old 11-10-2017, 05:55 PM   #9
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

This script lacks an instruction to refresh the track list.

Add this add the end:

Code:
reaper.TrackList_AdjustWindows(false)
X-Raym is offline   Reply With Quote
Old 03-19-2018, 02:26 AM   #10
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default

Does anyone how to scan for parameter names yet ?

I'm starting work at the moment, so I'll check in detail tonight. I'd like to keep Bypass and Wetdry, the last two of each plugin, unactivated.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 07-13-2018, 10:27 AM   #11
RobinGShore
Human being with feelings
 
Join Date: May 2013
Location: New York
Posts: 781
Default

Quote:
Originally Posted by airon View Post
Activating all parameters is not always necessary.

Improvements could be made in several ways.

First, filters, whether that's "arm only parameters containing these strings" or "exclude parameters that contain these strings", but creating the kind of string handling is a bit outside my current programming competence. Reaper has stuff like that internally already but it's likely not accessible via the API.

Hardcoded exlusion lists could of course be done. People could create different versions of the script to handle specific tasks, like automate all EQs but not the bypass of the plugins.

I still need to find out how to get plugin and parameter names. The documentation could be more detailed. It was a lot of trial and error just to get this far.
Quote:
Originally Posted by airon View Post
.
How can we add this filter for the last parameter that includes bypass in its name ?
Quote:
Originally Posted by airon View Post
Does anyone how to scan for parameter names yet ?
Bump to see if anyone knows how to modify this script yet to do what Airon's talking about in the quotes above. I use this script a lot and always wish there were a way for it to exclude specific parameters and plugins.
RobinGShore is offline   Reply With Quote
Old 06-27-2019, 03:10 AM   #12
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default

We could present two text boxes, the first for filtering plugin names, the second for filtering parameter names. That way, more targeted activation and arming may be possible. The results would need to be displayed as well.

Has anyone done this kind of filtering and result display ?
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom

Last edited by airon; 06-27-2019 at 03:30 AM.
airon is offline   Reply With Quote
Old 12-18-2019, 02:23 PM   #13
Kejnel
Human being with feelings
 
Join Date: Nov 2012
Posts: 90
Default Thank you so much!

Thank you so much for this script. This is my dream comes true. I can now FINALLY create presets in automation fashion and modulate between them with such ease! THANK YOU, THANK YOU, THANK YOU!!

I was always puzzled by lack of this feature in DAWs in general.
Kejnel is offline   Reply With Quote
Old 04-24-2020, 07:28 AM   #14
Knob Twiddler
Human being with feelings
 
Knob Twiddler's Avatar
 
Join Date: May 2016
Location: Leuven
Posts: 99
Default

This is a great script. I was searching for something to record presetchanges from a VSTI that does not respond to program change and your script is doing that great, thx!
Knob Twiddler is offline   Reply With Quote
Old 08-11-2020, 02:51 AM   #15
sonictim
Human being with feelings
 
sonictim's Avatar
 
Join Date: Feb 2020
Location: Los Angeles
Posts: 463
Default Updated Request

It seems a long time ago you asked to update this so it doesn't add the Bypass Envelope. Well, here ya go. I'm assuming you've long since solved this and moved on, but it was a fun challenge for me to figure out tonight! Thanks for the puzzle. Attached is the updated script.
sonictim 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:58 AM.


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