Close gaps leaves envelope points behind?

Gid wrote on 5/20/2025, 11:27 PM

Hi, when I Close Gaps the envelope points get left behind, 'Lock envelopes to events' is on, Is there an option for this or it that just the way it is? Thanks.

Vegas Pro 18 - 22
Vegas Pro/Post 19
Boris Continuum & Sapphire, 
Silhouette Standalone + Plugin, 
Mocha Pro Standalone + Plugin, 
Boris Optics,
NewBlue TotalFX
Desktop PC Microsoft Windows 10 Pro - 64-Bit
ASUS PRO WS WRX80E-SAGE SE WIFI AMD Motherboard
AMD Ryzen Threadripper PRO 3975WX 3.5GHz 32 Core
Corsair iCUE H150i RGB PRO XT 360mm All-in-One Liquid CPU Cooler
RAM 256GB ( 8x Micron 32GB (1x 32GB) 2666MHz DDR4 RAM )
2x Western Digital Black SN850 2TB M.2-2280 SSD, 7000MB/s Read, 5100MB/s Write
(programs on one, project files on the other)
Graphics MSI GeForce RTX 3090 SUPRIM X 24GB OC GPU
ASUS ROG Thor 1200W Semi-Modular 80+ Platinum PSU 
Fractal Design Define 7 XL Dark TG Case with 3 Fans
Dell SE3223Q 31.5 Inch 4K UHD (3840x2160) Monitor, 60Hz, & an Acer 24" monitor.

At the moment my filming is done with a Samsung Galaxy S23 Ultra 5G & a GoPro Hero11 Black

I've been a Joiner/Carpenter for 40yrs, apprentice trained time served, I don't have an apprentice of my own so to share my knowledge I put videos on YouTube.

YouTube videos - https://www.youtube.com/c/Gidjoiner

 

Comments

EricLNZ wrote on 5/20/2025, 11:38 PM

I cannot tell from your image if your bottom toolbar has Rippling activated? I have mine rearranged differently so cannot tell which is which in your image.

EricLNZ wrote on 5/20/2025, 11:43 PM

Having now watched your video a few times, if you have rippling and Lock envelopes to Events both on then it's possibly a bug. Which VP22 Build are you on?

relaxvideo wrote on 5/20/2025, 11:50 PM

"if you have rippling"

At 0:05 we see rippling is on, or??

Last changed by relaxvideo on 5/20/2025, 11:50 PM, changed a total of 1 times.

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas22 latest

Gid wrote on 5/21/2025, 12:11 AM

@EricLNZ @relaxvideo Hi,

Rippling is on, with all three options & when rippling is off when I move the event the envelope points move with the event. 👍 But right click Close gaps leaves the envelope points behind with all rippling options whether it's on or off.

VP22 (Build 248)

Last changed by Gid on 5/21/2025, 12:12 AM, changed a total of 1 times.

Vegas Pro 18 - 22
Vegas Pro/Post 19
Boris Continuum & Sapphire, 
Silhouette Standalone + Plugin, 
Mocha Pro Standalone + Plugin, 
Boris Optics,
NewBlue TotalFX
Desktop PC Microsoft Windows 10 Pro - 64-Bit
ASUS PRO WS WRX80E-SAGE SE WIFI AMD Motherboard
AMD Ryzen Threadripper PRO 3975WX 3.5GHz 32 Core
Corsair iCUE H150i RGB PRO XT 360mm All-in-One Liquid CPU Cooler
RAM 256GB ( 8x Micron 32GB (1x 32GB) 2666MHz DDR4 RAM )
2x Western Digital Black SN850 2TB M.2-2280 SSD, 7000MB/s Read, 5100MB/s Write
(programs on one, project files on the other)
Graphics MSI GeForce RTX 3090 SUPRIM X 24GB OC GPU
ASUS ROG Thor 1200W Semi-Modular 80+ Platinum PSU 
Fractal Design Define 7 XL Dark TG Case with 3 Fans
Dell SE3223Q 31.5 Inch 4K UHD (3840x2160) Monitor, 60Hz, & an Acer 24" monitor.

At the moment my filming is done with a Samsung Galaxy S23 Ultra 5G & a GoPro Hero11 Black

I've been a Joiner/Carpenter for 40yrs, apprentice trained time served, I don't have an apprentice of my own so to share my knowledge I put videos on YouTube.

YouTube videos - https://www.youtube.com/c/Gidjoiner

 

bitman wrote on 5/21/2025, 2:36 AM

@Gid Confirmed, close gaps does not move the audio envelope. I tried 3th party scripts ( "closed gaps" 1-click commands event and track from the Vegasaur scripts) and it does the same, the envelopes do not move.

If the Vegas command is also script based behind the scenes, it is probably behaving similar and not taking in account envelopes. It is probably a bug as it cannot be the intention to leave the envelope alone if 'Lock envelopes to events' is on.

Last changed by bitman on 5/21/2025, 2:44 AM, changed a total of 1 times.

APPS: VIDEO: VP 365 suite (VP 22 build 194) VP 21 build 315, VP 365 20, VP 19 post (latest build -651), (uninstalled VP 12,13,14,15,16 Suite,17, VP18 post), Vegasaur, a lot of NEWBLUE plugins, Mercalli 6.0, Respeedr, Vasco Da Gamma 17 HDpro XXL, Boris Continuum 2025, Davinci Resolve Studio 18, SOUND: RX 10 advanced Audio Editor, Sound Forge Pro 18, Spectral Layers Pro 10, Audacity, FOTO: Zoner studio X, DXO photolab (8), Luminar, Topaz...

  • OS: Windows 11 Pro 64, version 24H2 (since October 2024)
  • CPU: i9-13900K (upgraded my former CPU i9-12900K),
  • Air Cooler: Noctua NH-D15 G2 HBC (September 2024 upgrade from Noctua NH-D15s)
  • RAM: DDR5 Corsair 64GB (5600-40 Vengeance)
  • Graphics card: ASUS GeForce RTX 3090 TUF OC GAMING (24GB) 
  • Monitor: LG 38 inch ultra-wide (21x9) - Resolution: 3840x1600
  • C-drive: Corsair MP600 PRO XT NVMe SSD 4TB (PCIe Gen. 4)
  • Video drives: Samsung NVMe SSD 2TB (980 pro and 970 EVO plus) each 2TB
  • Mass Data storage & Backup: WD gold 6TB + WD Yellow 4TB
  • MOBO: Gigabyte Z690 AORUS MASTER
  • PSU: Corsair HX1500i, Case: Fractal Design Define 7 (PCGH edition)
  • Misc.: Logitech G915, Evoluent Vertical Mouse, shuttlePROv2

 

 

Gid wrote on 5/21/2025, 3:47 AM

@bitman Thanks yep, I just tried a Composite envelope on the video track & that also doesn't move with Close Gaps.

-------------

I don't use this option very often but I just tried VP18 & 19, the envelope points don't move with Close Gaps there either, I skipped testing VP20 & 21 because if it doesn't work in VP18 & 19 it prob doesn't work in 20 & 21.

Last changed by Gid on 5/21/2025, 3:56 AM, changed a total of 1 times.

Vegas Pro 18 - 22
Vegas Pro/Post 19
Boris Continuum & Sapphire, 
Silhouette Standalone + Plugin, 
Mocha Pro Standalone + Plugin, 
Boris Optics,
NewBlue TotalFX
Desktop PC Microsoft Windows 10 Pro - 64-Bit
ASUS PRO WS WRX80E-SAGE SE WIFI AMD Motherboard
AMD Ryzen Threadripper PRO 3975WX 3.5GHz 32 Core
Corsair iCUE H150i RGB PRO XT 360mm All-in-One Liquid CPU Cooler
RAM 256GB ( 8x Micron 32GB (1x 32GB) 2666MHz DDR4 RAM )
2x Western Digital Black SN850 2TB M.2-2280 SSD, 7000MB/s Read, 5100MB/s Write
(programs on one, project files on the other)
Graphics MSI GeForce RTX 3090 SUPRIM X 24GB OC GPU
ASUS ROG Thor 1200W Semi-Modular 80+ Platinum PSU 
Fractal Design Define 7 XL Dark TG Case with 3 Fans
Dell SE3223Q 31.5 Inch 4K UHD (3840x2160) Monitor, 60Hz, & an Acer 24" monitor.

At the moment my filming is done with a Samsung Galaxy S23 Ultra 5G & a GoPro Hero11 Black

I've been a Joiner/Carpenter for 40yrs, apprentice trained time served, I don't have an apprentice of my own so to share my knowledge I put videos on YouTube.

YouTube videos - https://www.youtube.com/c/Gidjoiner

 

Thiago_Sase wrote on 5/21/2025, 6:30 AM

@Gid Hello, the script below does the job with the envelope points moving together.

using System;
using System.Collections.Generic;
using ScriptPortal.Vegas;

namespace Test_Script
{
    public class Class1
    {
        public Vegas myVegas;

        public void Main(Vegas vegas)
        {
            myVegas = vegas;

            Timecode gapDuration = new Timecode("00:00:00:00");

            List<List<TrackEvent>> eventGroups = new List<List<TrackEvent>>();

            foreach (Track track in myVegas.Project.Tracks)
            {
                foreach (TrackEvent trackEvent in track.Events)
                {
                    if (trackEvent == null || !trackEvent.Selected) continue;

                    if (trackEvent.Group != null)
                    {
                        bool groupExists = false;

                        foreach (var group in eventGroups)
                        {
                            if (group.Contains(trackEvent))
                            {
                                groupExists = true;
                                break;
                            }
                        }

                        if (!groupExists)
                        {
                            List<TrackEvent> eventGroup = new List<TrackEvent>();
                            foreach (TrackEvent groupedEvent in trackEvent.Group)
                            {
                                eventGroup.Add(groupedEvent);
                            }

                            eventGroups.Add(eventGroup);
                        }
                    }
                    else
                    {
                        eventGroups.Add(new List<TrackEvent> { trackEvent });
                    }
                }
            }

            eventGroups.Sort((a, b) => a[0].Start.CompareTo(b[0].Start));

            if (eventGroups.Count > 0)
            {
                Timecode currentStartTime = eventGroups[0][0].Start;

                foreach (var group in eventGroups)
                {
                    Timecode earliestStart = group[0].Start;
                    foreach (var trackEvent in group)
                    {
                        if (trackEvent.Start < earliestStart)
                        {
                            earliestStart = trackEvent.Start;
                        }
                    }

                    Timecode offset = currentStartTime - earliestStart;

                    foreach (var trackEvent in group)
                    {
                        Timecode originalStart = trackEvent.Start;
                        trackEvent.Start += offset;

                        Track track = trackEvent.Track;
                        if (track.IsAudio())
                        {
                            foreach (Envelope envelope in track.Envelopes)
                            {
                                if (envelope.Type == EnvelopeType.Volume)
                                {
                                    MoveEnvelopePoints(envelope, originalStart, trackEvent.Length, trackEvent.Start);
                                }
                            }
                        }
                    }

                    Timecode latestEndTime = Timecode.FromFrames(0);
                    foreach (var trackEvent in group)
                    {
                        Timecode end = trackEvent.Start + trackEvent.Length;
                        if (end > latestEndTime)
                        {
                            latestEndTime = end;
                        }
                    }

                    currentStartTime = latestEndTime + gapDuration;
                }
            }
        }

        private void MoveEnvelopePoints(Envelope envelope, Timecode originalStart, Timecode eventLength, Timecode newStart)
        {
            Timecode originalEnd = originalStart + eventLength;
            Timecode offset = newStart - originalStart;

            foreach (EnvelopePoint point in envelope.Points)
            {
                if (point.X >= originalStart && point.X <= originalEnd)
                {
                    point.X += offset;
                }
            }
        }
    }
}

public class EntryPoint
{
    public void FromVegas(Vegas vegas)
    {
        Test_Script.Class1 test = new Test_Script.Class1();
        test.Main(vegas);
    }
}

 

Gid wrote on 5/21/2025, 7:39 AM

@Thiago_Sase Hi, that works. Thankyou.

PS, just for anyone's interest, I normally use Ripple working my way along the timeline using A,D & S (trim end/start & split) but sometimes to go back on the timeline to trim events it's easier to spread the transition apart to make it easier to grab the ends, this obviously then leaves a gap that needs closing. Dragging them apart is no problem, the envelope stays attached to the event but when closing the gap ... 👍

Last changed by Gid on 5/21/2025, 7:50 AM, changed a total of 1 times.

Vegas Pro 18 - 22
Vegas Pro/Post 19
Boris Continuum & Sapphire, 
Silhouette Standalone + Plugin, 
Mocha Pro Standalone + Plugin, 
Boris Optics,
NewBlue TotalFX
Desktop PC Microsoft Windows 10 Pro - 64-Bit
ASUS PRO WS WRX80E-SAGE SE WIFI AMD Motherboard
AMD Ryzen Threadripper PRO 3975WX 3.5GHz 32 Core
Corsair iCUE H150i RGB PRO XT 360mm All-in-One Liquid CPU Cooler
RAM 256GB ( 8x Micron 32GB (1x 32GB) 2666MHz DDR4 RAM )
2x Western Digital Black SN850 2TB M.2-2280 SSD, 7000MB/s Read, 5100MB/s Write
(programs on one, project files on the other)
Graphics MSI GeForce RTX 3090 SUPRIM X 24GB OC GPU
ASUS ROG Thor 1200W Semi-Modular 80+ Platinum PSU 
Fractal Design Define 7 XL Dark TG Case with 3 Fans
Dell SE3223Q 31.5 Inch 4K UHD (3840x2160) Monitor, 60Hz, & an Acer 24" monitor.

At the moment my filming is done with a Samsung Galaxy S23 Ultra 5G & a GoPro Hero11 Black

I've been a Joiner/Carpenter for 40yrs, apprentice trained time served, I don't have an apprentice of my own so to share my knowledge I put videos on YouTube.

YouTube videos - https://www.youtube.com/c/Gidjoiner