Script to copy volume envelope within track group

marcel-gielen wrote on 2/12/2023, 9:32 AM

While editing with 5,1 camera surround (in combination with background music), which is a kind of ducking, I found myself often manually copying volume envelope points. Since audio seems to be somewhere at the bottom of the Vegas team priority ladder, I created some C# script to help with this. So for anyone who's interested: https://github.com/marcelgln/Vegas-volume-replicate

Comments

Jeditpro wrote on 2/12/2023, 3:15 PM

@marcel-gielen

I get this message when I try to run the script on VEGAS pro 19

See my screen record to undestand better

 

marcel-gielen wrote on 2/13/2023, 1:33 PM

Thanks for your response.
The screen record was helpful. It turned out to be related to the first event on the timeline (which I didn't try) . Even after deleting envelope points, the default point at timecode 0 is never deleted by Vegas. This resulted in a duplicate when copying the '0' envelope point, with as a result the error. I have updated the files on Github.

jetdv wrote on 2/13/2023, 2:22 PM

@marcel-gielen, there HAS to be a 'default' point with the default value. When adding points, I always check to see if a point already exists at that time and, if it does, change the value - otherwise add a new point there. For example:

        public void AddVelocityPoint(Envelope VelEnv, Timecode PointLoc, double PointSpeed)
        {
            EnvelopePoint a = VelEnv.Points.GetPointAtX(PointLoc);
            if (a == null)
            {
                a = new EnvelopePoint(PointLoc, PointSpeed);
                VelEnv.Points.Add(a);
            }
            else
            {
                a.Y = PointSpeed;
            }
        }

 

Jeditpro wrote on 2/13/2023, 7:12 PM

@marcel-gielen Unfortunately I still get the same message.

Todd-A0 wrote on 2/13/2023, 10:50 PM

@jetdv Have you considered making a script that removes silence, or at least removes the absence of voice. In this chrome extension example it plays at a faster speed where there is no speech, but as a Vegas script I'd like it to remove the non voice completely

jetdv wrote on 2/14/2023, 8:40 AM

@Todd-A0, look at the series that just finished:

And then combine that with the series that just started:

You'd definitely need some modifications to also remove the video when the audio was removed so that the "empty" areas went across all tracks but, otherwise, I believe this is basically what you're asking for.

marcel-gielen wrote on 2/14/2023, 12:54 PM

@Jeditpro I fixed a couple of issues. One of them was the handling of destination tracks which did not have a volume envelope. This was most likely what you experienced.

@jetdv I purposely did not check for duplicates, since I first deleted all points within the event area. Later found out that Vegas does not delete the '0' point 😞
No a real good programming practice imho, after a 'list clear' the list is probably not empty.
 

juan_rios wrote on 2/14/2023, 1:11 PM

removes silence, or at least removes the absence of voice

@Todd-A0, have you considered the option of using a noise gate?

 

PC-ESTUDIO1:

- VEGAS Pro 19 B651.

- Windows 11 64 bits - Intel Core i7 10.700K CPU @ 3.80GHz

- Motherboard Rog Strix 8460-H Gaming - RAM 32GB.

- nVidia GeForce GTX 1650 Super.

- Intel UHD Graphics 630.

PC-ESTUDIO2:

-Shotcut.

-Kdenlive.

-Linux Mint 21.2 -Victoria - Intel Core i5 6.400 CPU @ 2.7GHz

-Motherboard Gigabyte H110M-S2PV DD3 - RAM 16GB

-Intel Graphics 530.

LAPTOP:

-HP Victus 16-e

-VEGAS Pro 19 B651

- Windows 11 64 bits - AMD Ryzen 7 5.800H with Radeon Graphics 3.20 GHz

-GeForce RTX 3050 Laptop GPU

-RAM 16 GB.

CAMERAS:

Panasonic FZ300; FZ1000; FZ2000 and HC X1500.

 

 

Jeditpro wrote on 2/14/2023, 3:31 PM

@marcel-gielen Now works fine here. This script will be very useful.Thanks!

@juan_rios From what I understand @Todd-A0 wants a script that identifies the silences present in an audio file and allows their removal, similar to Vegasaur Silence Detector tool.

 

Todd-A0 wrote on 2/14/2023, 6:37 PM

@marcel-gielen I was looking for a script that does what Joelson shows(and what Jetdv is developing), didn't know Vegasaur had it. Within Vegas like that is exactly what's needed, so each cut can be perfected if required, Excessive jump cuts can be annoying but more accepted in short form social media edits, and some cuts can be hidden with optical flow seamless transitions.

juan_rios wrote on 2/15/2023, 12:57 PM

@juan_rios From what I understand @Todd-A0 wants a script that identifies the silences present in an audio file and allows their removal, similar to Vegasaur Silence Detector tool.

 

Ah! Sorry. My English is very basic and I didn't understand well.

PC-ESTUDIO1:

- VEGAS Pro 19 B651.

- Windows 11 64 bits - Intel Core i7 10.700K CPU @ 3.80GHz

- Motherboard Rog Strix 8460-H Gaming - RAM 32GB.

- nVidia GeForce GTX 1650 Super.

- Intel UHD Graphics 630.

PC-ESTUDIO2:

-Shotcut.

-Kdenlive.

-Linux Mint 21.2 -Victoria - Intel Core i5 6.400 CPU @ 2.7GHz

-Motherboard Gigabyte H110M-S2PV DD3 - RAM 16GB

-Intel Graphics 530.

LAPTOP:

-HP Victus 16-e

-VEGAS Pro 19 B651

- Windows 11 64 bits - AMD Ryzen 7 5.800H with Radeon Graphics 3.20 GHz

-GeForce RTX 3050 Laptop GPU

-RAM 16 GB.

CAMERAS:

Panasonic FZ300; FZ1000; FZ2000 and HC X1500.

 

 

m3lquixd wrote on 2/17/2023, 12:38 PM

@marcel-gielen Now works fine here. This script will be very useful.Thanks!

@juan_rios From what I understand @Todd-A0 wants a script that identifies the silences present in an audio file and allows their removal, similar to Vegasaur Silence Detector tool.

 

I would like to have a script that removes the silence I cannot afford to buy vegasaur.

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 3 3200G 3.60 GHz
RAM:
    32,0GB Dual-Channel DDR4 2666MHz
Motherboard:
    Gigabyte Technology Co. Ltd. A320M-S2H-CF (AM4)
Graphics:
    4095MB NVIDIA GeForce GTX 1650 (ZOTAC International)
Storage:
    465GB Seagate ST500DM002-1BD142 (SATA )
    238GB Lexar 256GB SSD (SATA (SSD))

jetdv wrote on 2/17/2023, 12:44 PM

That's what I listed up above...

marcel-gielen wrote on 2/20/2023, 12:06 PM

@joelson,
I am planning to change the behavior slightly. Initially I developed it using it small test projects to which I added some audio tracks. When using it for the first time on a larger project with camera footage, it didn't work, because I only allow it when events on a single track are selected and the camera footage are 'grouped events'.

Idea as as follows:

  • If only events on a single track are selected, then the envelope from the selected track are replicated to the other tracks of the track group (as it is now)
  • If events on multiple audio tracks are selected, then the volume envelope from the first track from the track group are replicated to the other tracks of the track group.