Old 03-20-2021, 08:28 AM   #1
valy
Human being with feelings
 
Join Date: Jan 2020
Posts: 1,922
Default Switching an automation item's pool

Is it possible to change an existing automation item's pool from one number to another?

For example, if I already have two separately pooled sets of automation items on the same envelope, and I want to change one of the items to the other set.
valy is offline   Reply With Quote
Old 03-22-2021, 08:46 AM   #2
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 6,702
Default

If I'm understanding you correctly, you can do that in Project Bay.

An example; you have two automation items on track, 1:Volume and 2:Volume. But you want automation item 1:Volume to be replaced with 2:Volume automation item.

-in Project Bay Automation items tab, select the 1:Volume automation item
-right-click menu over it, go to Replace in project and select 2 from the menu
-automation item 1:Volume gets replaced with 2:Volume
xpander is online now   Reply With Quote
Old 03-22-2021, 10:31 AM   #3
valy
Human being with feelings
 
Join Date: Jan 2020
Posts: 1,922
Default

Quote:
Originally Posted by xpander View Post
If I'm understanding you correctly, you can do that in Project Bay.

An example; you have two automation items on track, 1:Volume and 2:Volume. But you want automation item 1:Volume to be replaced with 2:Volume automation item.

-in Project Bay Automation items tab, select the 1:Volume automation item
-right-click menu over it, go to Replace in project and select 2 from the menu
-automation item 1:Volume gets replaced with 2:Volume
Brilliant! I will experiment with this.

Thanks xpander!
valy is offline   Reply With Quote
Old 04-22-2021, 08:41 AM   #4
AB1
Human being with feelings
 
Join Date: Apr 2020
Posts: 66
Default

Seems the project bay will not allow you to 'replace' multiple automation items at once. I couldn't see anything in ReaPack about copying and pasting automation item pools. I haven't used automation items so I'm not exactly sure if this code is what is being asked for.

These should work when selecting automation items in the arrange view or the project bay (having first selected the project bay option 'Mirror selection in bay and project'). You can CTRL select/unselect one or more items individually in the arrange view, or in the project bay either ONE or all instances of an item with multiple instances when selecting a single item, or all instances of an item when selecting multiple items. Works across all envelopes.

Code:
--*****Copy Pool from first selected automation item
trkCount = reaper.CountTracks(0)
for t = 0,trkCount - 1 do
  trk = reaper.GetTrack(0, t)
  envCount = reaper.CountTrackEnvelopes(trk)
  for e = 0,envCount - 1 do
    env = reaper.GetTrackEnvelope(trk, e)
    autoItemCount = reaper.CountAutomationItems(env)
    for a = 0,autoItemCount - 1 do 
      isSel = reaper.GetSetAutomationItemInfo(env, a, "D_UISEL", 0, 0)
      if isSel ~= 0 and found ~= 1 then
        POOL_ID = reaper.GetSetAutomationItemInfo(env, a, "D_POOL_ID", 0, 0)
        reaper.SetExtState("AB1_Automation_item", "Pool_ID", POOL_ID, 0)
        found = 1
      end
    end
  end
end
Code:
--*****Paste Pool to all selected automation items
POOL_ID = reaper.GetExtState("AB1_Automation_item", "Pool_ID")
trkCount = reaper.CountTracks(0)
for t = 0,trkCount - 1 do
  trk = reaper.GetTrack(0, t)
  envCount = reaper.CountTrackEnvelopes(trk)
  for e = 0,envCount - 1 do
    env = reaper.GetTrackEnvelope(trk, e)
    autoItemCount = reaper.CountAutomationItems(env)
    for a = 0,autoItemCount - 1 do 
      isSel = reaper.GetSetAutomationItemInfo(env, a, "D_UISEL", 0, 0)
      if isSel ~= 0 then
        reaper.GetSetAutomationItemInfo(env, a, "D_POOL_ID", POOL_ID, 1)
      end
    end
  end
end
AB1 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 10:47 AM.


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