Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Request: Volume integrated into audio clip

Discussion in 'Editor & General Support' started by joshcamas, Nov 30, 2020.

  1. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,242
    One thing that would be INSANELY helpful is being able to have a slider value on audio clip assets that allow for tweaking of volume. This would be the "asset volume", which would be multiplied by the audio source's volume.

    Here's the reason:
    When importing hundreds of sound effects, tweaking each one can be a pain. There are three options:
    - Tweak all audio source references, and have a tweakable volume float on every scriptable object / gameobject that spawns that sound dynamically
    - Opening each asset individually in Audacity and modifying the audio, then exporting it
    - Have a custom audio asset "wrapper" for each audio clip

    I am doing the latter, but this is obviously a really frustrating way of doing it, since it means each audio file has two assets (and 4 files including meta files), and of course I have to then make sure all systems use that custom asset as a reference, not the unity audio clip.

    I think it would be pretty easy and very useful to be able to have a "base asset volume" slider on each audio clip. This would make it insanely easy to tweak the assets volume. Also, allowing this volume to be more than 1 would be amazing, since that is not doable on an audio source.

    For big projects, this would be INSANELY helpful!

    Alternatively, allowing for some sort of custom asset override would be insanely better- being able to pack our own data into an audio clip, such as subtitle data, would be insanely cool. However, this is wayy beyond the scope of this question. :))
     
    Ruslank100, adamgryu, wlada and 2 others like this.
  2. adamgryu

    adamgryu

    Joined:
    Mar 1, 2014
    Posts:
    153
    I've also wanted this feature for a long time. Just a slider on the Audio Import Settings to boost or reduce the volume of a sound effect would be super useful.

    If there's any way I can extend the AudioImporter to add this feature, I'd even do it myself!

    EDIT: Maybe I could write an Editor extension to call into FFmpeg to adjust the volume quickly in Unity. Could be a handy project when I have some free time.
     
    Last edited: Aug 19, 2022
    joshcamas likes this.
  3. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,242
    That's a very good idea!
     
  4. romtecmax

    romtecmax

    Joined:
    Oct 5, 2022
    Posts:
    2
    I just came across this thread because I would also find this very useful. Great Idea.
     
  5. TzuriTeshuba

    TzuriTeshuba

    Joined:
    Aug 6, 2019
    Posts:
    148
    I was just wishing the same thing! Please consider changing the tag of your thread to "feature request" (not just in the thread title).
    It does seem like the AudioSource.PlayOneShot(clip, volumeScale) could help in many cases though in the meantime.
     
  6. adamgryu

    adamgryu

    Joined:
    Mar 1, 2014
    Posts:
    153
    joshcamas likes this.
  7. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,242
    Amazing! I'll definitely be integrating this into my audio pipeline, thank you much!
     
  8. adamgryu

    adamgryu

    Joined:
    Mar 1, 2014
    Posts:
    153
    Awesome, let me know if there are any problems getting it set up!