Search Unity

Question Clicking / popping sounds when using audio low pass filter

Discussion in 'Audio & Video' started by SpaceOwlGames, Jul 6, 2021.

  1. SpaceOwlGames

    SpaceOwlGames

    Joined:
    Apr 22, 2016
    Posts:
    61
    Hello,
    I am making a space game where I want the sounds (explosions, weapons) to sound muffled as they are outside the ship. I have applied the Audio Low Pass Filter to my audio sources and it sounds great, except for a strange clicking / popping sound that is peppered throughout the audio. I have recorded what it sounds like with and without the filter: https://drive.google.com/drive/folders/1s1Ll47FQOTL0xVEu0ewv3pwJXoq-J1PN?usp=sharing (as well as attached to this thread)

    I've tried lerping the volume per audio source when it plays as well as enabling the Low Pass Filter after a source has started playing and it always there. Does anyone have an idea on how to fix this?
     

    Attached Files:

  2. Hikiko66

    Hikiko66

    Joined:
    May 5, 2013
    Posts:
    1,304
    Are you automating the cutoff at all?
    Have you tried lowering the resonance of the filter? Does that help?

    Are the filter effects being applied to each audiosource, as components?
    That might be pretty expensive. Do you need these filters to have different settings based on distance for example?

    You might try pushing all those audiosources through a mixer group, and applying the lowpass filter onto that group instead.
    This should be cheaper. If one low pass with a lower resonance isn't getting the job done, you can probably try stacking 2 lowpass filters and see whether you can get the effect you want by tweaking them.
     
  3. SpaceOwlGames

    SpaceOwlGames

    Joined:
    Apr 22, 2016
    Posts:
    61
    Each audio source had the filter effect because I wanted to use the graph for dampening more the further away it was.

    I took another look at audio mixers and basically created an AudioMix with 4 groups with various cut-offs, then whenever a sound is played I check the distance to the listener and assign the audio source to the appropriate group. It now sounds pretty much the same without the clicking/pops!

    Thanks for your help!
     
  4. aloomataalo

    aloomataalo

    Joined:
    Jul 10, 2021
    Posts:
    1
    I don't have any idea :(
     
  5. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    I am having popping/cracking as well with LowPassFilter ON when above 1000meters from my audiosource that has the filter
    If I'm close it's all good
    Here's a video of the issue:
     
  6. nickjoseph754

    nickjoseph754

    Joined:
    May 29, 2023
    Posts:
    1
    The clicking or popping sound you are hearing is most likely caused by the filter being applied too abruptly. This can happen if the filter is turned on or off too quickly, or if the cutoff frequency is changed too quickly.

    To fix this, you can try the following:

    • Use a smoother transition when applying or removing the filter. This can be done by using a low-pass filter with a longer attack or release time, or by using a crossfade between the filtered and unfiltered audio.
    • Change the cutoff frequency more gradually. This can be done by using a low-pass filter with a narrower bandwidth, or by using a crossfade between the filtered and unfiltered audio.
    • Use a different type of filter. There are many different types of filters available, and some may be less prone to causing clicking or popping sounds than others.
    If you are still having problems after trying these suggestions, you may need to consult with a sound engineer for further help.

    Here are some additional tips:

    • Make sure that your audio files are properly formatted. If your audio files are not in a supported format, they may not play correctly or may cause problems with the filter.
    • Check your audio settings. Make sure that your audio output device is properly configured and that the volume is set to a comfortable level.
    • Update your audio drivers. Outdated audio drivers can sometimes cause problems with sound output.
    I hope this helps!
     
    SeventhString likes this.
  7. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    I have found the reason for this bug (in my case)
    I have tried everything and the only thing that fixed it was not to have the sound be a child of an object having a rigidbody. The entire reason why the popping was happening, was because it was parented to an object having a rigidbody.

    I tested it many, many times, and as soon as you remove the rigidbody, popping/cracking sounds go away.