[Bug] Auto Duck control track fails to return to zero after overlap

bitman wrote on 11/4/2024, 7:19 AM

The auto duck feature works fine - except when there is an audio event on the control track which overlaps (e.g. crossfade) with another audio event on the audio control track. In such case the auto duck level is stuck (does not return to zero) when there is no audio on the control line after the last audio event (or bunched group).

Easy to reproduce:

1) have audio events separated (on the audio control track) -> audio ducking OK

2) make an overlap with the same audio events (the overlap amount does not matter) -> audio ducking fails to return

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

 

 

Comments

pierre-k wrote on 11/4/2024, 7:32 AM

I confirm.

bitman wrote on 11/4/2024, 7:52 AM

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

 

 

pierre-k wrote on 11/4/2024, 7:57 AM

transition....that's the reason why the duck doesn't work properly.

I would still appreciate it if I could influence the length of the start and end of the fade in the central setting.

 

bitman wrote on 11/4/2024, 7:58 AM

Post should be under audio category, can a moderator change this?

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

 

 

bitman wrote on 11/4/2024, 8:06 AM

I would still appreciate it if I could influence the length of the start and end of the fade in the central setting.

That would be nice as well, before this new Vegas native feature I was using the auto duck feature in the HOS scripts. If I recall correctly there was an issue with Vegasaur auto ducking.

Until Vegas fixes this I am still stuck with HOS which works fine, but HOS does not have the peak fine tuning.

Vegas Auto ducking is however still usable in it current state if you have no audio overlaps.

Last changed by bitman on 11/4/2024, 8:07 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

 

 

pierre-k wrote on 11/4/2024, 8:17 AM

I'm doing it this way for now.

bitman wrote on 11/4/2024, 8:28 AM

@pierre-k If you have HOS (happy otter) it has a working audio duck just like you do it manually, but much faster as it is automated. In fact it can can also duck non audio like video composite...

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

 

 

pierre-k wrote on 11/4/2024, 8:40 AM

I don't have HOS.

I came across one more thing with Auto Duck.

Model situation:
You have multiple commentary tracks because you have different effects on each.
If you use Auto Duck, adding an activation to one track always cancels the settings of the previous one.

Here's an example:

I don't know if it's technically possible, but it would be great if the music track contained changes from all three tracks above it.

This is how it should look in the final:

zzzzzz9125 wrote on 11/4/2024, 9:19 AM

I don't know if it's technically possible, but it would be great if the music track contained changes from all three tracks above it.

This is how it should look in the final:

@pierre-k One idea is to output the above three tracks to one bus track and then create an Auto Ducking Controller envelope for that bus track.

But I just tried it and it didn't work. Bus tracks can't currently be used in Auto Ducking. Perhaps Magix should provide additional support for them.

Using VEGAS Pro 22 build 194 & VEGAS Pro 21 build 208.

Information about my PC:
Brand Name: HP VICTUS Laptop
System: Windows 11.0 (64-bit) 10.00.22631
CPU: 12th Gen Intel(R) Core(TM) i7-12700H
GPU: NVIDIA GeForce RTX 3050 Laptop GPU
GPU Driver: NVIDIA Studio Driver 560.70

bitman wrote on 11/4/2024, 12:29 PM

Apart from the issue mentioned in this post, there is something strange going on as well.

When I listen to a correct implemented audio duck drawn graph (so no overlap) with one control track with speech and one music track to duck, I hear that the speech (control track) is boosted (and even clipping) instead of keeping the same volume. I can hear the effect and see the overall volume in overdrive on the master meter.

What is going on???

Last changed by bitman on 11/4/2024, 12:30 PM, 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

 

 

Thiago_Sase wrote on 11/4/2024, 3:47 PM

Hi, if anyone needs, this script can make the Duck Effect by 3 ways;
* By selecting a single audio event;
* By selecting a multiple audios events;
* By making a timeline selection;

 

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

namespace Test_Script
{
    public class Class1
    {
        public Vegas myVegas;

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

        public void AddDuckingEffect(Vegas vegas)
        {
            try
            {
                // Configuration parameters
                AudioConfig config = InitializeConfig();

                // Calculate the duration for fading
                Timecode fadeDuration = CalculateFadeDuration(config.FadeMode, config.FadeMilliseconds);

                // Check if there is a timeline selection
                if (myVegas.Transport.SelectionLength != Timecode.FromMilliseconds(0))
                {
                    // Apply audio ducking within the timeline selection
                    ApplyDuckingInTimelineSelection(fadeDuration, config);
                }
                else
                {
                    // Find all selected audio events
                    List<TrackEvent> selectedAudioEvents = FindSelectedAudioEvents(myVegas);

                    if (selectedAudioEvents.Count == 1)
                    {
                        // Single selected audio event
                        ApplyDuckingToEvent(selectedAudioEvents[0], fadeDuration, config, reverse: false);
                    }
                    else if (selectedAudioEvents.Count > 1)
                    {
                        // Multiple selected audio events
                        foreach (var audioEvent in selectedAudioEvents)
                        {
                            ApplyDuckingToEvent(audioEvent, fadeDuration, config, reverse: false);
                        }
                    }
                    else
                    {
                        throw new Exception("Please select one or more audio events.");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private AudioConfig InitializeConfig()
        {
            return new AudioConfig
            {
                FadeMode = 2,          // 1 = Fade in/out completely, 2 = Centered fade
                FadeMilliseconds = 2000, // Duration in milliseconds
                HighVolume = 1.0,       // Full volume (0 dB)
                LowVolume = 0.25        // Reduced volume (-12 dB)
            };
        }

        private Timecode CalculateFadeDuration(int fadeType, double fadeMilliseconds)
        {
            double adjustedFadeMs = fadeType == 2 ? fadeMilliseconds * 0.5 : fadeMilliseconds;
            return new Timecode(adjustedFadeMs);
        }

        private List<TrackEvent> FindSelectedAudioEvents(Vegas vegas)
        {
            List<TrackEvent> selectedEvents = new List<TrackEvent>();
            foreach (Track track in vegas.Project.Tracks)
            {
                if (track.IsAudio())
                {
                    foreach (TrackEvent evt in track.Events)
                    {
                        if (evt.Selected)
                        {
                            selectedEvents.Add(evt);
                        }
                    }
                }
            }
            return selectedEvents;
        }

        private void ApplyDuckingToEvent(TrackEvent audioEvent, Timecode fadeDuration, AudioConfig config, bool reverse)
        {
            // Retrieve or create the volume envelope
            Envelope volumeEnvelope = GetOrCreateVolumeEnvelope(audioEvent.Track);

            // Set envelope points for the audio ducking
            AddFadePoints(volumeEnvelope, audioEvent.Start, audioEvent.Length, fadeDuration, config, reverse);
        }

        private Envelope GetOrCreateVolumeEnvelope(Track track)
        {
            Envelope volumeEnv = LocateEnvelope(track, EnvelopeType.Volume);
            if (volumeEnv == null)
            {
                volumeEnv = new Envelope(EnvelopeType.Volume);
                track.Envelopes.Add(volumeEnv);
            }
            return volumeEnv;
        }

        private Envelope LocateEnvelope(Track track, EnvelopeType type)
        {
            foreach (Envelope env in track.Envelopes)
            {
                if (env.Type == type)
                {
                    return env;
                }
            }
            return null;
        }

        private void AddFadePoints(Envelope volumeEnv, Timecode start, Timecode length, Timecode fadeDuration, AudioConfig config, bool reverse)
        {
            if (reverse)
            {
                volumeEnv.Points.Add(new EnvelopePoint(start - fadeDuration, config.LowVolume));
                volumeEnv.Points.Add(new EnvelopePoint(start + fadeDuration, config.HighVolume));
                volumeEnv.Points.Add(new EnvelopePoint(start + length - fadeDuration, config.HighVolume));
                volumeEnv.Points.Add(new EnvelopePoint(start + length + fadeDuration, config.LowVolume));
            }
            else
            {
                volumeEnv.Points.Add(new EnvelopePoint(start - fadeDuration, config.HighVolume));
                volumeEnv.Points.Add(new EnvelopePoint(start + fadeDuration, config.LowVolume));
                volumeEnv.Points.Add(new EnvelopePoint(start + length - fadeDuration, config.LowVolume));
                volumeEnv.Points.Add(new EnvelopePoint(start + length + fadeDuration, config.HighVolume));
            }
        }

        private void ApplyDuckingInTimelineSelection(Timecode fadeDuration, AudioConfig config)
        {
            Timecode selectionStart = myVegas.Transport.SelectionStart;
            Timecode selectionLength = myVegas.Transport.SelectionLength;

            Track selectedTrack = null;
            foreach (Track track in myVegas.Project.Tracks)
            {
                if (track.IsAudio())
                {
                    selectedTrack = track;
                    break;
                }
            }

            if (selectedTrack == null)
                throw new Exception("No audio track found for timeline selection.");

            Envelope volumeEnv = GetOrCreateVolumeEnvelope(selectedTrack);
            AddFadePoints(volumeEnv, selectionStart, selectionLength, fadeDuration, config, reverse: true);
        }

        private class AudioConfig
        {
            public int FadeMode { get; set; }
            public double FadeMilliseconds { get; set; }
            public double HighVolume { get; set; }
            public double LowVolume { get; set; }
        }
    }
}

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

 

set wrote on 11/4/2024, 4:10 PM

Post should be under audio category, can a moderator change this?

as requested.Done.

 

Also issue confirmed.

Last changed by set on 11/4/2024, 4:29 PM, changed a total of 1 times.

Setiawan Kartawidjaja
Bandung, West Java, Indonesia (UTC+7 Time Area)

Personal FB | Personal IG | Personal YT Channel
Chungs Video FB | Chungs Video IG | Chungs Video YT Channel
Personal Portfolios YouTube Playlist
Pond5 page: My Stock Footage of Bandung city

 

System 5-2021:
Processor: Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz   2.90 GHz
Video Card1: Intel UHD Graphics 630 (Driver 31.0.101.2127 (Feb 1 2024 Release date))
Video Card2: NVIDIA GeForce RTX 3060 Ti 8GB GDDR6 (Driver Version 551.23 Studio Driver (Jan 24 2024 Release Date))
RAM: 32.0 GB
OS: Windows 10 Pro Version 22H2 OS Build 19045.3693
Drive OS: SSD 240GB
Drive Working: NVMe 1TB
Drive Storage: 4TB+2TB

 

System 2-2018:
ASUS ROG Strix Hero II GL504GM Gaming Laptop
Processor: Intel(R) Core(TM) i7 8750H CPU @2.20GHz 2.21 GHz
Video Card 1: Intel(R) UHD Graphics 630 (Driver 31.0.101.2111)
Video Card 2: NVIDIA GeForce GTX 1060 6GB GDDR5 VRAM (Driver Version 537.58)
RAM: 16GB
OS: Win11 Home 64-bit Version 22H2 OS Build 22621.2428
Storage: M.2 NVMe PCIe 256GB SSD & 2.5" 5400rpm 1TB SSHD

 

* I don't work for VEGAS Creative Software Team. I'm just Voluntary Moderator in this forum.

bitman wrote on 11/5/2024, 2:28 PM

Apart from the issue mentioned in this post, there is something strange going on as well.

When I listen to a correct implemented audio duck drawn graph (so no overlap) with one control track with speech and one music track to duck, I hear that the speech (control track) is boosted (and even clipping) instead of keeping the same volume. I can hear the effect and see the overall volume in overdrive on the master meter.

What is going on???

I think I found the issue I mentioned in the above quote, it is probably another bug which is triggered by not having the output meters in the audio track headers. By default the view is enabled, but I must have disabled them leading to another bug, I made a new post for this:


https://www.vegascreativesoftware.info/us/forum/bug-vp22-audio-ducking-nok-when-output-meters-view-is-disabled--147706/

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