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

Reply
 
Thread Tools Display Modes
Old 08-03-2020, 10:03 AM   #1
Shuba
Human being with feelings
 
Join Date: Jul 2020
Posts: 4
Default Dynamic Split - Option to Insert Automation Points

Hi everybody, this is my first post on the forum, super excited to be here.

In reaper, I often find myself automating the mute button for a noisy track and automating the levels as well. In these efforts the actions, add 4 points to time selection and holding ctrl+shift to drag the lane up and down with the mouse have been immensely useful.

However, in the quest for maximum automation speed, I can't help but dream of somehow combining dynamic split with the 4 points action so that where dynamic split would split the item, it instead adds 4 points around the item. This way I wouldn't have to go in and select every transient and tail for a rhythm guitar track and mute what's in between.

I understand that this example with the mute automation lane may seem pointless as dynamic split can be used to eliminate noise by setting the gate correctly. But beyond muting, I think this could have very interesting applications, say, just sending the transients of a track to a delay send or something like that.

I wonder if this kind of automatic insertion of automation points around transients and tails is already possible and if so how. Thanks for reading and for any help you can offer!
Shuba is offline   Reply With Quote
Old 08-11-2020, 11:30 AM   #2
Embass
Human being with feelings
 
Embass's Avatar
 
Join Date: Jan 2014
Posts: 923
Default

not sure if this is what you are looking for.. script works like this:
gif: https://drive.google.com/file/d/1lez...ew?usp=sharing

lua code:
Code:
-- Author: Embass
-- v0.1

-- select media items, select track envelope and run script.

local sel_media_items_count = reaper.CountSelectedMediaItems(0)
if sel_media_items_count == 0 then return end -- exit

local env = reaper.GetSelectedTrackEnvelope(0)
if env == nil then reaper.ShowMessageBox("Select track envelope", "MSG", 0); return end -- exit

-- Options: Trim content behind automation items when editing or writing automation
local trim_ai_state = reaper.GetToggleCommandState(42206)
if trim_ai_state == 0 then reaper.Main_OnCommand(42206, 0); trim_ai_flag = true end -- enable

reaper.PreventUIRefresh(1)
reaper.Undo_BeginBlock()

	for i = 0, sel_media_items_count - 1 do
		local media_item = reaper.GetSelectedMediaItem(0, i)

		local item_start = reaper.GetMediaItemInfo_Value(media_item, "D_POSITION")
		local item_len = reaper.GetMediaItemInfo_Value(media_item, "D_LENGTH")

		local ai_index = reaper.InsertAutomationItem(env, -1 , item_start, item_len)
		reaper.GetSetAutomationItemInfo(env, ai_index, "D_LOOPSRC", 0, true) -- set looping off
		reaper.DeleteEnvelopePointRangeEx(env, ai_index, item_start - 1, item_start + item_len + 1)
		reaper.Main_OnCommand(42209, 0) -- insert edge points
	end

reaper.Undo_EndBlock("Insert automation items", -1)
reaper.PreventUIRefresh(-1)
reaper.UpdateArrange()

-- restore --> Options: Trim content behind automation items when editing or writing automation
if trim_ai_flag then reaper.Main_OnCommand(42206, 0) end
Embass 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 11:07 PM.


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