View Single Post
Old 05-11-2019, 04:41 PM   #11
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by artisticspider View Post
I'm also hoping to find a solution to this. Tonight was the first night that I'm seriously bugged about the way Reaper handles multiple envelope lanes. Or, doesn't handle, I should say. I have about 35 envelope lanes for one particular track right now, all of which are changing for particular chords. The problem is, I now want to change the "fade in" of each new envelope change to be just a beat or two longer. Instead of being able to highlight the starting points all the way down the 35 envelope lanes and just dragging them to the left, I have to do each one separately. And if that needs changed because it wasn't good enough? I have to do it all again. Serious time killer I've run into. I really do hope that there is some secret to this that just isn't clearly noticeable up front.
Perhaps you can try the following: Make a time selection across the fade-in, then use this script to insert automation items into all visible envelopes of all selected tracks. You can then alt+leftdrag shrink or expand the points within all these new AIs together. (If you prefer to insert pool AIs, just un-comment the commented line.)
Code:
reaper.Undo_BeginBlock2(0)

timeStart, timeEnd = reaper.GetSet_LoopTimeRange2(0, false, false, 0, 0, false)

tEnvIndices = {}
for t = 0, reaper.CountSelectedTracks(0)-1 do
    track = reaper.GetSelectedTrack(0, t)
    for e = 0, reaper.CountTrackEnvelopes(track)-1 do
        env = reaper.GetTrackEnvelope(track, e)
        local chunkOK, envChunk = reaper.GetEnvelopeStateChunk(env, "", false)
        if chunkOK then
            if not envChunk:match("\nVIS 0 ") then
                if not poolID then
                    tEnvIndices[env] = reaper.InsertAutomationItem(env, -1, timeStart, timeEnd-timeStart)
                    --poolID = reaper.GetSetAutomationItemInfo(env, tEnvIndices[env], "D_POOL_ID", 0, false) -- UN-COMMENT THIS LINE TO INSERT POOLED AIs
                else
                    tEnvIndices[env] = reaper.InsertAutomationItem(env, poolID, timeStart, timeEnd-timeStart)
                end
            end
        end
    end
end

for env, index in pairs(tEnvIndices) do
    reaper.GetSetAutomationItemInfo(env, index, "D_UISEL", 1, true)
end

reaper.UpdateArrange()

reaper.Undo_Endblock2(0, "Insert automation items", -1)
Even easier: If all your automation is already in AIs -- as they should be! -- then you can simply select all lanes that you want to edit together, make the time selection across the fade-in, and Ctrl+mouse-wiggle to split the AIs at the time selection and create small new ones that you can shrink or expand together. (I prefer this second option, because new AIs that created by Ctrl-wiggling don't add edge points.)

Last edited by juliansader; 05-11-2019 at 05:08 PM.
juliansader is offline   Reply With Quote