BroAudio
Quick StartScripting APIAsset Store
  • Overview
    • Introduction
    • Getting Started
    • Compatibility
  • Core Features
    • Library Manager
      • Create The Library
      • Design The Sound
        • 🔊Volume
        • 🎚️Fading
        • 🔁Looping
        • 🎲Randomization
        • 💪Velocity
        • 🎛️Spatial & Mix
    • Audio Player
      • Music Player
      • Dominator Player
    • Playback Group
    • Audio Effect
    • No-Code Components
      • Sound Source
      • Sound Volume
      • Spectrum Analyzer
    • Addressables
    • Customization
  • Designs
    • Audio Mixer
  • Tools
    • Audio Clip Editor
    • Audio Effect Editor
    • Useful Attrubutes
  • Reference
    • Scripting API
      • Class
        • BroAudio
        • SoundSource
        • BroAdvice
      • Interface
        • IAudioPlayer
        • IMusicPlayer
        • IPlayerEffect
        • IAutoResetWaitable
        • IAudioSourceProxy
      • Struct
        • SoundID
        • Effect
        • Fading
      • Enums
        • BroAudioType
        • EffectType
        • StopMode
        • Transition
        • Ease
    • Unity API Integration
    • Audio Terminology
    • Technical Details
  • Others
    • Release Notes
    • Known Issues
      • Duplicate SoundID Issue
    • Roadmap
    • Support & Contact
Powered by GitBook
On this page
  • Volume Unit
  • Volume Range
  • Editor Slider
  • All volume settings work in conjunction
  1. Core Features
  2. Library Manager
  3. Design The Sound

Volume

Last updated 1 year ago

Volume Unit

We often encounter two types of volume units in Unity and BroAudio, both relative to the original audio file's volume:

  1. Normalized Volume: When set to 1, it represents 100% of the file's original volume, while 0 represents 0% volume, which means complete silence. Unity's volume uses this unit.

  2. Decibel Volume (dB): This is the most commonly used unit to describe volume. It represents a logarithmic value. When set to 0dB, it means no changes to the file's original volume (so 0dB = 1 normalized volume). Unity's uses this unit.

Decibel (dB) is a relative unit, so different reference objects and ranges can lead to different calculations. However, here we are referring to dBFS, which uses the original volume of the audio file as its Full Scale.

These two volume units can be converted into each other. Although you don't need to do the calculations yourself, if you are interested, the formula is as follows:

dB=20log(V1/V2)dB = 20log (V1/V2)dB=20log(V1/V2)

(V1/V2) is the same as Normalized Volume. There are many simple available for use. By entering the Normalized Volume into the Voltage Gain, you can convert it to dB.

Volume Range

In BroAudio, every sound plays through the , with a volume range of 0 to 10 (-80dB to +20dB). This is 20dB more than what offers, meaning you can produce sounds louder than the original files. This feature helps you to easily adjust and balance the overall volume.

Volume range will be limited to 0~1 (-80dB~0dB) in WebGL,

Editor Slider

The volume slider is based on decibel value; it's a logarithmic slider instead of a linear slider like 's volume. This matches human sound perception better and allows for easier fine-tuning.

To further ensure precision, most audio software, including , features custom scale settings. Below is a comparison of different slider types, with each measured in decibels(dB) :

All volume settings work in conjunction

There are three volume settings available in BroAudio, and they all work in conjunction.

The final playback volume (in normalized) will be

Clip Volume * Entity Master Volume * SetVolume(if it's implemented)

(of the entity)

(API)

🔊
AudioSource
AudioMixer
Decibel(dB) Wikipedia
online calculators
Audio Mixer
Audio Source
Audio Source
Unity Audio Mixer
Page cover image
Clip Volume
Master Volume
more details.
-6dB ≒ 0.5 volume (half volume), -20dB ≒ 0.1 volume,
Decibel(dB) Wikipedia
SetVolume